...

Package jwksx

import "github.com/ory/x/jwksx"
Overview
Index

Overview ▾

func GenerateSigningKeys

func GenerateSigningKeys(id, alg string, bits int) (*jose.JSONWebKeySet, error)

GenerateSigningKeys generates a JSON Web Key Set for signing.

func GenerateSigningKeysAvailableAlgorithms

func GenerateSigningKeysAvailableAlgorithms() []string

GenerateSigningKeysAvailableAlgorithms lists available algorithms that are supported by GenerateSigningKeys.

type Fetcher

Fetcher is a small helper for fetching JSON Web Keys from remote endpoints.

type Fetcher struct {
    sync.RWMutex
    // contains filtered or unexported fields
}

func NewFetcher

func NewFetcher(remote string) *Fetcher

NewFetcher returns a new fetcher that can download JSON Web Keys from remote endpoints.

func (*Fetcher) GetKey

func (f *Fetcher) GetKey(kid string) (*jose.JSONWebKey, error)

GetKey retrieves a JSON Web Key from the cache, fetches it from a remote if it is not yet cached or returns an error.