func WithJwksRateLimit(opt uint) Option {
	return func(opts *Options) {
		opts.JwksRateLimit = opt
	}
}
WithJwksRateLimit sets the JwksFetchTimeout parameter for an Options pointer.
JwksRateLimit takes an uint and makes sure that the jwks will at a maximum
be requested these many times per second.
Defaults to 1 (Request Per Second)
Please observe: Requests that force update of jwks (like wrong keyID) will be rate limited
package options
import (
	"net/http"
	"time"
)
type ClaimsContextKeyName string
const DefaultClaimsContextKeyName ClaimsContextKeyName = "claims"
type ErrorHandler func(description ErrorDescription, err error)
type ErrorDescription string
const (
	GetTokenErrorDescription ErrorDescription = "unable to get token string"
	ParseTokenErrorDescription ErrorDescription = "unable to parse token string"
	ConvertTokenErrorDescription ErrorDescription = "unable to convert token to map"
)
type Options struct {
	Issuer                     string
	DiscoveryUri               string
	JwksUri                    string
	JwksFetchTimeout           time.Duration
	JwksRateLimit              uint
	FallbackSignatureAlgorithm string
	AllowedTokenDrift          time.Duration
	LazyLoadJwks               bool
	RequiredTokenType          string
	RequiredAudience           string
	RequiredClaims             map[string]interface{}
	DisableKeyID               bool
	HttpClient                 *http.Client
	TokenString                [][]TokenStringOption
	ClaimsContextKeyName       ClaimsContextKeyName
	ErrorHandler               ErrorHandler
}
func New(setters ...Option) *Options {
	opts := &Options{
		JwksFetchTimeout:     5 * time.Second,
		JwksRateLimit:        1,
		AllowedTokenDrift:    10 * time.Second,
		HttpClient:           http.DefaultClient,
		ClaimsContextKeyName: DefaultClaimsContextKeyName,
	}
	for _, setter := range setters {
		setter(opts)
	}
	return opts
}
type Option func(*Options)
func WithIssuer(opt string) Option {
	return func(opts *Options) {
		opts.Issuer = opt
	}
}
func WithDiscoveryUri(opt string) Option {
	return func(opts *Options) {
		opts.DiscoveryUri = opt
	}
}
func WithJwksUri(opt string) Option {
	return func(opts *Options) {
		opts.JwksUri = opt
	}
}
func WithJwksFetchTimeout(opt time.Duration) Option {
	return func(opts *Options) {
		opts.JwksFetchTimeout = opt
	}
}