java.lang.Object
es.kukenan.smartfi.microservice.security.gateway.utils.JwtTokenUtilities

@Service public class JwtTokenUtilities extends Object
Jwt token service utilities.
  • Field Details

    • jwtService

      @Autowired es.kukenan.smartfi.common.service.jwt.JwtService jwtService
      Jwt service for management jwt tokens.
    • objectMapper

      @Autowired com.fasterxml.jackson.databind.ObjectMapper objectMapper
      Custom object mapper.
  • Constructor Details

    • JwtTokenUtilities

      public JwtTokenUtilities()
  • Method Details

    • mapperJwtBearerToken

      public es.kukenan.smartfi.common.service.jwt.JwtBearerToken mapperJwtBearerToken(com.fasterxml.jackson.databind.node.ObjectNode jsonNode) throws com.fasterxml.jackson.core.JsonProcessingException
      Map jsonode to jwt bearer token.
      Parameters:
      jsonNode - with jwt content.
      Returns:
      validated jwt bearer token.
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException - it fails at convert.
    • createJwtToken

      public String createJwtToken(es.kukenan.smartfi.common.service.jwt.JwtBearerToken jwtBearerToken)
      Create a Jwt Token validated.
      Parameters:
      jwtBearerToken - Object with jwtbearer token to convert.
      Returns:
      String with jwt.
    • updateSecurityLevelToScaIntoJwtToken

      public String updateSecurityLevelToScaIntoJwtToken(String jwtToken)
      Update security level on jwt cache token.
      Parameters:
      jwtToken - String with jwt token.
      Returns:
      Strinh ipdated token.
    • getValidatedJwtBearerToken

      public es.kukenan.smartfi.common.service.jwt.JwtBearerToken getValidatedJwtBearerToken(String jwtToken)
      Get a validate jwt bearer token.
      Parameters:
      jwtToken - String with jwt bearer content.
      Returns:
      Jwt berare token validated.