Skip to content

Commit

Permalink
Set/guess default values for serviceURL, authorizationURL, tokenURL, …
Browse files Browse the repository at this point in the history
…userInfoURL.
  • Loading branch information
JMLX42 committed Feb 17, 2016
1 parent 5e79190 commit bb4acd7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/strategy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ var passportAuthenticateWithCUstomClaims = require('./PassportAuthenticateWithCu

function Strategy(options, verify)
{
if (!options.serviceURL)
options.serviceURL = 'https://fcp.integ01.dev-franceconnect.fr'
if (!options.authorizationURL)
options.authorizationURL = options.serviceURL + '/api/v1/authorize';
if (!options.tokenURL)
options.tokenURL = options.serviceURL + '/api/v1/token';
if (!options.userInfoURL)
options.userInfoURL = options.serviceURL + '/api/v1/userinfo';

var strategy = new OpenIDConnectStrategy(options, verify);
var alternateAuthenticate = new passportAuthenticateWithCUstomClaims(
options.userInfoURL,
Expand Down

0 comments on commit bb4acd7

Please sign in to comment.