Help us shape the future of Go! Take the 2026 Go Developer Survey

discovery

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2026 License: Apache-2.0, MIT Imports: 6 Imported by: 0

Documentation

Overview

Package discovery serves RFC 8615 endpoints: /.well-known/openid-configuration and /.well-known/jwks.json.

Index

Constants

View Source
const (
	JWKSPath   = "/.well-known/jwks.json"
	ConfigPath = "/.well-known/openid-configuration"
	// OAuthServerPath is the RFC 8414 authorization-server metadata mirror of the OIDC discovery document.
	OAuthServerPath = "/.well-known/oauth-authorization-server"
)

Well-known endpoint paths and cache policy.

View Source
const (
	AuthorizeEndpoint     = "/authorize"
	TokenEndpoint         = "/api/oidc/token"
	UserInfoEndpoint      = "/api/oidc/userinfo"
	EndSessionEndpoint    = "/api/oidc/end-session"
	IntrospectionEndpoint = "/api/oidc/introspect"
	// PushedAuthorizationRequestEndpoint is the RFC 9126 PAR endpoint.
	PushedAuthorizationRequestEndpoint = "/api/oidc/par"
	// DeviceAuthorizationEndpoint is the RFC 8628 device authorization endpoint.
	DeviceAuthorizationEndpoint = "/api/oidc/device/authorize"
	JWKSURI                     = "/.well-known/jwks.json"
)

OIDC endpoint paths advertised in the discovery document.

Variables

This section is empty.

Functions

This section is empty.

Types

type Feature

type Feature struct {
	// contains filtered or unexported fields
}

Feature serves the discovery document and JWKS from the shared key provider.

func New

func New(provider jwtutils.KeyProvider, issuer string) Feature

New builds the feature; issuer is the public base URL (a trailing slash is trimmed).

func (Feature) Name

func (Feature) Name() string

Name implements federation.Feature.

func (Feature) Routes

func (f Feature) Routes(r chi.Router)

Routes mounts the discovery endpoints on the root router.

Jump to

Keyboard shortcuts

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