Package de.adorsys.ledgers.sca.service
Interface SCAOperationService
-
public interface SCAOperationService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanauthenticationCompleted(String opId, OpTypeBO opType)Return true if all authorization instances of this operation are validated.SCAOperationBOcheckIfExistsOrNew(AuthCodeDataBO data)ScaAuthConfirmationBOcompleteAuthConfirmation(String authorisationId, boolean authCodeConfirmed)Compete auth confirmation processSCAOperationBOcreateAuthCode(AuthCodeDataBO authCodeData, ScaStatusBO scaStatus)Creates an authCodeData object.SCAOperationBOgenerateAuthCode(AuthCodeDataBO authCodeData, UserBO user, ScaStatusBO scaStatus)Generates an authentication code, hashes it using the operation data and stores the hash for later verification.SCAOperationBOloadAuthCode(String authorizationId)Load an auth code data object from the database.voidprocessExpiredOperations()All operations that have status NEW will be changed on EXPIRED if date of creation + validitySeconds in the past, unless validitySeconds is -1;de.adorsys.ledgers.util.exception.ScaModuleExceptionupdateFailedCount(String authorisationId, boolean isLoginOperation)ScaValidationBOvalidateAuthCode(String authorisationId, String opId, String authCode, int scaWeight)Verify that the auth code, recomputing and verifying the hash of (Auth Code and opData).ScaAuthConfirmationBOverifyAuthConfirmationCode(String authorisationId, String confirmationCode)Verify auth confirmation code
-
-
-
Method Detail
-
generateAuthCode
SCAOperationBO generateAuthCode(AuthCodeDataBO authCodeData, UserBO user, ScaStatusBO scaStatus)
Generates an authentication code, hashes it using the operation data and stores the hash for later verification.- Parameters:
authCodeData- : data for generation auth codeuser- : the user objectscaStatus- : the actual scaStatus to be set if auth code is generated and sent.- Returns:
- the generated AuthCode in clear text.
-
validateAuthCode
ScaValidationBO validateAuthCode(String authorisationId, String opId, String authCode, int scaWeight)
Verify that the auth code, recomputing and verifying the hash of (Auth Code and opData).- Parameters:
authorisationId- : the id of this authorization instance.opId- : This is the id of the operation like provided by the consuming module.authCode- : This auth code was generated at previous step @see #generateAuthCode(String opId, String opData, int validitySeconds)- Returns:
- SCA validation object
-
processExpiredOperations
void processExpiredOperations()
All operations that have status NEW will be changed on EXPIRED if date of creation + validitySeconds in the past, unless validitySeconds is -1;
-
createAuthCode
SCAOperationBO createAuthCode(AuthCodeDataBO authCodeData, ScaStatusBO scaStatus)
Creates an authCodeData object.- Parameters:
authCodeData- : data for generation auth codescaStatus- : the actual scaStatus to be set.- Returns:
- the created AuthCode wrapped.
-
loadAuthCode
SCAOperationBO loadAuthCode(String authorizationId)
Load an auth code data object from the database.- Parameters:
authorizationId- identifier of Authorization object- Returns:
- SCA Operation object
-
authenticationCompleted
boolean authenticationCompleted(String opId, OpTypeBO opType)
Return true if all authorization instances of this operation are validated.- Parameters:
opId- identifier of primary operation for which authorization is carriedopType- type of primary operation- Returns:
- boolean representation of success or failure
-
verifyAuthConfirmationCode
ScaAuthConfirmationBO verifyAuthConfirmationCode(String authorisationId, String confirmationCode)
Verify auth confirmation code- Parameters:
authorisationId- : the id of this authorization instance.confirmationCode- : Auth confirmation code
-
completeAuthConfirmation
ScaAuthConfirmationBO completeAuthConfirmation(String authorisationId, boolean authCodeConfirmed)
Compete auth confirmation process- Parameters:
authorisationId- : the id of this authorization instance.authCodeConfirmed- : Auth confirmation code was successfully confirmed or not
-
checkIfExistsOrNew
SCAOperationBO checkIfExistsOrNew(AuthCodeDataBO data)
-
updateFailedCount
de.adorsys.ledgers.util.exception.ScaModuleException updateFailedCount(String authorisationId, boolean isLoginOperation)
-
-