Add JumpCloud SAML

This commit is contained in:
Tuan Dang
2023-07-30 14:29:47 +07:00
parent ba6355e4d2
commit 6729caeb75
20 changed files with 106 additions and 17 deletions
+15 -1
View File
@@ -141,7 +141,17 @@ const initializePassport = async () => {
ssoConfigId: new Types.ObjectId(ssoIdentifier)
});
const samlConfig = ({
interface ISAMLConfig {
path: string;
callbackURL: string;
entryPoint: string;
issuer: string;
cert: string;
audience: string;
wantAuthnResponseSigned?: boolean;
}
const samlConfig: ISAMLConfig = ({
path: `/api/v1/sso/saml2/${ssoIdentifier}`,
callbackURL: `${await getSiteURL()}/api/v1/sso/saml2${ssoIdentifier}`,
entryPoint: ssoConfig.entryPoint,
@@ -150,6 +160,10 @@ const initializePassport = async () => {
audience: await getSiteURL()
});
if (ssoConfig.authProvider === AuthProvider.JUMPCLOUD_SAML) {
samlConfig.wantAuthnResponseSigned = false;
}
req.ssoConfig = ssoConfig;
done(null, samlConfig);