feat(auth-ldap): support strategyOptions from static config

This commit is contained in:
Julien Fontanet 2020-04-06 15:17:14 +02:00
parent a16c55c679
commit 2b8e9bf887
2 changed files with 5 additions and 1 deletions

View File

@ -10,6 +10,7 @@
- [VDI migration]
- Remove 'Migrate all VDIs' checkbox (PR [#4876](https://github.com/vatesfr/xen-orchestra/pull/4876))
- [VM/disks]: Add bulk migration (PR [#4877](https://github.com/vatesfr/xen-orchestra/pull/4877))
- [SAML] Possibility to pass [settings to the underlying library](https://github.com/bergie/passport-saml#config-parameter-details) via the `plugins.auth-saml.strategyOptions` section in `xo-server`'s configuration file
### Bug fixes
@ -25,6 +26,7 @@
>
> Rule of thumb: add packages on top.
- xo-server-saml minor
- xo-server-audit minor
- xo-server minor
- xo-web minor

View File

@ -47,8 +47,9 @@ You should try \`http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddr
// ===================================================================
class AuthSamlXoPlugin {
constructor({ xo }) {
constructor({ staticConfig, xo }) {
this._conf = null
this._strategyOptions = staticConfig.strategyOptions
this._unregisterPassportStrategy = undefined
this._usernameField = null
this._xo = xo
@ -57,6 +58,7 @@ class AuthSamlXoPlugin {
async configure({ usernameField, ...conf }, { loaded }) {
this._usernameField = usernameField
this._conf = {
...this._strategyOptions,
...DEFAULTS,
...conf,