mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-03-23 12:33:38 +00:00
spec(SSO/SAML): Attribute追加 (MisskeyIO#792)
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user