java.lang.Object
es.kukenan.smartfi.microservice.security.gateway.service.WebviewService

@Service public class WebviewService extends Object
Webview related operations.
  • Field Details

    • API_CONTRACTS_PATH

      public static final String API_CONTRACTS_PATH
      Path for Contracts of BE.
      See Also:
    • productsHost

      @Value("${security.gateway.service.products.uri}") private String productsHost
      Products host.
    • sessionCacheUtilities

      @Autowired private SessionCacheUtilities sessionCacheUtilities
      Session cache utilities.
    • webviewCacheUtilities

      @Autowired private WebviewCacheUtilities webviewCacheUtilities
      Session cache utilities.
    • jwtTokenUtilities

      @Autowired private JwtTokenUtilities jwtTokenUtilities
      Service utilities for manage jwt token.
    • restTemplate

      @Autowired private org.springframework.web.client.RestTemplate restTemplate
      Rest template.
    • properties

      @Autowired private es.kukenan.smartfi.common.context.config.ContextPropagationProperties properties
      Context propagation properties.
    • contextManager

      @Autowired private es.kukenan.smartfi.common.context.RequestContextManager contextManager
      Request context manager.
  • Constructor Details

    • WebviewService

      public WebviewService()
  • Method Details

    • getWebviewToken

      public es.kukenan.smartfi.microservice.security.gateway.api.WebviewLoginDto getWebviewToken(String uuid)
      Create a token for webview hybridization for native uuid.
      Parameters:
      uuid - unique identifier for session cache.
      Returns:
      webview token
    • loginWebview

      public void loginWebview(String uuid, es.kukenan.smartfi.microservice.security.gateway.api.WebviewLoginDto body) throws URISyntaxException
      Login webview hybridization.
      Parameters:
      uuid - unique identifier for session cache.
      body - request with unique identifier for token webview.
      Throws:
      URISyntaxException - Uri syntax exception
    • updateSessionWebClient

      private es.kukenan.smartfi.microservice.security.gateway.cache.model.SessionCache updateSessionWebClient(es.kukenan.smartfi.microservice.security.gateway.cache.model.SessionCache cacheWeb, es.kukenan.smartfi.microservice.security.gateway.cache.model.SessionCache cacheNative, String webclientDeviceId)
      Update the session for webclient based on native session asociated.
      Parameters:
      cacheWeb - actual session for webclient
      cacheNative - token with native session
      webclientDeviceId - device identifier for webclient
      Returns:
      new session cache
    • generateJwtFromNativeJwt

      private es.kukenan.smartfi.common.service.jwt.JwtBearerToken generateJwtFromNativeJwt(es.kukenan.smartfi.common.service.jwt.JwtBearerToken nativeJwt, String deviceId)
    • getContractsCall

      private void getContractsCall(es.kukenan.smartfi.microservice.security.gateway.cache.model.SessionCache sessionCache) throws URISyntaxException
      Throws:
      URISyntaxException