impl

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JWTTokenService

type JWTTokenService struct {
	Method        jwt.SigningMethod
	SignKey       interface{}
	TokenLifeTime int64
	//use for add addition claims to idtoken base on scope required
	AddClaims func(token *jwt.Token, userName string, scope string) map[string]interface{}
}

func NewJwtTokenService

func NewJwtTokenService(method jwt.SigningMethod, signKey interface{}, getClaims func(token *jwt.Token, userName string, scope string) map[string]interface{}) *JWTTokenService

func (*JWTTokenService) GenerateIDToken

func (s *JWTTokenService) GenerateIDToken(authorization *model.Authorization) (string, error)

GenerateIDToken generate an id token

func (*JWTTokenService) GenerateRefreshToken

func (s *JWTTokenService) GenerateRefreshToken(authorization *model.Authorization) (string, error)

GenerateRefreshToken generate a refresh token

func (*JWTTokenService) GenerateToken

func (s *JWTTokenService) GenerateToken(authorization *model.Authorization) (string, error)

Jump to

Keyboard shortcuts

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