Documentation
¶
Overview ¶
Package identitytest holds the conformance suite of identity.Authenticator and a signer of JWTs.
Index ¶
Constants ¶
const ( RepoA = "native:repo_A" RepoB = "native:repo_B" )
RepoA is the repository that the credentials of a fixture cover. RepoB is one that they do not cover.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Fixture ¶
type Fixture struct {
Auth identity.Authenticator
// Valid carries a credential that gives land on repo.
Valid func(repo string) *http.Request
// Expired carries a credential that gave land on repo and has expired.
Expired func(repo string) *http.Request
// Forged carries a credential that gives land on repo and is signed by a key that the Authenticator does not trust.
Forged func(repo string) *http.Request
// Revoked carries a credential that gave land on repo and was revoked. It is nil for a credential that cannot be revoked.
Revoked func(repo string) *http.Request
}
Fixture is an Authenticator and the requests that it must judge. Each request func returns a new request.