add doc
This commit is contained in:
@@ -35,6 +35,7 @@ func (s *Service) Generate(ttl time.Duration, extraClaims jwt.MapClaims) (string
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Validate verifies the JWT token and extracts the claims and JTI(JWT IDentifier).
|
// Validate verifies the JWT token and extracts the claims and JTI(JWT IDentifier).
|
||||||
|
// Returns claims, jti, and error if any.
|
||||||
func (s *Service) Validate(token string) (jwt.MapClaims, string, error) {
|
func (s *Service) Validate(token string) (jwt.MapClaims, string, error) {
|
||||||
claims, err := s.signer.Verify(token)
|
claims, err := s.signer.Verify(token)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user