Documentation
¶
Overview ¶
Package identity maps the credential of a request to the claims of a caller token.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Allows ¶
Allows reports whether the rules let subject land on repo. An email is not case sensitive, so with email true the match ignores case. Any other claim is an opaque identifier and matches exactly.
Types ¶
type Authenticator ¶
Authenticator reads the credential of r and returns the claims that it gives. repo is the repository text that the call names, empty when the call names none. A credential that is missing, forged, expired or not allowed for repo answers token.ErrToken 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 token.ErrToken when none gives any. It skips a nil member.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package bearer authenticates a request by a signed caller token in the header Authorization.
|
Package bearer authenticates a request by a signed caller token in the header Authorization. |
|
Package identitytest holds the conformance suite of identity.Authenticator and a signer of JWTs.
|
Package identitytest holds the conformance suite of identity.Authenticator and a signer of JWTs. |
|
Package oidc authenticates a request by a signed OIDC JWT from any issuer, and maps a claim of the JWT to the scope land on a repository with rules.
|
Package oidc authenticates a request by a signed OIDC JWT from any issuer, and maps a claim of the JWT to the scope land on a repository with rules. |
|
Package usertoken authenticates a request by a per-user token that an operator issued.
|
Package usertoken authenticates a request by a per-user token that an operator issued. |