enhance(SSO): SAML認証のNameIDFormatにemailAddressを追加

This commit is contained in:
まっちゃとーにゅ 2024-03-17 22:20:47 +09:00
parent aebe9ae148
commit b4b8b98336
No known key found for this signature in database
GPG Key ID: 6AFBBF529601C1DB
1 changed files with 18 additions and 10 deletions

View File

@ -97,9 +97,10 @@ export class SAMLIdentifyProviderService {
},
},
},
'md:NameIDFormat': {
'#text': 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent',
},
'md:NameIDFormat': [
{ '#text': 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress' },
{ '#text': 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent' },
],
'md:SingleSignOnService': [
{
'@Binding': 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect',
@ -186,9 +187,10 @@ export class SAMLIdentifyProviderService {
'@WantAssertionsSigned': provider.wantAssertionsSigned,
'@protocolSupportEnumeration': 'urn:oasis:names:tc:SAML:2.0:protocol',
'md:KeyDescriptor': keyDescriptor,
'md:NameIDFormat': {
'#text': 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent',
},
'md:NameIDFormat': [
{ '#text': 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress' },
{ '#text': 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent' },
],
'md:AssertionConsumerService': {
'@isDefault': 'true',
'@index': 0,
@ -475,10 +477,16 @@ export class SAMLIdentifyProviderService {
'#text': ssoServiceProvider.issuer,
},
'saml:Subject': {
'saml:NameID': {
'@Format': 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent',
'#text': user.id,
},
'saml:NameID': [
{
'@Format': 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress',
'#text': profile.email,
},
{
'@Format': 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent',
'#text': user.id,
},
],
'saml:SubjectConfirmation': {
'@Method': 'urn:oasis:names:tc:SAML:2.0:cm:bearer',
'saml:SubjectConfirmationData': {