Documentation
¶
Index ¶
Constants ¶
View Source
const ( RoleAdmin = config.AuthRoleAdmin RoleViewer = config.AuthRoleViewer )
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
Types ¶
type Authenticator ¶
type Authenticator struct {
// contains filtered or unexported fields
}
Authenticator validates Admin API bearer tokens.
func NewAuthenticator ¶
func NewAuthenticator(cfg config.AuthConfig) *Authenticator
NewAuthenticator builds an authenticator from config.
func (*Authenticator) Authenticate ¶
func (a *Authenticator) Authenticate(r *http.Request) (AuthInfo, bool)
Authenticate validates the Authorization header and returns caller info.
func (*Authenticator) Enabled ¶
func (a *Authenticator) Enabled() bool
Enabled returns whether authentication is enforced.
Click to show internal directories.
Click to hide internal directories.