oidc

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidToken         = errors.New("invalid oidc token")
	ErrJWKSFetch            = errors.New("jwks fetch failed")
	ErrUnsupportedKey       = errors.New("unsupported oidc key")
	ErrUnsupportedAlg       = errors.New("unsupported oidc signing algorithm")
	ErrMissingKey           = errors.New("missing oidc signing key")
	ErrMissingRequiredScope = errors.New("missing required oidc scope")
)

Functions

func NewVerifier

func NewVerifier() appauth.OIDCVerifier

Types

type JWKSCache

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

func NewJWKSCache

func NewJWKSCache(client *http.Client, ttl time.Duration) *JWKSCache

func (*JWKSCache) Get

func (c *JWKSCache) Get(ctx context.Context, url string) (jwkSet, error)

func (*JWKSCache) Refresh

func (c *JWKSCache) Refresh(ctx context.Context, url string) (jwkSet, error)

type OAuth2TokenValidator

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

OAuth2TokenValidator adapts the shared OIDC verifier to the MCP-plane JWTValidator port: it resolves key material via OIDC discovery when the config has no explicit JWKS URL and yields an identity.Principal carrying the raw token for downstream exchange/passthrough.

func NewOAuth2TokenValidator

func NewOAuth2TokenValidator(verifier appauth.OIDCVerifier, client *http.Client) *OAuth2TokenValidator

func (*OAuth2TokenValidator) Validate

type Verifier

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

func NewVerifierWithCache

func NewVerifierWithCache(cache *JWKSCache) *Verifier

func (*Verifier) Peek

func (v *Verifier) Peek(token string) (appauth.TokenHints, error)

func (*Verifier) Verify

func (v *Verifier) Verify(ctx context.Context, token string, cfg domain.OIDCConfig) (*appauth.VerifiedClaims, error)

Jump to

Keyboard shortcuts

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