1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

fix: update keycloak example (#478)

This commit is contained in:
Kevin O'Neal 2019-08-10 09:06:09 -05:00 committed by Ivar Conradi Østhus
parent 67ad9c4498
commit af0a33434a

View File

@ -20,9 +20,9 @@ const { User, AuthenticationRequired } = require('../lib/server-impl.js');
const KeycloakStrategy = require('@exlinc/keycloak-passport');
const passport = require('passport');
const host = `http://${process.env.AUTH_HOST}`;
const host = process.env.AUTH_HOST;
const realm = process.env.AUTH_REALM;
const clientId = process.env.AUTH_CLIENT_ID;
const clientID = process.env.AUTH_CLIENT_ID;
const contextPath = process.env.CONTEXT_PATH;
passport.use(
@ -31,12 +31,12 @@ passport.use(
{
host,
realm,
clientId,
clientID,
clientSecret: "We don't need that, but is required",
callbackURL: `${contextPath}/api/auth/callback`,
authorizationURL: `${host}/auth/realms/hamis/protocol/openid-connect/auth`,
tokenURL: `${host}/auth/realms/hamis/protocol/openid-connect/token`,
userInfoURL: `${host}/auth/realms/hamis/protocol/openid-connect/userinfo`,
authorizationURL: `${host}/auth/realms/${realm}/protocol/openid-connect/auth`,
tokenURL: `${host}/auth/realms/${realm}/protocol/openid-connect/token`,
userInfoURL: `${host}/auth/realms/${realm}/protocol/openid-connect/userinfo`,
},
(accessToken, refreshToken, profile, done) => {