auth

package
v0.0.0-...-11606f1 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Claims

type Claims struct {
	Id string
	jwt.StandardClaims
}

type Interface

type Interface interface {
	IssueToken(userId string) (string, error)
	UserIdByToken(token string) (string, error)
}

type Jwt

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

func NewJwt

func NewJwt(private []byte, public []byte, lifetime time.Duration) (*Jwt, error)

func (Jwt) IssueToken

func (j Jwt) IssueToken(userId string) (string, error)

func (Jwt) UserIdByToken

func (j Jwt) UserIdByToken(rawToken string) (string, error)

Jump to

Keyboard shortcuts

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