mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 15:53:23 +02:00
add saml audience option and manage required options (#843)
Signed-off-by: Denis barbaron <denis.barbaron@orange.com>
This commit is contained in:
@@ -52,22 +52,13 @@ module.exports = function(options) {
|
||||
, issuer: options.saml.issuer
|
||||
, wantAssertionsSigned: options.saml.wantAssertionsSigned
|
||||
, wantAuthnResponseSigned: options.saml.wantAuthnResponseSigned
|
||||
, callbackUrl: options.saml.callbackUrl
|
||||
, idpCert: fs.readFileSync(options.saml.certPath).toString()
|
||||
}
|
||||
|
||||
if (options.saml.certPath) {
|
||||
if (options.saml.audience) {
|
||||
samlConfig = _.merge(samlConfig, {
|
||||
idpCert: fs.readFileSync(options.saml.certPath).toString()
|
||||
})
|
||||
}
|
||||
|
||||
if (options.saml.callbackUrl) {
|
||||
samlConfig = _.merge(samlConfig, {
|
||||
callbackUrl: options.saml.callbackUrl
|
||||
})
|
||||
}
|
||||
else {
|
||||
samlConfig = _.merge(samlConfig, {
|
||||
path: '/auth/saml/callback'
|
||||
audience: options.saml.audience
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user