Package io.jans.as.server.service.ciba
Class CibaRequestService
java.lang.Object
io.jans.as.server.service.ciba.CibaRequestService
Service used to access to the database for CibaRequest ObjectClass.
- Version:
- May 28, 2020
- Author:
- Milton BO
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCibaRequest
(String authReqId) Get a CibaRequestCacheControl object from Cache service.boolean
hasCibaCompatibility
(io.jans.as.common.model.registration.Client client) Verifies whether a specific client has CIBA compatibility.Load a CIBARequest entry from database.loadExpiredByStatus
(CibaRequestStatus authorizationStatus, int maxRequestsToGet) Generates a list of requests that are expired and also filter them using a Status.void
persistRequest
(CibaRequestCacheControl request, int expiresIn) Uses request data and expiration sent by the client and save request data in database.void
removeCibaCacheRequest
(String cacheKey) Removes from cache a request.void
removeCibaRequest
(CIBARequest cibaRequest) Removes a CibaRequest object from the database.void
removeCibaRequest
(String authReqId) Removes a CibaRequest from the database.void
save
(CibaRequestCacheControl request, int expiresIn) Register a new CibaRequestCacheControl instance in Cache and in the database.void
update
(CibaRequestCacheControl request) Put in cache a CibaRequestCacheControl object, it uses same expiration time that it has.void
updateStatus
(CIBARequest cibaRequest, CibaRequestStatus authorizationStatus) Change the status field in database for a specific request.
-
Constructor Details
-
CibaRequestService
public CibaRequestService()
-
-
Method Details
-
persistRequest
Uses request data and expiration sent by the client and save request data in database.- Parameters:
request
- Object containing information related to the request.expiresIn
- Expiration time that end user has to answer.
-
load
Load a CIBARequest entry from database.- Parameters:
authReqId
- Identifier of the entry.
-
loadExpiredByStatus
public List<CIBARequest> loadExpiredByStatus(CibaRequestStatus authorizationStatus, int maxRequestsToGet) Generates a list of requests that are expired and also filter them using a Status.- Parameters:
authorizationStatus
- Status used to filter entries.maxRequestsToGet
- Limit of requests that would be returned.
-
updateStatus
Change the status field in database for a specific request.- Parameters:
cibaRequest
- Entry containing information of the CIBA request.authorizationStatus
- New status.
-
removeCibaRequest
Removes a CibaRequest object from the database.- Parameters:
cibaRequest
- Object to be removed.
-
removeCibaRequest
Removes a CibaRequest from the database.- Parameters:
authReqId
- Identifier of the CibaRequest.
-
save
Register a new CibaRequestCacheControl instance in Cache and in the database.- Parameters:
request
- New instance to be saved.expiresIn
- Expiration time of the request in Cache and memory.
-
update
Put in cache a CibaRequestCacheControl object, it uses same expiration time that it has.- Parameters:
request
- Object to be updated, replaced or created.
-
getCibaRequest
Get a CibaRequestCacheControl object from Cache service.- Parameters:
authReqId
- Identifier of the object to be gotten.
-
removeCibaCacheRequest
Removes from cache a request.- Parameters:
cacheKey
- Object to be removed from Cache.
-
hasCibaCompatibility
public boolean hasCibaCompatibility(io.jans.as.common.model.registration.Client client) Verifies whether a specific client has CIBA compatibility.- Parameters:
client
- Client to check.
-