myauth

package
v0.0.0-...-42c4776 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Issuer        = "zo.auth.service"
	TokenType     = "accessToken"
	UserTokenType = "userToken"
)

Variables

This section is empty.

Functions

func CreateAccessTokenJwt

func CreateAccessTokenJwt(expiredAt time.Time) (string, error)

func CreateUserTokenJwt

func CreateUserTokenJwt(userId int, expiredAt time.Time) (string, error)

Types

type AuthClaims

type AuthClaims struct {
	*jwt.StandardClaims
	TokenType string
}

type UserTokenClaims

type UserTokenClaims struct {
	*jwt.StandardClaims
	TokenType string
	UserId    int
}

func CreateUserTokenClaims

func CreateUserTokenClaims(userToken string) (*UserTokenClaims, error)

Jump to

Keyboard shortcuts

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