Documentation ¶
Index ¶
- type AuthServer
- func (as *AuthServer) Authenticate(ar *authRequest) (bool, error)
- func (as *AuthServer) Authorize(ar *authRequest) ([]authzResult, error)
- func (as *AuthServer) CreateToken(ar *authRequest, ares []authzResult) (string, error)
- func (as *AuthServer) ParseRequest(req *http.Request) (*authRequest, error)
- func (as *AuthServer) ServeHTTP(rw http.ResponseWriter, req *http.Request)
- func (as *AuthServer) Stop()
- type Config
- type ServerConfig
- type TokenConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthServer ¶
type AuthServer struct {
// contains filtered or unexported fields
}
func NewAuthServer ¶
func NewAuthServer(c *Config) (*AuthServer, error)
func (*AuthServer) Authenticate ¶
func (as *AuthServer) Authenticate(ar *authRequest) (bool, error)
func (*AuthServer) Authorize ¶
func (as *AuthServer) Authorize(ar *authRequest) ([]authzResult, error)
func (*AuthServer) CreateToken ¶
func (as *AuthServer) CreateToken(ar *authRequest, ares []authzResult) (string, error)
https://github.com/docker/distribution/blob/master/docs/spec/auth/token.md#example
func (*AuthServer) ParseRequest ¶
func (as *AuthServer) ParseRequest(req *http.Request) (*authRequest, error)
func (*AuthServer) ServeHTTP ¶
func (as *AuthServer) ServeHTTP(rw http.ResponseWriter, req *http.Request)
func (*AuthServer) Stop ¶
func (as *AuthServer) Stop()
type Config ¶
type Config struct { Server ServerConfig `yaml:"server"` Token TokenConfig `yaml:"token"` Users map[string]*authn.Requirements `yaml:"users,omitempty"` GoogleAuth *authn.GoogleAuthConfig `yaml:"google_auth,omitempty"` GitHubAuth *authn.GitHubAuthConfig `yaml:"github_auth,omitempty"` LDAPAuth *authn.LDAPAuthConfig `yaml:"ldap_auth,omitempty"` MongoAuth *authn.MongoAuthConfig `yaml:"mongo_auth,omitempty"` ExtAuth *authn.ExtAuthConfig `yaml:"ext_auth,omitempty"` ACL authz.ACL `yaml:"acl,omitempty"` ACLMongo *authz.ACLMongoConfig `yaml:"acl_mongo,omitempty"` }
func LoadConfig ¶
type ServerConfig ¶
Click to show internal directories.
Click to hide internal directories.