services

package
v0.0.0-...-47b6295 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2020 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const AccessTokenValidity = time.Minute * 20
View Source
const RefreshTokenValidity = time.Hour * 24

Variables

This section is empty.

Functions

func AuthorizeToken

func AuthorizeToken(token *string, secret *string) (*jwt.Token, jwt.MapClaims, error)

AuthorizeToken check if a refresh token is valid

func GenerateToken

func GenerateToken(signMethod *jwt.SigningMethodHMAC, claims jwt.MapClaims, secret *string) (*string, error)

GenerateToken generates only an access token

func GetTokenFromHeader

func GetTokenFromHeader(c *gin.Context) string

GetTokenFromHeader returns the token string in the authorization header

Types

This section is empty.

Jump to

Keyboard shortcuts

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