discovery

package
v0.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package discovery provides a handler for the OIDC discovery endpoint.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(issuerURL string) http.Handler

NewHandler returns an http.Handler that serves an OIDC discovery endpoint.

Types

type Metadata

type Metadata struct {
	Issuer string `json:"issuer"`

	AuthorizationEndpoint string `json:"authorization_endpoint"`
	TokenEndpoint         string `json:"token_endpoint"`
	JWKSURI               string `json:"jwks_uri"`

	ResponseTypesSupported           []string `json:"response_types_supported"`
	ResponseModesSupported           []string `json:"response_modes_supported"`
	SubjectTypesSupported            []string `json:"subject_types_supported"`
	IDTokenSigningAlgValuesSupported []string `json:"id_token_signing_alg_values_supported"`

	TokenEndpointAuthMethodsSupported []string `json:"token_endpoint_auth_methods_supported"`
	ScopesSupported                   []string `json:"scopes_supported"`
	ClaimsSupported                   []string `json:"claims_supported"`

	// https://datatracker.ietf.org/doc/html/rfc8414#section-2 says, “If omitted, the authorization server does not support PKCE.”
	CodeChallengeMethodsSupported []string `json:"code_challenge_methods_supported"`

	v1alpha1.OIDCDiscoveryResponse
}

Metadata holds all fields (that we care about) from the OpenID Provider Metadata section in the OpenID Connect Discovery specification: https://openid.net/specs/openid-connect-discovery-1_0.html#rfc.section.3.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL