Documentation ¶
Index ¶
- Variables
- func ExtractClaimFromToken(token string, claim string) (string, error)
- func ExtractJWKSPublicKey(ctx context.Context, jwks jwk.Set, tokenKid string) (*rsa.PublicKey, error)
- func FetchJWKS(ctx context.Context, url string) (*jwk.Set, error)
- func GetJWKS(ctx context.Context, issuer string) (jwk.Set, error)
- func IsAuthenticated(ctx context.Context) bool
- func PublicKeyForIssuer(ctx context.Context, issuerUri string, tokenKid string) (*rsa.PublicKey, error)
- func RegisterAndFetchJWKS(ctx context.Context, issuer string, url string) (*jwk.Set, error)
- func WithIdentity(ctx context.Context, identity *Identity) context.Context
- type HTTPClient
- type Identity
- type OpenidConfig
- type UserInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ( HttpClient HTTPClient RequestCache *cache.Cache JwkCache *jwk.Cache )
Functions ¶
func ExtractClaimFromToken ¶ added in v0.372.0
func ExtractJWKSPublicKey ¶
func IsAuthenticated ¶ added in v0.368.0
func PublicKeyForIssuer ¶
func RegisterAndFetchJWKS ¶ added in v0.368.0
Types ¶
type HTTPClient ¶
type Identity ¶ added in v0.368.0
type OpenidConfig ¶
type OpenidConfig struct { Issuer string `json:"issuer"` AuthURL string `json:"authorization_endpoint"` TokenURL string `json:"token_endpoint"` JWKSURL string `json:"jwks_uri"` UserInfoURL string `json:"userinfo_endpoint"` Algorithms []string `json:"id_token_signing_alg_values_supported"` }
func GetOpenIDConnectConfig ¶
func GetOpenIDConnectConfig(ctx context.Context, issuer string) (*OpenidConfig, error)
type UserInfo ¶
type UserInfo struct { Subject string `json:"sub"` Profile string `json:"profile"` Email string `json:"email"` EmailVerified bool `json:"email_verified"` // OIDC Standard claims (non-exhaustive) GivenName string `json:"given_name"` FamilyName string `json:"family_name"` Name string `json:"name"` Picture string `json:"picture"` Gender string `json:"gender"` Zoneinfo string `json:"zoneinfo"` Locale string `json:"locale"` UpdatedAt string `json:"updated_at"` Claims []byte }
Click to show internal directories.
Click to hide internal directories.