Documentation ¶
Overview ¶
Package oauth contains rpc AuthHandler for oauth/oidc JWT tokens.
Index ¶
Constants ¶
View Source
const ( // CredentialsTypeOAuthWeb for jwt access tokens signed by oidc/oauth backend. CredentialsTypeOAuthWeb = rpc.CredentialsType("oauth-web-auth") )
Variables ¶
This section is empty.
Functions ¶
func WithWebOAuthTokenAuthHandler ¶
func WithWebOAuthTokenAuthHandler(opts WebOAuthOptions) rpc.ServerOption
WithWebOAuthTokenAuthHandler returns a rpc server option configured for the AuthHandler. The WebAuth handler will validate jwt access tokens signed by OIDC provider. The jwts are validated for the aud standard claim.
This allows auth handler allows for a dynamic set of signing keys provided through OIDC configuration endpoint.
Entity verification is deleged to the EntityVerifier method in the options.
Types ¶
type WebOAuthOptions ¶
type WebOAuthOptions struct { // Audience claim that must be within the "aud" JWT claims presented. AllowedAudiences []string // Key provider used to provide public keys to validate the jwt basid on its "kid" header. KeyProvider jwks.KeyProvider // Underlying Entity verifier after EntityVerifier func(ctx context.Context, entity string) (interface{}, error) Logger golog.Logger }
WebOAuthOptions options for the WebOauth handler.
Click to show internal directories.
Click to hide internal directories.