Class CreateSessionServiceImpl
java.lang.Object
com.skava.auth.service.impl.session.CreateSessionServiceImpl
- All Implemented Interfaces:
CreateSessionService
,com.skava.core.EcommService<SessionRequest,
SessionResponse>
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<com.skava.core.validation.ValidatorComponent>
This method return the list of validation components to validate the request of create session.process
(SessionRequest input) This method process the create session request and creates the user session whether given request is valid.tokenExpirationFromCollection
(Long collectionId, boolean isGuest) This method load the session expired time from collection .Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.skava.core.EcommService
getValidateException, getValidator
-
Field Details
-
NO_OF_ACTIVE_SESSIONS
It denotes the number of active sessions.- See Also:
-
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
This method return the list of validation components to validate the request of create session.- Specified by:
getValidator
in interfacecom.skava.core.EcommService<SessionRequest,
SessionResponse> - Returns:
- a
List
ofValidatorComponent
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 interfacecom.skava.core.EcommService<SessionRequest,
SessionResponse> - Parameters:
input
- aSessionRequest
object.- Returns:
- a
SessionResponse
object.
-
tokenExpirationFromCollection
This method load the session expired time from collection .- Specified by:
tokenExpirationFromCollection
in interfaceCreateSessionService
- Parameters:
collectionId
- aLong
object.isGuest
- a boolean.- Returns:
- a
Long
objects
-