Class IdaRequestResponsConsumerUtil
- java.lang.Object
-
- io.mosip.authentication.common.service.util.IdaRequestResponsConsumerUtil
-
- All Implemented Interfaces:
AnonymousProfileStoreFunction,AuthTransactionStoreFunction
@Component public class IdaRequestResponsConsumerUtil extends Object implements AuthTransactionStoreFunction, AnonymousProfileStoreFunction
The Class IdaRequestResponsConsumerUtil.- Author:
- Loganathan S
-
-
Constructor Summary
Constructors Constructor Description IdaRequestResponsConsumerUtil()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LocalDateTimeconvertStringDateTimeToLDT(String stringDateTime)static StringgetResponseTime(String requestTime, String dateTimePattern)Gets the response time.static voidsetIdVersionToObjectWithMetadata(ObjectWithMetadata sourceRequestWithMetadata, ObjectWithMetadata targetObjectWithMetadata)Sets the id version to object with metadata.static voidsetIdVersionToResponse(ObjectWithMetadata sourceRequestWithMetadata, ObjectWithIdVersionTransactionID targetResponseWithIdVersion)Sets the id version to response.static voidsetTransactionIdToResponse(ObjectWithMetadata sourceRequestWithMetadata, ObjectWithIdVersionTransactionID targetResponseWithIdVersion)Sets the transaction id to response.voidstoreAnonymousProfile(Map<String,Object> requestBody, Map<String,Object> requestMetadata, Map<String,Object> responseMetadata, boolean status, List<AuthError> errors)Store anonymous profile.voidstoreAuthTransaction(Map<String,Object> metadata, String requestSignature, String responseSignature)Store auth transaction.
-
-
-
Method Detail
-
storeAnonymousProfile
public void storeAnonymousProfile(Map<String,Object> requestBody, Map<String,Object> requestMetadata, Map<String,Object> responseMetadata, boolean status, List<AuthError> errors)
Store anonymous profile.- Specified by:
storeAnonymousProfilein interfaceAnonymousProfileStoreFunction- Parameters:
requestBody- the request bodyresponseBody- the response bodyrequestMetadata- the request metadataresponseMetadata- the response metadatastatus-errors-
-
storeAuthTransaction
public void storeAuthTransaction(Map<String,Object> metadata, String requestSignature, String responseSignature) throws IdAuthenticationAppException
Store auth transaction.- Specified by:
storeAuthTransactionin interfaceAuthTransactionStoreFunction- Parameters:
metadata- the metadatarequestSignature- the request signatureresponseSignature- the response signature- Throws:
IdAuthenticationAppException- the id authentication app exception
-
setIdVersionToResponse
public static void setIdVersionToResponse(ObjectWithMetadata sourceRequestWithMetadata, ObjectWithIdVersionTransactionID targetResponseWithIdVersion)
Sets the id version to response.- Parameters:
sourceRequestWithMetadata- the source request with metadatatargetResponseWithIdVersion- the target response with id version
-
setTransactionIdToResponse
public static void setTransactionIdToResponse(ObjectWithMetadata sourceRequestWithMetadata, ObjectWithIdVersionTransactionID targetResponseWithIdVersion)
Sets the transaction id to response.- Parameters:
sourceRequestWithMetadata- the source request with metadatatargetResponseWithIdVersion- the target response with id version
-
setIdVersionToObjectWithMetadata
public static void setIdVersionToObjectWithMetadata(ObjectWithMetadata sourceRequestWithMetadata, ObjectWithMetadata targetObjectWithMetadata)
Sets the id version to object with metadata.- Parameters:
sourceRequestWithMetadata- the source request with metadatatargetObjectWithMetadata- the target object with metadata
-
getResponseTime
public static String getResponseTime(String requestTime, String dateTimePattern)
Gets the response time.- Parameters:
requestTime- the request timedateTimePattern- the date time pattern- Returns:
- the response time
-
convertStringDateTimeToLDT
public static LocalDateTime convertStringDateTimeToLDT(String stringDateTime)
-
-