jwt_auth

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2022 License: MIT Imports: 8 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 {
	jwt.StandardClaims
	Uid    int64 `json:"uid"`
	Device int64 `json:"device"`
	Ver    int64 `json:"ver"`
}

type JwtAuthorize

type JwtAuthorize struct {
}

func NewAuthorizeImpl

func NewAuthorizeImpl(secret string) *JwtAuthorize

func (JwtAuthorize) Auth

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

func (JwtAuthorize) GetToken

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

func (JwtAuthorize) RemoveToken

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

type Response

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

Jump to

Keyboard shortcuts

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