token

package
v0.0.0-...-15895bd Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPermits

func CheckPermits(paramID, cookieID string) error

CheckPermits cheks if the user is trying to perform and action on his own account or not. If true, return an error.

func GenerateFixedJWT

func GenerateFixedJWT(id string) (string, error)

GenerateFixedJWT creates a jwt token that does not vary.

func GenerateJWT

func GenerateJWT(email string) (string, error)

GenerateJWT creates a new jwt token - changes over time -.

func GenerateRunes

func GenerateRunes(length int) string

GenerateRunes generates a random string.

func ParseFixedJWT

func ParseFixedJWT(tokenString string) (string, error)

ParseFixedJWT takes the claims from the token and returns the id value. This function is used to take the user id value from the UID cookie.

Types

This section is empty.

Jump to

Keyboard shortcuts

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