openid

package
v1.67.14 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const ConstSystemScopeExternal = "system_ext"
View Source
const ConstSystemScopeInternal = "system_int"

Variables

This section is empty.

Functions

func NewClientRegistrar

func NewClientRegistrar(
	serviceName, serviceEnv string,
	cfg config.ConfigurationOAUTH2,
	cli client.Manager,
) security.Oauth2ClientRegistrar

Types

type JWK added in v1.67.0

type JWK struct {
	Kty string `json:"kty"`
	Alg string `json:"alg,omitempty"`
	Use string `json:"use,omitempty"`

	// Common
	Kid string `json:"kid"`

	// RSA
	E string `json:"e,omitempty"`
	N string `json:"n,omitempty"`

	// EC
	Crv string `json:"crv,omitempty"`
	X   string `json:"x,omitempty"`
	Y   string `json:"y,omitempty"`

	// OKP (EdDSA)
	OKPCrv string `json:"crv,omitempty"` //nolint:govet // JWK format allows overlapping field names for different key types
	OKPX   string `json:"x,omitempty"`   //nolint:govet // JWK format allows overlapping field names for different key types
}

type JWKSet added in v1.67.0

type JWKSet struct {
	Keys []JWK `json:"keys"`
}

type TokenAuthenticator added in v1.67.0

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

func NewTokenAuthenticator added in v1.67.0

func NewTokenAuthenticator(jwksURL string, refresh time.Duration) *TokenAuthenticator

func (*TokenAuthenticator) GetKey added in v1.67.0

func (a *TokenAuthenticator) GetKey(token *jwt.Token) (any, error)

func (*TokenAuthenticator) GetKeyCount added in v1.67.0

func (a *TokenAuthenticator) GetKeyCount() int

GetKeyCount returns the number of currently loaded keys (for testing purposes).

func (*TokenAuthenticator) Refresh added in v1.67.0

func (a *TokenAuthenticator) Refresh() error

func (*TokenAuthenticator) Start added in v1.67.0

func (a *TokenAuthenticator) Start()

func (*TokenAuthenticator) Stop added in v1.67.0

func (a *TokenAuthenticator) Stop()

Jump to

Keyboard shortcuts

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