Documentation
¶
Overview ¶
Package jwt provides an interface for handling JSON Web Tokens (JWT).
It includes the `IJwtService` interface for generating and decoding JWTs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IService ¶
type IService interface { // Generate creates a JWT for the specified user. Generate(user *usermodel.User) (string, error) // Decode parses the provided JWT and returns the claims or an error. Decode(token string) (jwt.MapClaims, error) }
IService defines methods for generating and decoding JSON Web Tokens (JWT).
Methods: - Generate(user *usermodel.User) (string, error): Generates a JWT for the given user and returns the token or an error. - Decode(token string) (jwt.MapClaims, error): Decodes the provided JWT and returns the claims or an error.
Click to show internal directories.
Click to hide internal directories.