Documentation
¶
Overview ¶
Package authtest is a stand-in for the identity provider an API trusts, for the API's tests. It publishes discovery and a key set, grants client-credentials tokens, and signs RFC 9068 access tokens the way Authelia does: typed at+jwt, RS256, and with no subject on a service's token.
Index ¶
- func Bearer(token string) *http.Client
- type Provider
- func (p *Provider) Person(t testing.TB, clientID, subject string) string
- func (p *Provider) Register(clientID, secret string, scopes ...string)
- func (p *Provider) Sign(t testing.TB, typ string, claims map[string]any) string
- func (p *Provider) Verifier(t testing.TB, personPrefix, servicePrefix string) *goapiauth.Verifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Provider ¶
type Provider struct {
URL string
// contains filtered or unexported fields
}
Provider is a running stand-in. URL is its issuer.
func NewProvider ¶
NewProvider starts a provider that lives as long as t.
Click to show internal directories.
Click to hide internal directories.