studentRoleClaim

This commit is contained in:
MathieuSevignyLavallee 2024-09-22 10:41:02 -04:00
parent 320f98a8a7
commit e3de6853c7
2 changed files with 8 additions and 6 deletions

View file

@ -14,6 +14,7 @@ OAUTH_CLIENT_SECRET=your_oauth_client_secret
OAUTH_CALLBACK_URL=https://localhost:3000/auth/provider/callback
OAUTH_ADD_SCOPE=scopes
OAUTH_ROLE_TEACHER_VALUE=teacher-claim-value
OAUTH_ROLE_STUDENT_VALUE=student-claim-value
# Configuration OIDC
OIDC_CLIENT_ID=your_oidc_client_id

View file

@ -1,15 +1,15 @@
require('dotenv').config({ path: './.env.auth' });
module.exports = {
// Activer ou désactiver les types d'authentifications
// Enable or disable the types of authentications
simpleLoginActive: process.env.SIMPLE_LOGIN_ACTIVE === 'true',
oauthActive: process.env.OAUTH_ACTIVE === 'true',
oidcActive: process.env.OIDC_ACTIVE === 'true',
oauthActive: process.env.OAUTH_ACTIVE === 'false',
oidcActive: process.env.OIDC_ACTIVE === 'false',
// Configuration Simple Login
// Simple Login Configuration
sessionSecret: process.env.SESSION_SECRET || 'default_session_secret',
// Configuration OAuth
// OAuth Configuration
oauth: {
authorizationURL: process.env.OAUTH_AUTHORIZATION_URL || '',
tokenURL: process.env.OAUTH_TOKEN_URL || '',
@ -18,9 +18,10 @@ module.exports = {
callbackURL: process.env.OAUTH_CALLBACK_URL || '',
scope: process.env.OAUTH_ADD_SCOPE || '',
teacherRoleClaim: process.env.OAUTH_ROLE_TEACHER_VALUE || '',
studentRoleClaim: process.env.OAUTH_ROLE_STUDENT_VALUE || '', // Added based on env file
},
// Configuration OIDC
// OIDC Configuration
oidc: {
clientID: process.env.OIDC_CLIENT_ID || '',
clientSecret: process.env.OIDC_CLIENT_SECRET || '',