mirror of
https://github.com/jc21/nginx-proxy-manager.git
synced 2024-08-30 18:22:48 +00:00
29 lines
470 B
Go
29 lines
470 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",
|
||
|
"pattern": "^password$"
|
||
|
},
|
||
|
"identity": %s,
|
||
|
"secret": %s
|
||
|
}
|
||
|
}
|
||
|
`, stdField, stdField)
|
||
|
}
|