mirror of
				https://github.com/steveiliop56/tinyauth.git
				synced 2025-11-04 08:05:42 +00:00 
			
		
		
		
	feat: allow or block an ip/range of ips using labels
This commit is contained in:
		@@ -21,6 +21,7 @@ type UnauthorizedQuery struct {
 | 
			
		||||
	Username string `url:"username"`
 | 
			
		||||
	Resource string `url:"resource"`
 | 
			
		||||
	GroupErr bool   `url:"groupErr"`
 | 
			
		||||
	IP       string `url:"ip"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Proxy is the uri parameters for the proxy endpoint
 | 
			
		||||
 
 | 
			
		||||
@@ -105,6 +105,12 @@ type BasicLabels struct {
 | 
			
		||||
	Password string
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// IP labels for a tinyauth protected container
 | 
			
		||||
type IPLabels struct {
 | 
			
		||||
	Allow []string
 | 
			
		||||
	Block []string
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Labels is a struct that contains the labels for a tinyauth protected container
 | 
			
		||||
type Labels struct {
 | 
			
		||||
	Users   string
 | 
			
		||||
@@ -113,4 +119,5 @@ type Labels struct {
 | 
			
		||||
	Domain  string
 | 
			
		||||
	Basic   BasicLabels
 | 
			
		||||
	OAuth   OAuthLabels
 | 
			
		||||
	IP      IPLabels
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user