Documentation
¶
Overview ¶
Package template is an internal package that provides primitives for Caddy replacer replaced values.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ExpectedAudienceError ¶
ExpectedAudienceError is returned when the audience of the ID token does not match the expected audience.
func (ExpectedAudienceError) Error ¶
func (err ExpectedAudienceError) Error() string
type OAuth2ConfigTemplate ¶
type OAuth2ConfigTemplate struct {
TemplateClientID string
TemplateClientSecret string
Endpoint oauth2.Endpoint
Scopes []string
}
OAuth2ConfigTemplate stores a baseline oauth2.Config constructed through OIDC Discovery. Select fields are then replaced at request time with Caddy replacer values.
type ReplacerTokenVerifier ¶
type ReplacerTokenVerifier struct {
// contains filtered or unexported fields
}
ReplacerTokenVerifier wraps the behavior of the oidc.IDTokenVerifier so that the client ID (audience) is verified using a request-time replaced value.
func NewReplacerTokenVerifierFromProvider ¶
func NewReplacerTokenVerifierFromProvider(clientID string, provider *oidc.Provider) *ReplacerTokenVerifier
NewReplacerTokenVerifierFromProvider returns a new ReplacerTokenVerifier from the provided oidc.Provider, configuring the verifier to skip client ID check in favor of a request-time replaced client ID.