mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-27 03:31:46 +00:00
Forward Auth refactor and adding PROXY_FORWARD_AUTH_LOGOUT_URI env
This commit is contained in:
parent
8558baf30a
commit
73a61872fa
9 changed files with 139 additions and 68 deletions
|
|
@ -23,6 +23,9 @@ class User {
|
|||
this.librariesAccessible = [] // Library IDs (Empty if ALL libraries)
|
||||
this.itemTagsAccessible = [] // Empty if ALL item tags accessible
|
||||
|
||||
// Temporary values not persisted to the Db
|
||||
this.isForwardAuth = false
|
||||
|
||||
if (user) {
|
||||
this.construct(user)
|
||||
}
|
||||
|
|
@ -102,7 +105,7 @@ class User {
|
|||
}
|
||||
|
||||
toJSONForBrowser() {
|
||||
return {
|
||||
const json = {
|
||||
id: this.id,
|
||||
username: this.username,
|
||||
type: this.type,
|
||||
|
|
@ -117,8 +120,15 @@ class User {
|
|||
settings: this.settings, // TODO: Remove after mobile release v0.9.61-beta
|
||||
permissions: this.permissions,
|
||||
librariesAccessible: [...this.librariesAccessible],
|
||||
itemTagsAccessible: [...this.itemTagsAccessible]
|
||||
itemTagsAccessible: [...this.itemTagsAccessible],
|
||||
isForwardAuth: this.isForwardAuth
|
||||
}
|
||||
|
||||
if (this.isForwardAuth) {
|
||||
json.forwardAuthLogoutURI = global.ForwardAuth.LogoutURI || null
|
||||
}
|
||||
|
||||
return json
|
||||
}
|
||||
|
||||
// Data broadcasted
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue