jwtutil

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2025 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiscoverKeySetURI

func DiscoverKeySetURI(ctx context.Context, configURL string) (string, error)

func FetchKeySet

func FetchKeySet(ctx context.Context, jwksURI string) (*jose.JSONWebKeySet, error)

func JWTKeysFromProto added in v1.11.2

func JWTKeysFromProto(proto []*types.JWTKey) (map[string]crypto.PublicKey, error)

JWTKeysFromProto converts JWT keys from the given []*types.JWTKey to map[string]crypto.PublicKey. The key ID of the public key is used as the key in the returned map.

func ProtoFromJWTKeys added in v1.11.2

func ProtoFromJWTKeys(keys map[string]crypto.PublicKey) ([]*types.JWTKey, error)

ProtoFromJWTKeys converts JWT keys from the given map[string]crypto.PublicKey to []*types.JWTKey

Types

type CachingKeySetProvider

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

func NewCachingKeySetProvider

func NewCachingKeySetProvider(provider KeySetProvider, refreshInterval time.Duration) *CachingKeySetProvider

func (*CachingKeySetProvider) GetKeySet

func (c *CachingKeySetProvider) GetKeySet(ctx context.Context) (*jose.JSONWebKeySet, error)

type KeySetProvider

type KeySetProvider interface {
	GetKeySet(context.Context) (*jose.JSONWebKeySet, error)
}

type KeySetProviderFunc

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

func (KeySetProviderFunc) GetKeySet

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

type OIDCIssuer

type OIDCIssuer string

func (OIDCIssuer) GetKeySet

func (c OIDCIssuer) GetKeySet(ctx context.Context) (*jose.JSONWebKeySet, error)

Jump to

Keyboard shortcuts

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