mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2025-10-28 12:45:47 +00:00
feat: header based acls (#337)
* feat: add header decoder * feat: allow for dash substitute over slash for environments like kubernetes * feat: use decoded headers in proxy controller * refactor: simplify decode header to node function * refactor: use stdlib prefix check in header decoder * fix: lowercase key and filter before comparing
This commit is contained in:
@@ -123,53 +123,53 @@ type RedirectQuery struct {
|
||||
RedirectURI string `url:"redirect_uri"`
|
||||
}
|
||||
|
||||
// Labels
|
||||
// App config
|
||||
|
||||
type Labels struct {
|
||||
Apps map[string]AppLabels
|
||||
type AppConfigs struct {
|
||||
Apps map[string]App
|
||||
}
|
||||
|
||||
type AppLabels struct {
|
||||
Config ConfigLabels
|
||||
Users UsersLabels
|
||||
OAuth OAuthLabels
|
||||
IP IPLabels
|
||||
Response ResponseLabels
|
||||
Path PathLabels
|
||||
type App struct {
|
||||
Config AppConfig
|
||||
Users AppUsers
|
||||
OAuth AppOAuth
|
||||
IP AppIP
|
||||
Response AppResponse
|
||||
Path AppPath
|
||||
}
|
||||
|
||||
type ConfigLabels struct {
|
||||
type AppConfig struct {
|
||||
Domain string
|
||||
}
|
||||
|
||||
type UsersLabels struct {
|
||||
type AppUsers struct {
|
||||
Allow string
|
||||
Block string
|
||||
}
|
||||
|
||||
type OAuthLabels struct {
|
||||
type AppOAuth struct {
|
||||
Whitelist string
|
||||
Groups string
|
||||
}
|
||||
|
||||
type IPLabels struct {
|
||||
type AppIP struct {
|
||||
Allow []string
|
||||
Block []string
|
||||
Bypass []string
|
||||
}
|
||||
|
||||
type ResponseLabels struct {
|
||||
type AppResponse struct {
|
||||
Headers []string
|
||||
BasicAuth BasicAuthLabels
|
||||
BasicAuth AppBasicAuth
|
||||
}
|
||||
|
||||
type BasicAuthLabels struct {
|
||||
type AppBasicAuth struct {
|
||||
Username string
|
||||
Password string
|
||||
PasswordFile string
|
||||
}
|
||||
|
||||
type PathLabels struct {
|
||||
type AppPath struct {
|
||||
Allow string
|
||||
Block string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user