oidc

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package oidc publishes the OIDC discovery document and exchanges platform-signed federation assertions over RFC 8693

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrOrganizationIDRequired indicates no organization was supplied to bind the assertion to
	ErrOrganizationIDRequired = errors.New("oidc: organization ID required")
	// ErrAudienceRequired indicates no federation audience was supplied
	ErrAudienceRequired = errors.New("oidc: audience required")
	// ErrEndpointRequired indicates no token exchange endpoint was supplied
	ErrEndpointRequired = errors.New("oidc: token exchange endpoint required")
	// ErrExchangeFailed indicates the RFC 8693 token exchange failed
	ErrExchangeFailed = errors.New("oidc: token exchange failed")
)

Functions

func DiscoveryDocument

func DiscoveryDocument(manager *tokens.TokenManager) *zoidc.DiscoveryConfiguration

DiscoveryDocument builds the OIDC discovery document for the issuer

func NewTokenSource

func NewTokenSource(ctx context.Context, source FederationSource) (oauth2.TokenSource, error)

NewTokenSource returns a caching token source that mints assertions and exchanges them at the configured endpoint

Types

type FederationSource

type FederationSource struct {
	// Manager signs the assertions with the platform signing keys
	Manager *tokens.TokenManager
	// OrganizationID is the organization bound into every assertion's identity claims
	OrganizationID string
	// Audience is the relying party identity the assertion is exchanged against
	Audience string
	// Scopes are the OAuth scopes requested during the exchange
	Scopes []string
	// Endpoint is the RFC 8693 token exchange endpoint
	Endpoint string
	// AssertionOptions customize the minted assertions; identity options always win
	AssertionOptions []tokens.ConfigOpt
}

FederationSource configures the assertion exchange against one RFC 8693 security token service

Jump to

Keyboard shortcuts

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