Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthClaims ¶
type AuthClaims[T any] struct { jwt.RegisteredClaims AuthInfo T `json:"authInfo"` }
type AuthService ¶
type AuthService[T any] struct { // contains filtered or unexported fields }
func NewAuthService ¶
func NewAuthService[T any](jwtSecret, serviceName, claimSubject string, tokenTTL time.Duration) *AuthService[T]
func (*AuthService[T]) CreateToken ¶
func (s *AuthService[T]) CreateToken(authInfo T) (string, error)
func (*AuthService[T]) ParseToken ¶
func (s *AuthService[T]) ParseToken(tokenString string) (T, error)
Click to show internal directories.
Click to hide internal directories.