Class SCAOperationEntity


  • @Entity
    public class SCAOperationEntity
    extends Object
    The SCA operation entity. We distinguish among following business operations. - Login : - the opId shall be a generated login session id. - the authorisationId shall be the same as the operation id. - Consent: A single consent might need multiple authorisations. - the opId is the consentId - the authorisationId is a generated number. - Payment: A single payment might need multiple authorisations. - the opId is the paymentId - the authorisationId is a generated number.

    We can create an SCA without have sent out the code. This is generally the case when a business operation (login, consent, payment) is initiated.

    Author:
    fpo
    • Constructor Detail

      • SCAOperationEntity

        public SCAOperationEntity​(String authId,
                                  String opId,
                                  String externalId,
                                  OpType opType,
                                  String scaMethodId,
                                  int validitySeconds,
                                  int authCodeValiditySeconds,
                                  ScaStatus scaStatus,
                                  int scaWeight)
    • Method Detail

      • prePersist

        public void prePersist()
      • updateStatuses

        public SCAOperationEntity updateStatuses​(boolean isCodeConfirmValid)
      • isOperationExpired

        public boolean isOperationExpired()
      • validate

        public void validate​(ScaStatus scaStatus,
                             int scaWeight)
      • expireOperation

        public void expireOperation()
      • isOperationAlreadyUsed

        public boolean isOperationAlreadyUsed()
      • updateStatusSent

        public void updateStatusSent​(int authCodeValiditySeconds,
                                     String authCodeHash,
                                     String hashAlg)
      • fail

        public void fail​(boolean isLoginOperation,
                         int loginFailedMax,
                         int authCodeFailedMax)