mirror of
https://github.com/MisskeyIO/misskey
synced 2024-11-23 14:46:40 +09:00
spec(SSO/SAML): Attribute追加 (MisskeyIO#792)
This commit is contained in:
parent
fcd75902cc
commit
9559fbefe0
@ -495,14 +495,28 @@ export class SAMLIdentifyProviderService {
|
||||
'#text': user.id,
|
||||
},
|
||||
},
|
||||
...(user.name ? [{
|
||||
{
|
||||
'@Name': 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn',
|
||||
'saml:AttributeValue': {
|
||||
'@xsi:type': 'xs:string',
|
||||
'#text': user.id,
|
||||
},
|
||||
},
|
||||
{
|
||||
'@Name': 'firstName',
|
||||
'@NameFormat': 'urn:oasis:names:tc:SAML:2.0:attrname-format:basic',
|
||||
'saml:AttributeValue': {
|
||||
'@xsi:type': 'xs:string',
|
||||
'#text': user.name,
|
||||
'#text': user.name ? user.name : 'Misskey User',
|
||||
},
|
||||
},
|
||||
{
|
||||
'@Name': 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname',
|
||||
'saml:AttributeValue': {
|
||||
'@xsi:type': 'xs:string',
|
||||
'#text': user.name ? user.name : 'Misskey User',
|
||||
},
|
||||
},
|
||||
}] : []),
|
||||
{
|
||||
'@Name': 'lastName',
|
||||
'@NameFormat': 'urn:oasis:names:tc:SAML:2.0:attrname-format:basic',
|
||||
@ -511,6 +525,13 @@ export class SAMLIdentifyProviderService {
|
||||
'#text': `@${user.username}`,
|
||||
},
|
||||
},
|
||||
{
|
||||
'@Name': 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname',
|
||||
'saml:AttributeValue': {
|
||||
'@xsi:type': 'xs:string',
|
||||
'#text': `@${user.username}`,
|
||||
},
|
||||
},
|
||||
{
|
||||
'@Name': 'displayName',
|
||||
'@NameFormat': 'urn:oasis:names:tc:SAML:2.0:attrname-format:basic',
|
||||
|
Loading…
Reference in New Issue
Block a user