Interface ConsentService
-
public interface ConsentServiceConsentService without any encryption/decryption. Should not be used in XS2A directly.- See Also:
ConsentServiceBase,ConsentServiceEncrypted
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CmsResponse<CmsCreateConsentResponse>createConsent(de.adorsys.psd2.consent.api.ais.CmsConsent consent)Create AIS consentCmsResponse<Boolean>findAndTerminateOldConsentsByNewConsentId(String newConsentId)Finds old consents for current TPP and PSU and terminates them.CmsResponse<de.adorsys.psd2.consent.api.ais.CmsConsent>getConsentById(String consentId)Reads full information of consent by idCmsResponse<de.adorsys.psd2.xs2a.core.consent.ConsentStatus>getConsentStatusById(String consentId)Reads status of consent by idCmsResponse<List<de.adorsys.psd2.xs2a.core.psu.PsuIdData>>getPsuDataByConsentId(String consentId)CmsResponse<Boolean>updateConsentStatusById(String consentId, de.adorsys.psd2.xs2a.core.consent.ConsentStatus status)Updates consent status by idCmsResponse<Boolean>updateMultilevelScaRequired(String consentId, boolean multilevelScaRequired)Updates multilevel SCA required field
-
-
-
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 consentstatus- 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
-
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 identifiermultilevelScaRequired- multilevel SCA required indicator- Returns:
trueif authorisation was found and SCA required field updated,falseotherwise- Throws:
de.adorsys.psd2.consent.api.WrongChecksumException- in case of any attempt to change definite consent fields after its status became valid.
-
-