Package com.totvs.tjf.security.oauth2
Class CustomJwtAccessTokenConverter
- java.lang.Object
-
- org.springframework.security.oauth2.provider.token.DefaultAccessTokenConverter
-
- com.totvs.tjf.security.oauth2.CustomJwtAccessTokenConverter
-
- All Implemented Interfaces:
org.springframework.security.oauth2.provider.token.AccessTokenConverter
public class CustomJwtAccessTokenConverter extends org.springframework.security.oauth2.provider.token.DefaultAccessTokenConverter
Implementation of theJwtAccessTokenConverterConfigurer
for RAC/KEYCLOAK.- Author:
- Roger Steuernagel
- See Also:
DefaultAccessTokenConverter
-
-
Constructor Summary
Constructors Constructor Description CustomJwtAccessTokenConverter(com.fasterxml.jackson.databind.ObjectMapper mapper, TenantConverter tenantConverter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.security.oauth2.provider.OAuth2Authentication
extractAuthentication(Map<String,?> tokenMap)
Extends the default method to search for roles and user name in RAC/KEYCLOAK's JWT.
-
-
-
Constructor Detail
-
CustomJwtAccessTokenConverter
public CustomJwtAccessTokenConverter(com.fasterxml.jackson.databind.ObjectMapper mapper, TenantConverter tenantConverter)
-
-
Method Detail
-
extractAuthentication
public org.springframework.security.oauth2.provider.OAuth2Authentication extractAuthentication(Map<String,?> tokenMap)
Extends the default method to search for roles and user name in RAC/KEYCLOAK's JWT.- Specified by:
extractAuthentication
in interfaceorg.springframework.security.oauth2.provider.token.AccessTokenConverter
- Overrides:
extractAuthentication
in classorg.springframework.security.oauth2.provider.token.DefaultAccessTokenConverter
-
-