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

oauth2

package
v0.20.4 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package oauth2 provides the credentials.module.oauth2 module: a credentials.Provider that produces transport credentials for OAuth2/OIDC client authentication. Source data lives under sessionManager.clientAuth in the top-level config and is read via config.FromContext.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

type Module struct {
	Mod string `yaml:"module"`
	// contains filtered or unexported fields
}

Module is the credentials.module.oauth2 module. It implements credentials.Provider that builds credentials from sessionManager.clientAuth config field. OIDC discovery results are cached for cacheTTL; RS and RP are built from the cached config on every call.

func (*Module) GetDiscoveryConfig added in v0.20.0

func (m *Module) GetDiscoveryConfig(ctx context.Context, issuer string) (*oidc.DiscoveryConfiguration, error)

GetDiscoveryConfig implements credentials.Provider.

func (*Module) Module

func (m *Module) Module() sessionmanager.ModuleInfo

func (*Module) Provision

func (m *Module) Provision(ctx *sessionmanager.Context) error

func (*Module) RelyingParty added in v0.20.0

func (m *Module) RelyingParty(ctx context.Context, oidcCfg *oidcv1.OIDC, redirectURI string) (rp.RelyingParty, error)

RelyingParty implements credentials.Provider. Fetches (or returns cached) discovery config then delegates to the appropriate credentials constructor, which skips re-running OIDC discovery.

func (*Module) ResourceServer added in v0.20.0

func (m *Module) ResourceServer(ctx context.Context, clientID, issuer string) (rs.ResourceServer, error)

ResourceServer implements credentials.Provider. Fetches (or returns cached) discovery config then delegates to the appropriate credentials constructor, which skips re-running OIDC discovery.

Jump to

Keyboard shortcuts

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