mirror of
https://github.com/logto-io/logto.git
synced 2025-03-10 22:22:45 -05:00
fix(core): fix saml sso connector bug (#4940)
* fix(core): fix saml sso connector bug fix saml sso connector bug * chore(core): add some comments add some comments
This commit is contained in:
parent
3b3bfd750a
commit
24972ce46e
2 changed files with 5 additions and 3 deletions
|
@ -95,12 +95,14 @@ class SamlConnector {
|
|||
*
|
||||
* @returns The parsed SAML assertion from IdP (with attribute mapping applied).
|
||||
*/
|
||||
async parseSamlAssertion(assertion: Record<string, unknown>): Promise<ExtendedSocialUserInfo> {
|
||||
async parseSamlAssertion(body: Record<string, unknown>): Promise<ExtendedSocialUserInfo> {
|
||||
const { x509Certificate } = await this.getSamlIdpMetadata();
|
||||
const profileMap = attributeMappingPostProcessor(this.config.attributeMapping);
|
||||
|
||||
const identityProvider = await this.getIdentityProvider();
|
||||
const samlAssertionContent = await handleSamlAssertion(assertion, identityProvider, {
|
||||
|
||||
// HandleSamlAssertion takes a HTTPResponse-like object, need to wrap body in a object.
|
||||
const samlAssertionContent = await handleSamlAssertion({ body }, identityProvider, {
|
||||
x509Certificate,
|
||||
entityId: this.spEntityId,
|
||||
});
|
||||
|
|
|
@ -40,7 +40,7 @@ export class SamlSsoConnector extends SamlConnector implements SingleSignOn {
|
|||
|
||||
async getIssuer() {
|
||||
const {
|
||||
serviceProvider: { entityId },
|
||||
identityProvider: { entityId },
|
||||
} = await this.getSamlConfig();
|
||||
return entityId;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue