add saml audience option and manage required options (#843)

Signed-off-by: Denis barbaron <denis.barbaron@orange.com>
This commit is contained in:
Denis Barbaron
2025-03-03 16:46:01 +01:00
committed by GitHub
parent 29ce6e3bbb
commit 9de3828158
3 changed files with 13 additions and 13 deletions

View File

@@ -34,16 +34,23 @@ module.exports.builder = function(yargs) {
, default: process.env.SAML_ID_PROVIDER_ISSUER
, demand: true
})
.option('saml-id-provider-audience', {
describe: 'SAML 2.0 identity provider audience.'
, type: 'string'
, default: process.env.SAML_ID_PROVIDER_AUDIENCE
})
.option('saml-id-provider-cert-path', {
describe: 'SAML 2.0 identity provider certificate file path.'
, type: 'string'
, default: process.env.SAML_ID_PROVIDER_CERT_PATH
, demand: true
})
.option('saml-id-provider-callback-url', {
describe: 'SAML 2.0 identity provider callback URL ' +
'in the form of scheme://host[:port]/auth/saml/callback.'
, type: 'string'
, default: process.env.SAML_ID_PROVIDER_CALLBACK_URL
, demand: true
})
.option('saml-id-provider-want-assertions-signed', {
describe: 'SAML 2.0 identity provider want assertions signed.'
@@ -91,6 +98,7 @@ module.exports.handler = function(argv) {
, callbackUrl: argv.samlIdProviderCallbackUrl
, wantAssertionsSigned: argv.samlIdProviderWantAssertionsSigned
, wantAuthnResponseSigned: argv.samlIdProviderWantAuthnResponseSigned
, audience: argv.samlIdProviderAudience
}
})
}