jwt_auth

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: MIT Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Claims

type Claims struct {
	jwt.StandardClaims
	Uid    string `json:"uid"`
	Device string `json:"device"`
	Ver    int64  `json:"ver"`
}

type JwtAuthInfo

type JwtAuthInfo struct {
	UID         string
	Device      string
	ExpiredHour int64
}

type JwtAuthorize

type JwtAuthorize struct {
}

func NewAuthorizeImpl

func NewAuthorizeImpl(secret string) *JwtAuthorize

func (JwtAuthorize) Auth

func (a JwtAuthorize) Auth(c auth.Info, t *auth.Token) (*auth.Result, error)

func (JwtAuthorize) GetToken

func (a JwtAuthorize) GetToken(c auth.Info) (*auth.Token, error)

func (JwtAuthorize) RemoveToken

func (a JwtAuthorize) RemoveToken(t *auth.Token) error

type Response

type Response struct {
	Token  string
	Uid    string
	Device string
	Server []string
}

Jump to

Keyboard shortcuts

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