loader

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package loader contains interfaces for safely accessing an OIDC Provider.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Loader

type Loader interface {
	Provider(ctx context.Context) (Provider, error)
	LoginURL() string
	SetLoginURL(string)
}

Loader is the interface for loading OIDC provider configurations.

func New

func New(issuerURL, clientID, clientSecret, redirectURL string) Loader

New creates a new OIDC loader.

type Provider

type Provider interface {
	AuthCodeURL(state string, opts ...oauth2.AuthCodeOption) string
	Exchange(ctx context.Context, code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)
	Verify(ctx context.Context, rawIDToken string) (*oidc.IDToken, error)
}

Provider represents an OIDC provider.

Jump to

Keyboard shortcuts

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