Documentation ¶
Index ¶
- Variables
- func DefaultKeyFunc(key Key, deprecatedKeys map[string]Key) jwt.Keyfunc
- func NewKeysFromFilenames(publicKeyPemFilename, privateKeyPemFilename string, ...) (Key, []Key, error)
- func NewStandardClaims() jwt.StandardClaims
- func NewStandardClaimsWithLifetime(lifetime time.Duration) jwt.StandardClaims
- type JWT
- type Key
- type Option
Constants ¶
This section is empty.
Variables ¶
View Source
var MaxTimeDifferenceBetweenNodes = time.Second * 30
MaxTimeDifferenceBetweenNodes represents an offset that should be taken into account when creating e.g. jwt tokens with the `notBefore` flag.
Functions ¶
func NewKeysFromFilenames ¶
func NewKeysFromFilenames(publicKeyPemFilename, privateKeyPemFilename string, deprecatedPublicKeyPemFilenames []string) (Key, []Key, error)
NewKeysFromFilenames helper
func NewStandardClaims ¶
func NewStandardClaims() jwt.StandardClaims
func NewStandardClaimsWithLifetime ¶
func NewStandardClaimsWithLifetime(lifetime time.Duration) jwt.StandardClaims
Types ¶
type JWT ¶
type JWT struct { // key for signing Key Key // KeyFunc provider KeyFunc jwt.Keyfunc // DeprecatedKeys e.g. due to rotation DeprecatedKeys map[string]Key }
type Key ¶
type Key struct { // ID (required) represents the key identifier e.g. the md5 representation of the public key ID string // Public (required) rsa key Public *rsa.PublicKey // Private (optional) rsa key Private *rsa.PrivateKey }
func NewDeprecatedKeysFromFilenames ¶
NewDeprecatedKeysFromFilenames returns new Keys from the given file names
func NewKeyFromFilenames ¶
NewKeyFromFilenames returns a new Key from the given file names
Click to show internal directories.
Click to hide internal directories.