Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Default = New(context.Background())
)
View Source
var ErrResponseIsNotCacheable = errors.New("discovery: response is not cacheable")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetProviderMetadata ¶
func (d *Client) GetProviderMetadata(ctx context.Context, providerMetadataURL ProviderMetadataURL) (*ProviderMetadata, error)
type ClientOption ¶
type ClientOption func(*Client)
func WithCacheStore ¶
func WithCacheStore(store *cache.Store[*ProviderMetadata]) ClientOption
func WithHTTPClient ¶
func WithHTTPClient(client *http.Client) ClientOption
type ProviderMetadata ¶
type ProviderMetadata struct { Issuer string `json:"issuer"` AuthorizationEndpoint string `json:"authorization_endpoint"` TokenEndpoint string `json:"token_endpoint,omitempty"` UserInfoEndpoint string `json:"userinfo_endpoint,omitempty"` JwksURI string `json:"jwks_uri"` RegistrationEndpoint string `json:"registration_endpoint,omitempty"` ScopesSupported []string `json:"scopes_supported,omitempty"` ResponseTypesSupported []string `json:"response_types_supported"` ResponseModesSupported []string `json:"response_modes_supported,omitempty"` GrantTypesSupported []string `json:"grant_types_supported,omitempty"` ACRValuesSupported []string `json:"acr_values_supported,omitempty"` SubjectTypesSupported []string `json:"subject_types_supported"` IDTokenSigningAlgValuesSupported []string `json:"id_token_signing_alg_values_supported"` IDTokenEncryptionAlgValuesSupported []string `json:"id_token_encryption_alg_values_supported,omitempty"` IDTokenEncryptionEncValuesSupported []string `json:"id_token_encryption_enc_values_supported,omitempty"` UserinfoSigningAlgValuesSupported []string `json:"userinfo_signing_alg_values_supported,omitempty"` UserinfoEncryptionAlgValuesSupported []string `json:"userinfo_encryption_alg_values_supported,omitempty"` UserinfoEncryptionEncValuesSupported []string `json:"userinfo_encryption_enc_values_supported,omitempty"` RequestObjectSigningAlgValuesSupported []string `json:"request_object_signing_alg_values_supported,omitempty"` RequestObjectEncryptionAlgValuesSupported []string `json:"request_object_encryption_alg_values_supported,omitempty"` RequestObjectEncryptionEncValuesSupported []string `json:"request_object_encryption_enc_values_supported,omitempty"` TokenEndpointAuthMethodsSupported []string `json:"token_endpoint_auth_methods_supported,omitempty"` TokenEndpointAuthSigningAlgValuesSupported []string `json:"token_endpoint_auth_signing_alg_values_supported,omitempty"` DisplayValuesSupported []string `json:"display_values_supported,omitempty"` ClaimTypesSupported []string `json:"claim_types_supported,omitempty"` ClaimsSupported []string `json:"claims_supported,omitempty"` ServiceDocumentation string `json:"service_documentation,omitempty"` ClaimsLocalesSupported []string `json:"claims_locales_supported,omitempty"` UILocalesSupported []string `json:"ui_locales_supported,omitempty"` ClaimsParameterSupported bool `json:"claims_parameter_supported,omitempty"` RequestParameterSupported bool `json:"request_parameter_supported,omitempty"` RequestURIParameterSupported bool `json:"request_uri_parameter_supported,omitempty"` RequireRequestURIRegistration bool `json:"require_request_uri_registration,omitempty"` OPPolicyURI string `json:"op_policy_uri,omitempty"` OPTosURI string `json:"op_tos_uri,omitempty"` }
https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata
func GetProviderMetadata ¶
func GetProviderMetadata(ctx context.Context, providerMetadataURL ProviderMetadataURL) (*ProviderMetadata, error)
type ProviderMetadataURL ¶
type ProviderMetadataURL = string
const ( Apple ProviderMetadataURL = "https://appleid.apple.com/.well-known/openid-configuration" GitHubActions ProviderMetadataURL = "https://token.actions.githubusercontent.com/.well-known/openid-configuration" Google ProviderMetadataURL = "https://accounts.google.com/.well-known/openid-configuration" LINE ProviderMetadataURL = "https://access.line.me/.well-known/openid-configuration" Microsoft ProviderMetadataURL = "https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration" Slack ProviderMetadataURL = "https://slack.com/.well-known/openid-configuration" Yahoo ProviderMetadataURL = "https://api.login.yahoo.com/.well-known/openid-configuration" YahooJapan ProviderMetadataURL = "https://auth.login.yahoo.co.jp/yconnect/v2/.well-known/openid-configuration" ProviderMetadataURLPath = "/.well-known/openid-configuration" )
Click to show internal directories.
Click to hide internal directories.