jwk

package
v0.0.0-...-99ca00c Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidTokenSignature = errors.New("invalid token signature")

ErrInvalidTokenSignature is raised when token is signed with a private key where the public key is not known by the keyset.

Functions

func ValidateSignature

func ValidateSignature(jwks *jose.JSONWebKeySet, signature *jose.JSONWebSignature) error

ValidateSignature validates given token using given JWKS.

func ValidateToken

func ValidateToken(jwks *jose.JSONWebKeySet, token *jwt.JSONWebToken, claims any) error

ValidateToken validates given token using given JWKS.

Types

type KeyProviderFunc

type KeyProviderFunc func(ctx context.Context) (*jose.JSONWebKey, error)

KeyProviderFunc defines key provider contract.

type KeySetProviderFunc

type KeySetProviderFunc func(ctx context.Context) (*jose.JSONWebKeySet, error)

KeySetProviderFunc defines key set provider contract.

Jump to

Keyboard shortcuts

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