mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 08:13:31 +02:00
Add option to control SAML callback
This commit is contained in:
@@ -33,8 +33,7 @@ module.exports = function(options) {
|
||||
}
|
||||
|
||||
var samlConfig = {
|
||||
path: '/auth/saml/callback'
|
||||
, entryPoint: options.saml.entryPoint
|
||||
entryPoint: options.saml.entryPoint
|
||||
, issuer: options.saml.issuer
|
||||
}
|
||||
|
||||
@@ -44,6 +43,17 @@ module.exports = function(options) {
|
||||
})
|
||||
}
|
||||
|
||||
if (options.saml.callbackUrl) {
|
||||
samlConfig = _.merge(samlConfig, {
|
||||
callbackUrl: options.saml.callbackUrl
|
||||
})
|
||||
}
|
||||
else {
|
||||
samlConfig = _.merge(samlConfig, {
|
||||
path: '/auth/saml/callback'
|
||||
})
|
||||
}
|
||||
|
||||
passport.use(new SamlStrategy(samlConfig, verify))
|
||||
|
||||
app.use(passport.authenticate('saml', {
|
||||
|
||||
Reference in New Issue
Block a user