Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SigningOptions ¶
type SigningOptions struct {
// contains filtered or unexported fields
}
func NewSigningOptions ¶
func NewSigningOptions(nonceLen int, lifetimeSec int64, alg Alg) *SigningOptions
The nonce is a random string of nonceLen length. If nonceLen is 0, no nonce will be added. Lifetime is the time the token is valid from iat.
func (*SigningOptions) NewToken ¶
func (sigOpts *SigningOptions) NewToken(regClaims map[string]interface{}, privKey *ecdsa.PrivateKey) (string, error)
Creates a new jwt token, adding registered claims and encrypted with given private key. Issued at and expiration (iat + lifetime) will be added automatically.
Click to show internal directories.
Click to hide internal directories.