fix(xo-server-auth-iodc): fix empty usernames with default config

See https://xcp-ng.org/forum/post/59587
This commit is contained in:
Julien Fontanet 2023-03-13 12:00:43 +01:00
parent 35f6476d0f
commit 65168c8532
2 changed files with 5 additions and 2 deletions

View File

@ -13,6 +13,7 @@
- [Backup/Restore] Fix restore via a proxy showing as interupted (PR [#6702](https://github.com/vatesfr/xen-orchestra/pull/6702))
- [REST API] Backup logs are now available at `/rest/v0/backups/logs`
- [Plugin/auth-oidc] Fix empty user names when using default config [Forum#59587](https://xcp-ng.org/forum/post/59587)
### Packages to release
@ -32,6 +33,7 @@
- @xen-orchestra/backups minor
- xo-server minor
- xo-server-auth-oidc patch
- xo-web patch
<!--packages-end-->

View File

@ -20,11 +20,12 @@ exports.configurationSchema = {
advanced: {
title: 'Advanced',
type: 'object',
default: {},
properties: {
authorizationURL: { title: 'Authorization URL', type: 'string' },
callbackURL: {
description: 'Default to https://<xo.company.net>/signin/oidc/callback`.',
title: 'Callback URL',
default: '/signin/oidc/callback',
type: 'string',
},
issuer: { title: 'Issuer', type: 'string' },
@ -55,7 +56,7 @@ class AuthOidc {
}
async configure({ advanced, ...conf }, { loaded }) {
this.#conf = { callbackURL: '/signin/oidc/callback', ...advanced, ...conf }
this.#conf = { ...advanced, ...conf }
if (loaded) {
await this.unload()