Package com.totvs.tjf.security.oauth2
Class RacTokenService
java.lang.Object
com.totvs.tjf.security.oauth2.RacTokenService
-
Constructor Summary
ConstructorsConstructorDescriptionRacTokenService(com.fasterxml.jackson.databind.ObjectMapper mapper, SecurityAccessApiProperties properties, org.springframework.web.client.RestTemplate restTemplate, org.springframework.cache.CacheManager cacheManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidGets the rac authorization from the fluig tokenGets the rac tenantId of the fluig companyId
-
Constructor Details
-
RacTokenService
public RacTokenService(com.fasterxml.jackson.databind.ObjectMapper mapper, SecurityAccessApiProperties properties, @Nullable org.springframework.web.client.RestTemplate restTemplate, org.springframework.cache.CacheManager cacheManager)
-
-
Method Details
-
getTenant
@Cacheable(value="RacTokenServiceTenantCache", cacheResolver="tokenCacheResolver", key="#fluigTenant", condition="#fluigTenant != null") public String getTenant(String fluigTenant, String token) Gets the rac tenantId of the fluig companyId- Parameters:
fluigTenant- tenant available in jwt tokentoken- jwt- Returns:
- tenant tenant available in RAC
-
getTenant
Gets the rac authorization from the fluig token- Parameters:
token- jwt- Returns:
- hasAccess rac tenant authorization
-
getUserId
-
clearRacTokenServiceTenantCache
-
clearRacTokenServiceUserIdCache
-