Class CreateClientSessionServiceImpl

java.lang.Object
com.skava.auth.service.impl.session.CreateClientSessionServiceImpl
All Implemented Interfaces:
CreateClientSessionService, com.skava.core.EcommService<ClientSessionRequest,ClientSessionResponse>

@Service public class CreateClientSessionServiceImpl extends Object implements CreateClientSessionService
This serivce class implements CreateClientSessionService and handles the client session creation service request, process it and retrieve the details from DB. It also implements business logic required to create session
Author:
Infosys Equinox
  • Constructor Details

    • CreateClientSessionServiceImpl

      public CreateClientSessionServiceImpl()
      Default constructor.
  • Method Details

    • getValidator

      public List<com.skava.core.validation.ValidatorComponent> getValidator()
      This method return the list of validation components to validate the request of create session.
      Specified by:
      getValidator in interface com.skava.core.EcommService<ClientSessionRequest,ClientSessionResponse>
      Returns:
      a List of ValidatorComponent objects.
    • process

      @SendEvent(eventType="authservice/clientsession/create", identifier="response_session.sessionId") public ClientSessionResponse process(ClientSessionRequest input)
      This method process the create session request and creates the user session whether given request is valid. User identifier must be positive value. Collection identifier must be positive value. Either user should have the privilege to create session else he must have a valid bearer token from user microservice to create authorization token.
      Specified by:
      process in interface com.skava.core.EcommService<ClientSessionRequest,ClientSessionResponse>
      Parameters:
      input - a ClientSessionRequest object.
      Returns:
      a ClientSessionResponse object.
    • validateClientAuthTokenRequest

      public String[] validateClientAuthTokenRequest(String clientId, Long collectionId)
      This method validates bearer token and returns the bearer token data.
      Parameters:
      clientId - a String object.
      collectionId - a Long object.
      Returns:
      an Array of String objects
    • clientTokenExpirationFromCollection

      public Long clientTokenExpirationFromCollection(Long collectionId)
      This method load the session expired time from collection .
      Parameters:
      collectionId - a Long object.
      Returns:
      a Long objects