mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-12 22:26:08 -04:00
Initial support for SAML authentication
This commit is contained in:
parent
9c002ce29b
commit
4a4ae9d332
12 changed files with 157 additions and 4 deletions
|
@ -143,6 +143,15 @@ module.exports = function (sequelize, DataTypes) {
|
|||
photo = letterAvatars(profile.username)
|
||||
}
|
||||
break
|
||||
case 'saml':
|
||||
if (profile.emails[0]) {
|
||||
photo = 'https://www.gravatar.com/avatar/' + md5(profile.emails[0])
|
||||
if (bigger) photo += '?s=400'
|
||||
else photo += '?s=96'
|
||||
} else {
|
||||
photo = letterAvatars(profile.username)
|
||||
}
|
||||
break
|
||||
}
|
||||
return photo
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue