Class JwtTokenService

java.lang.Object
com.unosquare.carmigo.util.JwtTokenService

@Service public class JwtTokenService extends Object
Handles JWT tokens by generating, validating and extracting data.
  • Constructor Details

    • JwtTokenService

      public JwtTokenService()
  • Method Details

    • generateToken

      public String generateToken(org.springframework.security.core.userdetails.UserDetails userDetails)
    • validateToken

      public Boolean validateToken(String token, org.springframework.security.core.userdetails.UserDetails userDetails)
    • extractUsername

      public String extractUsername(String token)
    • extractExpiration

      public Date extractExpiration(String token)
    • extractClaim

      public <R> R extractClaim(String token, Function<io.jsonwebtoken.Claims,R> claimsResolver)