summaryrefslogtreecommitdiffstats
path: root/server/authentication.js
diff options
context:
space:
mode:
authorAllemand Sylvain <salleman@faddef.math.u-bordeaux1.fr>2018-04-09 16:49:07 +0200
committerAllemand Sylvain <salleman@faddef.math.u-bordeaux1.fr>2018-04-09 16:49:07 +0200
commit1c8a00943cff236ca40b2662189102a7851d3b56 (patch)
tree9cd99741f83ab604c6c0bf60309be49646e24b4d /server/authentication.js
parentc115046a7c86b30ab5deb8762d3ef7a5ea3f4f90 (diff)
downloadwekan-1c8a00943cff236ca40b2662189102a7851d3b56.tar.gz
wekan-1c8a00943cff236ca40b2662189102a7851d3b56.tar.bz2
wekan-1c8a00943cff236ca40b2662189102a7851d3b56.zip
authentification oauth2
Diffstat (limited to 'server/authentication.js')
-rw-r--r--server/authentication.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/server/authentication.js b/server/authentication.js
index acc101cc..03b4c464 100644
--- a/server/authentication.js
+++ b/server/authentication.js
@@ -54,5 +54,24 @@ Meteor.startup(() => {
Authentication.checkAdminOrCondition(userId, normalAccess);
};
+ if (Meteor.isServer) {
+ ServiceConfiguration.configurations.upsert(
+ { service: 'oidc' },
+ {
+ $set: {
+ loginStyle: 'redirect',
+ clientId: 'CLIENT_ID',
+ secret: 'SECRET',
+ serverUrl: 'https://my-server',
+ authorizationEndpoint: '/oauth/authorize',
+ userinfoEndpoint: '/oauth/userinfo',
+ tokenEndpoint: '/oauth/token',
+ idTokenWhitelistFields: [],
+ requestPermissions: ['openid']
+ }
+ }
+ );
+ }
+
});