Class CreateSessionServiceImpl

java.lang.Object
com.skava.auth.service.impl.session.CreateSessionServiceImpl
All Implemented Interfaces:
CreateSessionService, com.skava.core.EcommService<SessionRequest,SessionResponse>

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

    • NO_OF_ACTIVE_SESSIONS

      public static final String NO_OF_ACTIVE_SESSIONS
      It denotes the number of active sessions.
      See Also:
    • CLEAR_SESSION_LIMIT

      public static final String CLEAR_SESSION_LIMIT
      It denotes the active sessions limit to be cleared from DB.
      See Also:
  • Constructor Details

    • CreateSessionServiceImpl

      public CreateSessionServiceImpl()
      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<SessionRequest,SessionResponse>
      Returns:
      a List of ValidatorComponent objects.
    • process

      @SendEvent(eventType="authservice/session/create", identifier="response_session.sessionId") public SessionResponse process(SessionRequest 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<SessionRequest,SessionResponse>
      Parameters:
      input - a SessionRequest object.
      Returns:
      a SessionResponse object.
    • tokenExpirationFromCollection

      public Long tokenExpirationFromCollection(Long collectionId, boolean isGuest)
      This method load the session expired time from collection .
      Specified by:
      tokenExpirationFromCollection in interface CreateSessionService
      Parameters:
      collectionId - a Long object.
      isGuest - a boolean.
      Returns:
      a Long objects