Documentation ¶
Index ¶
Constants ¶
View Source
const ( GoogleOpenIDConfigurationURI = "https://accounts.google.com/.well-known/openid-configuration" GoogleJWKSURI = "https://www.googleapis.com/oauth2/v3/certs" UseSignature = "sig" HeaderAlgorithm = "alg" HeaderKeyID = "kid" ClaimIssuer = "iss" ClaimAudience = "aud" ClaimSubject = "sub" ClaimExpiration = "exp" ClaimNotBefore = "nbf" ClaimIssuedAt = "iat" )
Variables ¶
Functions ¶
Types ¶
type JSONWebKey ¶
type JSONWebKey struct { KeyID string `json:"kid"` KeyType string `json:"kty"` Algorithm string `json:"alg"` Use string `json:"use"` N string `json:"n"` // modulus E string `json:"e"` // public exponent }
func GoogleWebKey ¶
func GoogleWebKey(client client.Getter, kid string) (JSONWebKey, error)
type JWKS ¶
type JWKS struct {
Keys []JSONWebKey `json:"keys"`
}
type OpenIDConfiguration ¶
type OpenIDConfiguration struct { Issuer string `json:"issuer"` AuthorizationEndpoint string `json:"authorization_endpoint"` DeviceAuthorizationEndpoint string `json:"device_authorization_endpoint"` TokenEndpoint string `json:"token_endpoint"` UserInfoEndpoint string `json:"userinfo_endpoint"` RevocationEndpoint string `json:"revocation_endpoint"` JWKS_URI string `json:"jwks_uri"` ResponseTypesSupported []string `json:"response_types_supported"` SubjectTypesSupported []string `json:"subject_types_supported"` IdTokenSigningAlgValuesSupported []string `json:"id_token_signing_alg_values_supported"` ScopesSupported []string `json:"scopes_supported"` TokenEndpointAuthMethodsSupported []string `json:"code_challenge_methods_supported"` GrantTypesSupported []string `json:"grant_types_supported"` }
func DiscoverConfiguration ¶
func DiscoverConfiguration(c client.Getter, url string) (OpenIDConfiguration, error)
See https://ldapwiki.com/wiki/Openid-configuration https://[base-server-url]/.well-known/openid-configuration
Click to show internal directories.
Click to hide internal directories.