You've already forked nginx-proxy-manager
							
							
				mirror of
				https://github.com/NginxProxyManager/nginx-proxy-manager.git
				synced 2025-10-30 18:05:34 +03: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)
 | |
| }
 |