Documentation
¶
Overview ¶
Package access turns the credential of a request into the claims of a grant.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶
Authenticator reads the credential of r and returns the claims that it gives. repo is the repository text that the route names, empty for a route with none. A credential that is missing, forged, expired or not allowed for repo answers grant.ErrGrant and nothing else. The claims never hold a scope above what the credential gives.
func Chain ¶
func Chain(auths ...Authenticator) Authenticator
Chain returns an Authenticator that answers with the first claims that one of auths gives, and grant.ErrGrant when none gives any.
type Grant ¶
type Grant struct {
Verifier *grant.Verifier
Now func() time.Time
Token func(*http.Request) string
}
Grant verifies the grant that Token reads from the request.