1
0
mirror of https://github.com/NginxProxyManager/nginx-proxy-manager.git synced 2025-07-13 16:21:46 +03:00
Files
nginx-proxy-manager/backend/internal/api/schema/get_token.go
2024-11-02 21:36:07 +10:00

29 lines
480 B
Go

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",
"enum": ["local", "ldap", "oidc"]
},
"identity": %s,
"secret": %s
}
}
`, stdField, stdField)
}