Class TenantConverterStandard

java.lang.Object
com.totvs.tjf.security.oauth2.TenantConverterStandard
All Implemented Interfaces:
com.totvs.tjf.core.security.context.TenantConverter

@ConditionalOnMissingBean(com.totvs.tjf.core.security.context.TenantConverter.class) public class TenantConverterStandard extends Object implements com.totvs.tjf.core.security.context.TenantConverter
Converts the companyId(tenant) of the token into a valid tenant, based on the RAC information.
Author:
Diego Nunes da Silveira
  • Constructor Details

    • TenantConverterStandard

      public TenantConverterStandard(RacTokenService racTokenService)
      Default constructor.
      Parameters:
      racTokenService - #RacTokenService
  • Method Details

    • converter

      public String converter(String fluigTenant, String token)
      Converts the companyId of the token into a valid tenant, based on the RAC information.
      Specified by:
      converter in interface com.totvs.tjf.core.security.context.TenantConverter
      Parameters:
      fluigTenant - tenant available in jwt token
      token - jwt
      Returns:
      tenant tenant available in RAC