authentication

package
v0.0.0-...-be30c67 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseToken

func ParseToken(tokenString string) (*jwtMapClaims, error)

Types

type IJWTAuthentication

type IJWTAuthentication interface {
	SignToken() string
}

func JWTAuthentication

func JWTAuthentication(tokenType TokenType, claims *entityuser.UserTokenClaimsEntity) (IJWTAuthentication, error)

func RepeatToken

func RepeatToken(claims *entityuser.UserTokenClaimsEntity, expireTimestamp int64) IJWTAuthentication

User for Refresh Token when we need ratain expire time in refresh token

type TokenType

type TokenType string
const (
	Access  TokenType = "access"
	Refresh TokenType = "refresh"
	ApiKey  TokenType = "apikey"
)

Jump to

Keyboard shortcuts

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