mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-07-04 17:06:49 +00:00
Adds LDAP auth support
This commit is contained in:
@ -64,6 +64,9 @@ const anyType = `
|
||||
},
|
||||
{
|
||||
"type": "integer"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -16,7 +16,6 @@ func CreateUser() string {
|
||||
],
|
||||
"properties": {
|
||||
"name": %s,
|
||||
"nickname": %s,
|
||||
"email": %s,
|
||||
"is_disabled": {
|
||||
"type": "boolean"
|
||||
@ -30,7 +29,7 @@ func CreateUser() string {
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"pattern": "^password$"
|
||||
"pattern": "^local$"
|
||||
},
|
||||
"secret": %s
|
||||
}
|
||||
@ -38,5 +37,5 @@ func CreateUser() string {
|
||||
"capabilities": %s
|
||||
}
|
||||
}
|
||||
`, stringMinMax(2, 100), stringMinMax(2, 100), stringMinMax(5, 150), stringMinMax(8, 255), capabilties())
|
||||
`, stringMinMax(2, 50), stringMinMax(5, 150), stringMinMax(8, 255), capabilties())
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ func GetToken() string {
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"pattern": "^password$"
|
||||
"enum": ["local", "ldap", "oidc"]
|
||||
},
|
||||
"identity": %s,
|
||||
"secret": %s
|
||||
|
@ -3,6 +3,7 @@ package schema
|
||||
import "fmt"
|
||||
|
||||
// SetAuth is the schema for incoming data validation
|
||||
// Only local auth is supported for setting a password
|
||||
func SetAuth() string {
|
||||
return fmt.Sprintf(`
|
||||
{
|
||||
@ -15,7 +16,7 @@ func SetAuth() string {
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"pattern": "^password$"
|
||||
"pattern": "^local$"
|
||||
},
|
||||
"secret": %s,
|
||||
"current_secret": %s
|
||||
|
@ -11,7 +11,6 @@ func UpdateUser() string {
|
||||
"minProperties": 1,
|
||||
"properties": {
|
||||
"name": %s,
|
||||
"nickname": %s,
|
||||
"email": %s,
|
||||
"is_disabled": {
|
||||
"type": "boolean"
|
||||
@ -19,5 +18,5 @@ func UpdateUser() string {
|
||||
"capabilities": %s
|
||||
}
|
||||
}
|
||||
`, stringMinMax(2, 100), stringMinMax(2, 100), stringMinMax(5, 150), capabilties())
|
||||
`, stringMinMax(2, 50), stringMinMax(5, 150), capabilties())
|
||||
}
|
||||
|
Reference in New Issue
Block a user