Package com.totvs.tjf.security.oauth2
Class CustomJwtAccessTokenConverter
java.lang.Object
com.totvs.tjf.security.oauth2.CustomJwtAccessTokenConverter
- All Implemented Interfaces:
org.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.jwt.Jwt,
org.springframework.security.authentication.AbstractAuthenticationToken>
public class CustomJwtAccessTokenConverter
extends Object
implements org.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.jwt.Jwt,org.springframework.security.authentication.AbstractAuthenticationToken>
Implementation of the
CustomJwtAccessTokenConverter(ObjectMapper, TenantConverter, SecurityConfigProperties, RacTokenService)
for RAC/KEYCLOAK.- Author:
- Roger Steuernagel
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCustomJwtAccessTokenConverter
(com.fasterxml.jackson.databind.ObjectMapper mapper, com.totvs.tjf.core.security.context.TenantConverter tenantConverter, SecurityConfigProperties securityConfigProperties, RacTokenService racTokenService) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.authentication.AbstractAuthenticationToken
convert
(org.springframework.security.oauth2.jwt.Jwt jwt) List<org.springframework.security.core.GrantedAuthority>
extractRoles
(org.springframework.security.oauth2.jwt.Jwt jwt) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.core.convert.converter.Converter
andThen
-
Constructor Details
-
CustomJwtAccessTokenConverter
public CustomJwtAccessTokenConverter(com.fasterxml.jackson.databind.ObjectMapper mapper, com.totvs.tjf.core.security.context.TenantConverter tenantConverter, SecurityConfigProperties securityConfigProperties, RacTokenService racTokenService)
-
-
Method Details
-
convert
public org.springframework.security.authentication.AbstractAuthenticationToken convert(org.springframework.security.oauth2.jwt.Jwt jwt) - Specified by:
convert
in interfaceorg.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.jwt.Jwt,
org.springframework.security.authentication.AbstractAuthenticationToken>
-
extractRoles
public List<org.springframework.security.core.GrantedAuthority> extractRoles(org.springframework.security.oauth2.jwt.Jwt jwt)
-