token

package
v0.0.0-...-19863dc Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClaims

func GetClaims(auhtorization string) (map[string]string, error)

GetClaims transforms the token string into a map with its claims

Types

type Token

type Token struct {
	// contains filtered or unexported fields
}

Token struct

func New

func New(secret string) *Token

New returns a new token service

func (*Token) GetToken

func (t *Token) GetToken(email string) (string, error)

GetToken returns a new token

func (*Token) IsValid

func (t *Token) IsValid(auhtorization string) bool

IsValid checks if token is valid

Jump to

Keyboard shortcuts

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