1
0
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:
あわわわとーにゅ 2024-11-07 10:08:32 +09:00 committed by GitHub
parent fcd75902cc
commit 9559fbefe0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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',