mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-05-13 15:01:29 +00:00
Merge a6848065e1 into 47ea6b5092
This commit is contained in:
commit
ffc5ea37ed
22 changed files with 3370 additions and 580 deletions
|
|
@ -83,6 +83,10 @@ class ServerSettings {
|
|||
this.authOpenIDGroupClaim = ''
|
||||
this.authOpenIDAdvancedPermsClaim = ''
|
||||
this.authOpenIDSubfolderForRedirectURLs = undefined
|
||||
this.authOpenIDScopes = 'openid profile email'
|
||||
this.authOpenIDGroupMap = {}
|
||||
this.authOpenIDRequireVerifiedEmail = false
|
||||
this.authOpenIDBackchannelLogoutEnabled = false
|
||||
|
||||
if (settings) {
|
||||
this.construct(settings)
|
||||
|
|
@ -147,6 +151,10 @@ class ServerSettings {
|
|||
this.authOpenIDGroupClaim = settings.authOpenIDGroupClaim || ''
|
||||
this.authOpenIDAdvancedPermsClaim = settings.authOpenIDAdvancedPermsClaim || ''
|
||||
this.authOpenIDSubfolderForRedirectURLs = settings.authOpenIDSubfolderForRedirectURLs
|
||||
this.authOpenIDScopes = settings.authOpenIDScopes || 'openid profile email'
|
||||
this.authOpenIDGroupMap = settings.authOpenIDGroupMap || {}
|
||||
this.authOpenIDRequireVerifiedEmail = !!settings.authOpenIDRequireVerifiedEmail
|
||||
this.authOpenIDBackchannelLogoutEnabled = !!settings.authOpenIDBackchannelLogoutEnabled
|
||||
|
||||
if (!Array.isArray(this.authActiveAuthMethods)) {
|
||||
this.authActiveAuthMethods = ['local']
|
||||
|
|
@ -256,7 +264,11 @@ class ServerSettings {
|
|||
authOpenIDMobileRedirectURIs: this.authOpenIDMobileRedirectURIs, // Do not return to client
|
||||
authOpenIDGroupClaim: this.authOpenIDGroupClaim, // Do not return to client
|
||||
authOpenIDAdvancedPermsClaim: this.authOpenIDAdvancedPermsClaim, // Do not return to client
|
||||
authOpenIDSubfolderForRedirectURLs: this.authOpenIDSubfolderForRedirectURLs
|
||||
authOpenIDSubfolderForRedirectURLs: this.authOpenIDSubfolderForRedirectURLs,
|
||||
authOpenIDScopes: this.authOpenIDScopes,
|
||||
authOpenIDGroupMap: this.authOpenIDGroupMap,
|
||||
authOpenIDRequireVerifiedEmail: this.authOpenIDRequireVerifiedEmail,
|
||||
authOpenIDBackchannelLogoutEnabled: this.authOpenIDBackchannelLogoutEnabled
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -268,6 +280,9 @@ class ServerSettings {
|
|||
delete json.authOpenIDMobileRedirectURIs
|
||||
delete json.authOpenIDGroupClaim
|
||||
delete json.authOpenIDAdvancedPermsClaim
|
||||
delete json.authOpenIDScopes
|
||||
delete json.authOpenIDGroupMap
|
||||
delete json.authOpenIDRequireVerifiedEmail
|
||||
return json
|
||||
}
|
||||
|
||||
|
|
@ -282,29 +297,42 @@ class ServerSettings {
|
|||
return this.authOpenIDIssuerURL && this.authOpenIDAuthorizationURL && this.authOpenIDTokenURL && this.authOpenIDUserInfoURL && this.authOpenIDJwksURL && this.authOpenIDClientID && this.authOpenIDClientSecret && this.authOpenIDTokenSigningAlgorithm
|
||||
}
|
||||
|
||||
get authenticationSettings() {
|
||||
/**
|
||||
* All OIDC-related setting keys (values only, for admin API)
|
||||
*/
|
||||
get openIDSettingsValues() {
|
||||
return {
|
||||
authLoginCustomMessage: this.authLoginCustomMessage,
|
||||
authActiveAuthMethods: this.authActiveAuthMethods,
|
||||
authOpenIDIssuerURL: this.authOpenIDIssuerURL,
|
||||
authOpenIDAuthorizationURL: this.authOpenIDAuthorizationURL,
|
||||
authOpenIDTokenURL: this.authOpenIDTokenURL,
|
||||
authOpenIDUserInfoURL: this.authOpenIDUserInfoURL,
|
||||
authOpenIDJwksURL: this.authOpenIDJwksURL,
|
||||
authOpenIDLogoutURL: this.authOpenIDLogoutURL,
|
||||
authOpenIDClientID: this.authOpenIDClientID, // Do not return to client
|
||||
authOpenIDClientSecret: this.authOpenIDClientSecret, // Do not return to client
|
||||
authOpenIDClientID: this.authOpenIDClientID,
|
||||
authOpenIDClientSecret: this.authOpenIDClientSecret,
|
||||
authOpenIDTokenSigningAlgorithm: this.authOpenIDTokenSigningAlgorithm,
|
||||
authOpenIDButtonText: this.authOpenIDButtonText,
|
||||
authOpenIDAutoLaunch: this.authOpenIDAutoLaunch,
|
||||
authOpenIDAutoRegister: this.authOpenIDAutoRegister,
|
||||
authOpenIDMatchExistingBy: this.authOpenIDMatchExistingBy,
|
||||
authOpenIDMobileRedirectURIs: this.authOpenIDMobileRedirectURIs, // Do not return to client
|
||||
authOpenIDGroupClaim: this.authOpenIDGroupClaim, // Do not return to client
|
||||
authOpenIDAdvancedPermsClaim: this.authOpenIDAdvancedPermsClaim, // Do not return to client
|
||||
authOpenIDMobileRedirectURIs: this.authOpenIDMobileRedirectURIs,
|
||||
authOpenIDGroupClaim: this.authOpenIDGroupClaim,
|
||||
authOpenIDAdvancedPermsClaim: this.authOpenIDAdvancedPermsClaim,
|
||||
authOpenIDSubfolderForRedirectURLs: this.authOpenIDSubfolderForRedirectURLs,
|
||||
authOpenIDScopes: this.authOpenIDScopes,
|
||||
authOpenIDGroupMap: this.authOpenIDGroupMap,
|
||||
authOpenIDRequireVerifiedEmail: this.authOpenIDRequireVerifiedEmail,
|
||||
authOpenIDBackchannelLogoutEnabled: this.authOpenIDBackchannelLogoutEnabled
|
||||
}
|
||||
}
|
||||
|
||||
authOpenIDSamplePermissions: User.getSampleAbsPermissions()
|
||||
get authenticationSettings() {
|
||||
return {
|
||||
authLoginCustomMessage: this.authLoginCustomMessage,
|
||||
authActiveAuthMethods: this.authActiveAuthMethods,
|
||||
openIDSettings: {
|
||||
values: this.openIDSettingsValues
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue