Moved v3 code from NginxProxyManager/nginx-proxy-manager-3 to NginxProxyManager/nginx-proxy-manager
This commit is contained in:
28
backend/internal/api/schema/get_token.go
Normal file
28
backend/internal/api/schema/get_token.go
Normal file
@ -0,0 +1,28 @@
|
||||
package schema
|
||||
|
||||
import "fmt"
|
||||
|
||||
// GetToken is the schema for incoming data validation
|
||||
// nolint: gosec
|
||||
func GetToken() string {
|
||||
stdField := stringMinMax(1, 255)
|
||||
return fmt.Sprintf(`
|
||||
{
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"type",
|
||||
"identity",
|
||||
"secret"
|
||||
],
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"pattern": "^password$"
|
||||
},
|
||||
"identity": %s,
|
||||
"secret": %s
|
||||
}
|
||||
}
|
||||
`, stdField, stdField)
|
||||
}
|
Reference in New Issue
Block a user