jwt_service

package
v0.0.0-...-b679324 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessTokenClaims

type AccessTokenClaims struct {
	AccessTokenPayload
	jwt.StandardClaims
}

type AccessTokenPayload

type AccessTokenPayload struct {
	UserId string `json:"userId"`
}

type JwtService

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

func NewJwtService

func NewJwtService(configService config_service.ConfigService) *JwtService

func (*JwtService) GenerateBillingServiceToken

func (s *JwtService) GenerateBillingServiceToken() *ServiceToken

func (*JwtService) IsExpiredUnix

func (s *JwtService) IsExpiredUnix(unix int64) bool

func (*JwtService) ValidateAccessToken

func (s *JwtService) ValidateAccessToken(accessToken string) (bool, *AccessTokenPayload)

func (*JwtService) ValidateSubscriptionServiceToken

func (s *JwtService) ValidateSubscriptionServiceToken(serviceToken string) (bool, *AccessTokenPayload)

type ServiceToken

type ServiceToken struct {
	Token string
	Exp   int64
}

Jump to

Keyboard shortcuts

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