Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClaimsFromContext ¶
ClaimsFromContext returns the claims for the given request context
func RawIDTokenFromContext ¶
RawIDTokenFromContext returns the raw JWT from the given request context
func TokenSourceFromContext ¶
func TokenSourceFromContext(ctx context.Context) oidc.TokenSource
TokenSourceFromContext returns a usable tokensource from this request context. The request must have been wrapped with the middleware for this to be initialized. This token source is
Types ¶
type Handler ¶
type Handler struct {
// Issuer is the URL to the OIDC issuer
Issuer string
// ClientID is a client ID for the relying party (the service authenticating
// against the OIDC server)
ClientID string
// ClientSecret is a client secret for the relying party
ClientSecret string
// BaseURL is the base URL for this relying party. If it is not safe to
// redirect the user to their original destination, they will be redirected
// to this URL.
BaseURL string
// RedirectURL is the callback URL registered with the OIDC issuer for this
// relying party
RedirectURL string
// AdditionalScopes is a list of scopes to request from the OIDC server, in
// addition to the base oidc scope.
AdditionalScopes []string
// ACRValues to request from the remote server. The handler validates that
// the returned token contains one of these.
ACRValues []string
// SessionStore is used to persist token information across requests. It
// must support sufficient storage for the ID and any refresh tokens. This
// must be provided.
SessionStore sessions.Store
// SessionName is a name used for the session. If empty, a default session
// name is used.
SessionName string
// contains filtered or unexported fields
}
Handler wraps another http.Handler, protecting it with OIDC authentication.
Click to show internal directories.
Click to hide internal directories.