Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContextKey ¶
type ContextKey int
ContextKey is a type used for storing values in a context
const ( // ContextKeyUserID is the key used to store user ID in a context ContextKeyUserID ContextKey = iota )
type JSONWebKey ¶
type JSONWebKey struct { Alg string `json:"alg"` Kty string `json:"kty"` Kid string `json:"kid"` Use string `json:"use"` N string `json:"n"` E string `json:"e"` X5c []string `json:"x5c"` }
JSONWebKey is a single JSON Web Key definition
func (JSONWebKey) GetCertificate ¶
func (key JSONWebKey) GetCertificate() string
GetCertificate returns the certificate string for this JSONWebKey
type JSONWebKeySet ¶
type JSONWebKeySet struct {
Keys []JSONWebKey `json:"keys"`
}
JSONWebKeySet contains a list of JSON web keys
func GetKeySet ¶
func GetKeySet(url string) (JSONWebKeySet, error)
GetKeySet retrieves public keys from a remote JWKS endpoint "https://" + os.Getenv("AUTH0_DOMAIN") + "/.well-known/jwks.json" https://auth0.com/docs/quickstart/backend/golang/01-authorization
func (JSONWebKeySet) Find ¶
func (set JSONWebKeySet) Find(keyID string) (JSONWebKey, bool)
Find looks for a key with the given key ID token.Header["kid"]
func (JSONWebKeySet) GetRSAPublicKeys ¶
func (set JSONWebKeySet) GetRSAPublicKeys() ([]*rsa.PublicKey, error)
GetRSAPublicKeys returns a slice of RSA public keys generated from this JWKS
type Opts ¶
type Opts struct { API *operations.FlamedbAPI Flame database.Flame AccessKeyStore database.AccessKeyStore Key *rsa.PublicKey }
Opts used to configure the FlameDB service
Click to show internal directories.
Click to hide internal directories.