helpers

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetJWTPrivateKey

func GetJWTPrivateKey() (*rsa.PrivateKey, error)

func GetJWTPublicKey

func GetJWTPublicKey() (*rsa.PublicKey, error)

func GetSignedTokenWithClaims

func GetSignedTokenWithClaims(claims jwt.Claims) (string, error)

func MakeCustomClaims

func MakeCustomClaims(userId, sessionId string) jwt.Claims

func ReadPrivateKey

func ReadPrivateKey() []byte

ReadPrivateKey reads the private key from the environment variable or the file and returns as byte array

func ReadPublicKey

func ReadPublicKey() []byte

ReadPublicKey reads the public key from the environment variable or the file and returns as byte array

func VerifyToken

func VerifyToken(token string) (*customClaims, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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