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)
Click to show internal directories.
Click to hide internal directories.