Documentation
¶
Index ¶
- type Grant
- type Issuer
- func (i *Issuer) ClientID() string
- func (i *Issuer) Code(grant Grant) string
- func (i *Issuer) FailExchange(subject string)
- func (i *Issuer) FailKeySet(status int)
- func (i *Issuer) PadKeySet(size int)
- func (i *Issuer) RedirectURI(subject string) string
- func (i *Issuer) Requests(path string) int
- func (i *Issuer) RotateKey() error
- func (i *Issuer) Settings() map[string]any
- func (i *Issuer) Start(_ context.Context, injector do.Injector) error
- func (i *Issuer) Stop(context.Context) error
- func (i *Issuer) URL() string
- type Option
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Grant ¶
type Grant struct {
User User
Nonce string
CodeChallenge string
RedirectURI string
// A nil value removes the claim.
IDTokenClaims map[string]any
UserInfoClaims map[string]any
OmitIDToken bool
IDTokenForeignKey bool
UserInfoSubject string
UserInfoStatus int
UserInfoBody string
SignUserInfo bool
UserInfoForeignKey bool
UserInfoAlgorithm jose.SignatureAlgorithm
}
type Issuer ¶
type Issuer struct {
// contains filtered or unexported fields
}
func (*Issuer) FailExchange ¶
FailExchange answers the code exchanges of the subject with status 503 and temporarily_unavailable.
func (*Issuer) FailKeySet ¶
FailKeySet answers the JWKS with the status. Status 0 serves the keys again.
func (*Issuer) PadKeySet ¶
PadKeySet adds a member of the size in bytes to the JWKS. Size 0 removes it.
func (*Issuer) RedirectURI ¶
RedirectURI returns the redirect_uri of the last code exchange of the subject.
func (*Issuer) Requests ¶
Requests returns the number of requests the issuer received on the path, such as "/jwks".
type Option ¶
type Option func(*options)
func WithListedAlgorithms ¶
WithListedAlgorithms replaces id_token_signing_alg_values_supported of the discovery document, which lists the signing algorithm by default.
func WithListedUserInfoAlgorithms ¶
WithListedUserInfoAlgorithms sets userinfo_signing_alg_values_supported of the discovery document, which leaves it out by default.
func WithRedirectURIs ¶
func WithSigningAlgorithm ¶
func WithSigningAlgorithm(algorithm jose.SignatureAlgorithm) Option
WithSigningAlgorithm signs the tokens with the algorithm, RS256 by default. ES256 signs with an EC P-256 key, and RS* and PS* sign with an RSA key. New panics for any other algorithm.