Class JwtTokenUtilities
java.lang.Object
es.kukenan.smartfi.microservice.security.gateway.utils.JwtTokenUtilities
Jwt token service utilities.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnun to define login state. -
Field Summary
FieldsModifier and TypeFieldDescription(package private) es.kukenan.smartfi.common.service.jwt.JwtServiceJwt service for management jwt tokens.(package private) com.fasterxml.jackson.databind.ObjectMapperCustom object mapper. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateJwtToken(es.kukenan.smartfi.common.service.jwt.JwtBearerToken jwtBearerToken) Create a Jwt Token validated.es.kukenan.smartfi.common.service.jwt.JwtBearerTokengetValidatedJwtBearerToken(String jwtToken) Get a validate jwt bearer token.es.kukenan.smartfi.common.service.jwt.JwtBearerTokenmapperJwtBearerToken(com.fasterxml.jackson.databind.node.ObjectNode jsonNode) Map jsonode to jwt bearer token.updateSecurityLevelToScaIntoJwtToken(String jwtToken) Update security level on jwt cache token.
-
Field Details
-
jwtService
@Autowired es.kukenan.smartfi.common.service.jwt.JwtService jwtServiceJwt service for management jwt tokens. -
objectMapper
@Autowired com.fasterxml.jackson.databind.ObjectMapper objectMapperCustom 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
Create a Jwt Token validated.- Parameters:
jwtBearerToken- Object with jwtbearer token to convert.- Returns:
- String with jwt.
-
updateSecurityLevelToScaIntoJwtToken
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.
-