mirror of
https://github.com/ets-cfuhrman-pfe/EvalueTonSavoir.git
synced 2025-08-11 21:23:54 -04:00
Merge branch 'dev-it1-PFEA2024' into it1/feature/RBAC
This commit is contained in:
commit
3bb1db7236
4 changed files with 18 additions and 5 deletions
|
|
@ -23,7 +23,8 @@ const mockConfig = {
|
|||
type: "oidc",
|
||||
OIDC_CLIENT_ID: "your_oidc_client_id",
|
||||
OIDC_CLIENT_SECRET: "your_oidc_client_secret",
|
||||
OIDC_ISSUER_URL: "https://your-issuer.com",
|
||||
OIDC_CONFIG_URL: "https://your-issuer.com",
|
||||
OIDC_ADD_SCOPE: "groups",
|
||||
OIDC_ROLE_TEACHER_VALUE: "teacher-claim-value",
|
||||
OIDC_ROLE_STUDENT_VALUE: "student-claim-value",
|
||||
},
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ class PassportOpenIDConnect {
|
|||
id: profile.id,
|
||||
email: profile.emails[0].value,
|
||||
name: profile.name.givenName,
|
||||
groups: profile.groups[0].value ?? []
|
||||
};
|
||||
return done(null, user);
|
||||
} catch (error) {
|
||||
|
|
|
|||
|
|
@ -16,11 +16,22 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"oidc":{
|
||||
"type":"oidc"
|
||||
"oidc_gmatte": {
|
||||
"type": "oidc",
|
||||
"OIDC_CONFIG_URL": "https://auth.gmatte.xyz/application/o/evaluetonsavoir/.well-known/openid-configuration",
|
||||
"OIDC_CLIENT_ID": "clientID",
|
||||
"OIDC_CLIENT_SECRET": "clientSecret",
|
||||
"OIDC_ADD_SCOPE": "groups",
|
||||
"OIDC_ROLE_TEACHER_VALUE": "groups_evaluetonsavoir-prof",
|
||||
"OIDC_ROLE_STUDENT_VALUE": "groups_evaluetonsavoir"
|
||||
}
|
||||
}
|
||||
],
|
||||
"simple-login": {
|
||||
"enabled": true,
|
||||
"name": "provider3",
|
||||
"SESSION_SECRET": "your_session_secret"
|
||||
}
|
||||
"Module X":{
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ class AuthConfig {
|
|||
];
|
||||
|
||||
const requiredOIDCFields = [
|
||||
'OIDC_CLIENT_ID', 'OIDC_CLIENT_SECRET', 'OIDC_ISSUER_URL', 'OIDC_ROLE_TEACHER_VALUE', 'OIDC_ROLE_STUDENT_VALUE'
|
||||
'OIDC_CLIENT_ID', 'OIDC_CLIENT_SECRET', 'OIDC_CONFIG_URL', 'OIDC_ROLE_TEACHER_VALUE', 'OIDC_ROLE_STUDENT_VALUE','OIDC_ADD_SCOPE'
|
||||
];
|
||||
|
||||
const missingFieldsReport = [];
|
||||
|
|
@ -155,7 +155,7 @@ class AuthConfig {
|
|||
};
|
||||
} else if (providerConfig.type === 'oidc') {
|
||||
passportConfig[providerName] = {
|
||||
type: providerConfig.type
|
||||
type: providerConfig.type,
|
||||
};
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue