auth

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateToken

func CreateToken(claims jwt.MapClaims) (string, error)

CreateToken creates a JWT token based on the claims provided by the caller.

func ExtractUserId

func ExtractUserId(token string) (string, error)

ExtractUserId returns the authenticated user's ID from the JWT token provided

func ValidateToken

func ValidateToken(token string) (bool, error)

ValidateToken validates a provided JWT token

Types

This section is empty.

Jump to

Keyboard shortcuts

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