jwt

package
v0.0.0-...-a6f2505 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildSignedToken

func BuildSignedToken(privateKey *rsa.PrivateKey, keyID string, claims TokenClaims) (string, error)

func ExportRsaPublicKeyAsPemStr

func ExportRsaPublicKeyAsPemStr(pubkey *rsa.PublicKey) (string, error)

func ParseRsaPublicKeyFromPemStr

func ParseRsaPublicKeyFromPemStr(pubPEM string) (*rsa.PublicKey, error)

Types

type TokenClaims

type TokenClaims struct {
	UserID      string             `json:"userId"`
	Account     string             `json:"account"`
	Permissions models.Permissions `json:"permissions"`
	jwtgo.StandardClaims
}

func ParseSignedToken

func ParseSignedToken(tokenString string, publicKey *rsa.PublicKey) (*TokenClaims, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL