Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNonPointerClaim = errors.New("invalid claims type, the claims must be a pointer")
View Source
var ErrTokenExpired = errors.New("token expired")
Functions ¶
func CreateToken ¶
Create a new jwt token.
Types ¶
type EC ¶ added in v0.2.0
type EC struct { SigningMethod jwt.SigningMethod PrivateKey *ecdsa.PrivateKey PublicKey *ecdsa.PublicKey }
EC
func (*EC) GetPrivateKey ¶ added in v0.2.0
func (*EC) GetPublicKey ¶ added in v0.2.0
func (*EC) GetSigningMethod ¶ added in v0.2.0
func (h *EC) GetSigningMethod() jwt.SigningMethod
type ED ¶
type ED struct { SigningMethod jwt.SigningMethod PrivateKey crypto.PrivateKey PublicKey crypto.PublicKey }
ED
func (*ED) GetPrivateKey ¶
func (*ED) GetPublicKey ¶
func (*ED) GetSigningMethod ¶
func (h *ED) GetSigningMethod() jwt.SigningMethod
type HMAC ¶
type HMAC struct { SigningMethod jwt.SigningMethod SigningKey []byte }
HMAC
func (*HMAC) GetPrivateKey ¶
func (*HMAC) GetPublicKey ¶
func (*HMAC) GetSigningMethod ¶
func (h *HMAC) GetSigningMethod() jwt.SigningMethod
type RSA ¶
type RSA struct { SigningMethod jwt.SigningMethod PrivateKey *rsa.PrivateKey PublicKey *rsa.PublicKey }
RSA
func (*RSA) GetPrivateKey ¶
func (*RSA) GetPublicKey ¶
func (*RSA) GetSigningMethod ¶
func (h *RSA) GetSigningMethod() jwt.SigningMethod
Click to show internal directories.
Click to hide internal directories.