Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service represents a service for managing JWT tokens.
func NewService ¶
NewService initializes a new service. It will generate a random key that will be used to sign JWT tokens.
func (*Service) GenerateToken ¶
GenerateToken generates a new JWT token.
func (*Service) ParseAndVerifyToken ¶
ParseAndVerifyToken parses a JWT token and verify its validity. It returns an error if token is invalid.
Click to show internal directories.
Click to hide internal directories.