Interface ConsentServiceEncrypted


  • public interface ConsentServiceEncrypted
    ConsentService with enabled encryption and decryption
    See Also:
    ConsentServiceBase, ConsentService
    • Method Detail

      • createConsent

        CmsResponse<CmsCreateConsentResponse> createConsent​(de.adorsys.psd2.consent.api.ais.CmsConsent consent)
                                                     throws de.adorsys.psd2.consent.api.WrongChecksumException
        Create AIS consent
        Parameters:
        consent - needed parameters for creating AIS consent
        Returns:
        create consent response, containing consent and its encrypted ID
        Throws:
        de.adorsys.psd2.consent.api.WrongChecksumException - in case of any attempt to change definite consent fields after its status became valid.
      • getConsentStatusById

        CmsResponse<de.adorsys.psd2.xs2a.core.consent.ConsentStatus> getConsentStatusById​(String consentId)
        Reads status of consent by id
        Parameters:
        consentId - id of consent
        Returns:
        ConsentStatus
      • updateConsentStatusById

        CmsResponse<Boolean> updateConsentStatusById​(String consentId,
                                                     de.adorsys.psd2.xs2a.core.consent.ConsentStatus status)
                                              throws de.adorsys.psd2.consent.api.WrongChecksumException
        Updates consent status by id
        Parameters:
        consentId - id of consent
        status - new consent status
        Returns:
        true if consent was found and status was updated, false otherwise.
        Throws:
        de.adorsys.psd2.consent.api.WrongChecksumException - in case of any attempt to change definite consent fields after its status became valid.
      • getConsentById

        CmsResponse<de.adorsys.psd2.consent.api.ais.CmsConsent> getConsentById​(String consentId)
        Reads full information of consent by id
        Parameters:
        consentId - id of consent
        Returns:
        AisAccountConsent
      • findAndTerminateOldConsentsByNewConsentId

        CmsResponse<Boolean> findAndTerminateOldConsentsByNewConsentId​(String newConsentId)
        Finds old consents for current TPP and PSU and terminates them. This method should be invoked, when a new consent is authorised.
        Parameters:
        newConsentId - id of new consent
        Returns:
        true if any consents have been terminated, false - if none
      • findAndTerminateOldConsents

        CmsResponse<Boolean> findAndTerminateOldConsents​(String newConsentId,
                                                         de.adorsys.psd2.xs2a.core.consent.TerminateOldConsentsRequest request)
        Finds old consents for current TPP and PSU and terminates them. This method should be invoked, when a new consent is authorised.
        Parameters:
        newConsentId - id of new consent
        request - terminate old consent request
        Returns:
        true if any consents have been terminated, false - if none
      • getPsuDataByConsentId

        CmsResponse<List<de.adorsys.psd2.xs2a.core.psu.PsuIdData>> getPsuDataByConsentId​(String consentId)
      • updateMultilevelScaRequired

        CmsResponse<Boolean> updateMultilevelScaRequired​(String consentId,
                                                         boolean multilevelScaRequired)
                                                  throws de.adorsys.psd2.consent.api.WrongChecksumException
        Updates multilevel SCA required field
        Parameters:
        consentId - String representation of the consent identifier
        multilevelScaRequired - multilevel SCA required indicator
        Returns:
        true if authorisation was found and SCA required field updated, false otherwise
        Throws:
        de.adorsys.psd2.consent.api.WrongChecksumException - in case of any attempt to change definite consent fields after its status became valid.