Documentation
¶
Index ¶
- Variables
- func FetchX09SignCert(keys JSONWebKeySet, kid string) (string, error)
- func GetUsernameFromPayload(jwt string) (string, error)
- func ParseX09AsPublicKey(key, kid string) (any, *time.Time, error)
- func VerifyJWT(jwt string, certs JSONWebKeySet) (bool, error)
- type JSONWebKey
- type JSONWebKeySet
- type JWTHeader
- type JWTPayload
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoJWKAvailable = fmt.Errorf("no JWKs (certs or public keys) available") ErrNoMatchingJWKFound = fmt.Errorf("no JWK with mathing KeyId found") ErrUnknownKeyType = fmt.Errorf("JWK key of unknown type") ErrFailedToParseCertFn = func(kid string, err error) error { return fmt.Errorf("error decoding certificate %q: %w", kid, err) } ErrUnsupportedCertChain = fmt.Errorf("JWK certificate chain unsupported") )
View Source
var ErrInvalidJWTForm = fmt.Errorf("auth token not in JWT format")
View Source
var ErrJWTExpired = fmt.Errorf("jwt has expired")
View Source
var ErrUnidentifiedUser = fmt.Errorf("no username found with which to identify user")
Functions ¶
func FetchX09SignCert ¶
func FetchX09SignCert(keys JSONWebKeySet, kid string) (string, error)
func GetUsernameFromPayload ¶
Types ¶
type JSONWebKey ¶
type JSONWebKeySet ¶
type JSONWebKeySet map[string]JSONWebKey
func GetJSONKeyWebSet ¶
func GetJSONKeyWebSet(endpoint string) (jwks JSONWebKeySet, err error)
type JWTPayload ¶
Click to show internal directories.
Click to hide internal directories.