From af0a33434a1e7fae06b93ceca79fc0e809da8fdd Mon Sep 17 00:00:00 2001 From: Kevin O'Neal Date: Sat, 10 Aug 2019 09:06:09 -0500 Subject: [PATCH] fix: update keycloak example (#478) --- examples/keycloak-auth-hook.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/keycloak-auth-hook.js b/examples/keycloak-auth-hook.js index 723fb28d1e..29f28c6391 100644 --- a/examples/keycloak-auth-hook.js +++ b/examples/keycloak-auth-hook.js @@ -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) => {