diff options
author | Allemand Sylvain <salleman@faddef.math.u-bordeaux1.fr> | 2018-04-09 16:49:07 +0200 |
---|---|---|
committer | Allemand Sylvain <salleman@faddef.math.u-bordeaux1.fr> | 2018-04-09 16:49:07 +0200 |
commit | 1c8a00943cff236ca40b2662189102a7851d3b56 (patch) | |
tree | 9cd99741f83ab604c6c0bf60309be49646e24b4d /server/authentication.js | |
parent | c115046a7c86b30ab5deb8762d3ef7a5ea3f4f90 (diff) | |
download | wekan-1c8a00943cff236ca40b2662189102a7851d3b56.tar.gz wekan-1c8a00943cff236ca40b2662189102a7851d3b56.tar.bz2 wekan-1c8a00943cff236ca40b2662189102a7851d3b56.zip |
authentification oauth2
Diffstat (limited to 'server/authentication.js')
-rw-r--r-- | server/authentication.js | 19 |
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'] + } + } + ); + } + }); |