Documentation
¶
Overview ¶
Package authtest signs tokens the way Dex does, for tests.
Index ¶
- Constants
- func PersonClaims(email string, groups []string, exp time.Time) map[string]any
- func PersonSubject(email string) string
- func PrincipalClaims(clientID string, exp time.Time) map[string]any
- type Issuer
- func (i *Issuer) Discovery(jwksURL string) []byte
- func (i *Issuer) JWKS() []byte
- func (i *Issuer) Person(email string, groups []string, exp time.Time) string
- func (i *Issuer) Principal(clientID string, exp time.Time) string
- func (i *Issuer) Sign(claims map[string]any) string
- func (i *Issuer) Verifier(audience string, now func() time.Time) *auth.OIDCVerifier
Constants ¶
const ( IssuerURL = "https://dex.example.io" Audience = "beekeeper" )
The issuer and audience tests use.
Variables ¶
This section is empty.
Functions ¶
func PersonClaims ¶
PersonClaims are the claims of a person's token for Beekeeper.
func PersonSubject ¶
PersonSubject is a sub Dex could give a person signed in through a connector.
Types ¶
type Issuer ¶
type Issuer struct {
URL string
// contains filtered or unexported fields
}
Issuer signs tokens with its own key.