Package de.adorsys.psd2.xs2a.service
Class ConsentService
- java.lang.Object
-
- de.adorsys.psd2.xs2a.service.ConsentService
-
@Service public class ConsentService extends Object
-
-
Constructor Summary
Constructors Constructor Description ConsentService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 variablesResponseObject<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 requestResponseObject<Void>deleteAccountConsentsById(String consentId)Terminates account consent on PSU requestResponseObject<de.adorsys.psd2.core.data.ais.AisConsent>getAccountConsentById(String consentId)Returns account consent by its idResponseObject<ConsentStatusResponse>getAccountConsentsStatusById(String consentId)Returns status of requested consentResponseObject<Xs2aScaStatusResponse>getConsentAuthorisationScaStatus(String consentId, String authorisationId)Gets SCA status response of consent authorisationResponseObject<Xs2aAuthorisationSubResources>getConsentInitiationAuthorisations(String consentId)ResponseObject<UpdateConsentPsuDataResponse>updateConsentPsuData(UpdateConsentPsuDataReq updatePsuData)
-
-
-
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 PSUexplicitPreferred- 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 emptyconsentId- String representation of AccountConsent identificationpassword- PSU password, can be omitted- Returns:
- authorisation response
-
updateConsentPsuData
public ResponseObject<UpdateConsentPsuDataResponse> updateConsentPsuData(UpdateConsentPsuDataReq updatePsuData)
-
getConsentInitiationAuthorisations
public ResponseObject<Xs2aAuthorisationSubResources> getConsentInitiationAuthorisations(String consentId)
-
getConsentAuthorisationScaStatus
public ResponseObject<Xs2aScaStatusResponse> getConsentAuthorisationScaStatus(String consentId, String authorisationId)
Gets SCA status response of consent authorisation- Parameters:
consentId- String representation of consent identifierauthorisationId- String representation of authorisation identifier- Returns:
- Response containing SCA status of the authorisation and optionally trusted beneficiaries flag or corresponding error
-
-