Class ConsentService


  • @Service
    public class ConsentService
    extends Object
    • Constructor Detail

      • ConsentService

        public ConsentService()
    • Method Detail

      • createAccountConsentsWithResponse

        public ResponseObject<CreateConsentResponse> createAccountConsentsWithResponse​(CreateConsentReq request,
                                                                                       de.adorsys.psd2.xs2a.core.psu.PsuIdData psuData,
                                                                                       boolean explicitPreferred)
        Performs create consent operation either by filling the appropriate AccountAccess fields with corresponding account details or by getting account details from ASPSP by psuId and filling the appropriate fields in AccountAccess determined by availableAccounts or allPsd2 variables
        Parameters:
        request - body of create consent request carrying such parameters as AccountAccess, validity terms etc.
        psuData - PsuIdData container of authorisation data about PSU
        explicitPreferred - is TPP explicit authorisation preferred
        Returns:
        CreateConsentResponse representing the complete response to create consent request
      • getAccountConsentsStatusById

        public ResponseObject<ConsentStatusResponse> getAccountConsentsStatusById​(String consentId)
        Returns status of requested consent
        Parameters:
        consentId - String representation of AccountConsent identification
        Returns:
        ConsentStatus
      • deleteAccountConsentsById

        public ResponseObject<Void> deleteAccountConsentsById​(String consentId)
        Terminates account consent on PSU request
        Parameters:
        consentId - String representation of AccountConsent identification
        Returns:
        VOID
      • getAccountConsentById

        public ResponseObject<de.adorsys.psd2.core.data.ais.AisConsent> getAccountConsentById​(String consentId)
        Returns account consent by its id
        Parameters:
        consentId - String representation of AccountConsent identification
        Returns:
        AccountConsent requested by consentId
      • createAisAuthorisation

        public ResponseObject<AuthorisationResponse> createAisAuthorisation​(de.adorsys.psd2.xs2a.core.psu.PsuIdData psuData,
                                                                            String consentId,
                                                                            String password)
        Creates new authorisation for given consent and updates it if PSU Data or password are present in the request
        Parameters:
        psuData - PSU authorisation data, can be empty
        consentId - String representation of AccountConsent identification
        password - PSU password, can be omitted
        Returns:
        authorisation response
      • getConsentAuthorisationScaStatus

        public ResponseObject<Xs2aScaStatusResponse> getConsentAuthorisationScaStatus​(String consentId,
                                                                                      String authorisationId)
        Gets SCA status response of consent authorisation
        Parameters:
        consentId - String representation of consent identifier
        authorisationId - String representation of authorisation identifier
        Returns:
        Response containing SCA status of the authorisation and optionally trusted beneficiaries flag or corresponding error