Documentation ¶
Overview ¶
Package token : hold token configurations to check sing HTTP Header.
license: Apache license 2.0 copyright: Nobuyuki Matsui <nobuyuki.matsui@gmail.com>
Index ¶
- Constants
- type Holder
- func (holder *Holder) GetAllowedPaths(host string, token string) []*regexp.Regexp
- func (holder *Holder) GetBasicAuthConf(host string) map[string]map[string]string
- func (holder *Holder) GetHosts() []string
- func (holder *Holder) GetNoAuthPaths(host string) []string
- func (holder *Holder) GetTokens(host string) []string
- func (holder *Holder) HasToken(host string, token string) bool
Constants ¶
View Source
const AuthTokens = "AUTH_TOKENS"
AuthTokens : AUTH_TOKENS is an environment vairable name to set token configurations.
View Source
const AuthTokensPath = "AUTH_TOKENS_PATH"
AuthTokensPath : AUTH_TOKENS_PATH is an environment vairable name to set the file path of token configurations file.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Holder ¶
type Holder struct {
// contains filtered or unexported fields
}
Holder : a struct to hold token configurations.
Holder construct token configurations from "AUTH_TOKEN" environment variable.
func (*Holder) GetAllowedPaths ¶
GetAllowedPaths : get all allowed paths associated with the bearer token.
func (*Holder) GetBasicAuthConf ¶
GetBasicAuthConf : get all configurations of basic authentication associated with the host.
func (*Holder) GetNoAuthPaths ¶
GetNoAuthPaths : get all allowed paths without authentication associated with the host.
Click to show internal directories.
Click to hide internal directories.