@Service public class Xs2aAisConsentService extends Object
| Constructor and Description |
|---|
Xs2aAisConsentService() |
| Modifier and Type | Method and Description |
|---|---|
void |
consentActionLog(String tppId,
String consentId,
de.adorsys.psd2.consent.api.ActionStatus actionStatus,
String requestUri,
boolean updateUsage,
String resourceId,
String transactionId)
Sends a POST request to CMS to perform decrement of consent usages and report status of the operation held with certain AIS consent
|
Optional<de.adorsys.psd2.consent.api.authorisation.CreateAuthorisationResponse> |
createAisConsentAuthorization(String consentId,
de.adorsys.psd2.xs2a.core.sca.ScaStatus scaStatus,
de.adorsys.psd2.xs2a.core.psu.PsuIdData psuData)
Sends a POST request to CMS to store created consent authorisation
|
Optional<Xs2aCreateAisConsentResponse> |
createConsent(CreateConsentReq request,
de.adorsys.psd2.xs2a.core.psu.PsuIdData psuData,
de.adorsys.psd2.xs2a.core.tpp.TppInfo tppInfo)
Sends a POST request to CMS to store created AIS consent
|
boolean |
findAndTerminateOldConsentsByNewConsentId(String newConsentId)
Requests CMS to find old consents for current TPP and PSU and terminate them.
|
Optional<de.adorsys.psd2.xs2a.core.authorisation.Authorisation> |
getAccountConsentAuthorizationById(String authorizationId)
Requests CMS to retrieve AIS consent authorisation by its identifier
|
Optional<de.adorsys.psd2.core.data.ais.AisConsent> |
getAccountConsentById(String consentId)
Requests CMS to retrieve AIS consent by its identifier
|
Optional<de.adorsys.psd2.xs2a.core.sca.AuthorisationScaApproachResponse> |
getAuthorisationScaApproach(String authorisationId)
Gets SCA approach from the authorisation
|
Optional<de.adorsys.psd2.xs2a.core.sca.ScaStatus> |
getAuthorisationScaStatus(String consentId,
String authorisationId)
Requests CMS to retrieve SCA status of AIS consent authorisation
|
Optional<List<String>> |
getAuthorisationSubResources(String consentId)
Requests CMS to retrieve AIS consent authorisation IDs by consent ID
|
boolean |
isAuthenticationMethodDecoupled(String authorisationId,
String authenticationMethodId)
Requests CMS to retrieve authentication method and checks if requested authentication method is decoupled.
|
boolean |
saveAuthenticationMethods(String authorisationId,
List<de.adorsys.psd2.xs2a.core.authorisation.AuthenticationObject> methods)
Saves authentication methods in provided authorisation
|
de.adorsys.psd2.consent.api.CmsResponse<de.adorsys.psd2.core.data.ais.AisConsent> |
updateAspspAccountAccess(String consentId,
de.adorsys.psd2.consent.api.ais.AisAccountAccessInfo aisAccountAccessInfo)
Sends a PUT request to CMS to update AIS account access information by consent ID
|
void |
updateConsentAuthorisationStatus(String authorisationId,
de.adorsys.psd2.xs2a.core.sca.ScaStatus scaStatus)
Sends a PUT request to CMS to update status in consent authorisation
|
void |
updateConsentAuthorization(UpdateConsentPsuDataReq updatePsuData)
Sends a PUT request to CMS to update created AIS consent authorisation
|
void |
updateConsentStatus(String consentId,
de.adorsys.psd2.xs2a.core.consent.ConsentStatus consentStatus)
Requests CMS to update consent status into provided one
|
void |
updateMultilevelScaRequired(String consentId,
boolean multilevelScaRequired)
Updates multilevel SCA required field
|
void |
updateScaApproach(String authorisationId,
de.adorsys.psd2.xs2a.core.profile.ScaApproach scaApproach)
Updates AIS SCA approach in authorisation
|
public Optional<Xs2aCreateAisConsentResponse> createConsent(CreateConsentReq request, de.adorsys.psd2.xs2a.core.psu.PsuIdData psuData, de.adorsys.psd2.xs2a.core.tpp.TppInfo tppInfo)
request - Request body storing main consent detailspsuData - PsuIdData container of authorisation data about PSUtppInfo - Information about particular TPP from TPP Certificatepublic Optional<de.adorsys.psd2.core.data.ais.AisConsent> getAccountConsentById(String consentId)
consentId - String representation of identifier of stored consentpublic boolean findAndTerminateOldConsentsByNewConsentId(String newConsentId)
newConsentId - id of new consentpublic void updateConsentStatus(String consentId, de.adorsys.psd2.xs2a.core.consent.ConsentStatus consentStatus)
consentId - String representation of identifier of stored consentconsentStatus - ConsentStatus the consent be changed topublic void consentActionLog(String tppId, String consentId, de.adorsys.psd2.consent.api.ActionStatus actionStatus, String requestUri, boolean updateUsage, String resourceId, String transactionId)
tppId - String representation of TPP`s identifier from TPP CertificateconsentId - String representation of identifier of stored consentactionStatus - Enum value representing whether the action is successful or errors occurredrequestUri - target URL of the requestupdateUsage - Update usage indicatorresourceId - The identification that denotes the addressed accounttransactionId - String representation of ASPSP transaction primary identifierpublic Optional<de.adorsys.psd2.consent.api.authorisation.CreateAuthorisationResponse> createAisConsentAuthorization(String consentId, de.adorsys.psd2.xs2a.core.sca.ScaStatus scaStatus, de.adorsys.psd2.xs2a.core.psu.PsuIdData psuData)
consentId - String representation of identifier of stored consentscaStatus - Enum for status of the SCA method appliedpsuData - authorisation data about PSUpublic Optional<de.adorsys.psd2.xs2a.core.authorisation.Authorisation> getAccountConsentAuthorizationById(String authorizationId)
authorizationId - String representation of identifier of stored consent authorisationpublic void updateConsentAuthorization(UpdateConsentPsuDataReq updatePsuData)
updatePsuData - Consent PSU datapublic void updateConsentAuthorisationStatus(String authorisationId, de.adorsys.psd2.xs2a.core.sca.ScaStatus scaStatus)
authorisationId - String representation of authorisation identifierscaStatus - Enum for status of the SCA method appliedpublic de.adorsys.psd2.consent.api.CmsResponse<de.adorsys.psd2.core.data.ais.AisConsent> updateAspspAccountAccess(String consentId, de.adorsys.psd2.consent.api.ais.AisAccountAccessInfo aisAccountAccessInfo)
consentId - consentId String representation of identifier of stored consentaisAccountAccessInfo - AIS account access informationpublic Optional<List<String>> getAuthorisationSubResources(String consentId)
consentId - String representation of identifier of stored consentpublic Optional<de.adorsys.psd2.xs2a.core.sca.ScaStatus> getAuthorisationScaStatus(String consentId, String authorisationId)
consentId - String representation of consent identifierauthorisationId - String representation of authorisation identifierpublic boolean isAuthenticationMethodDecoupled(String authorisationId, String authenticationMethodId)
authorisationId - String representation of the authorisation identifierauthenticationMethodId - String representation of the available authentication method identifiertrue, if authentication method is decoupled and false otherwise.public boolean saveAuthenticationMethods(String authorisationId, List<de.adorsys.psd2.xs2a.core.authorisation.AuthenticationObject> methods)
authorisationId - String representation of the authorisation identifiermethods - List of authentication methods to be savedtrue if authorisation was found and updated, false otherwisepublic void updateScaApproach(String authorisationId, de.adorsys.psd2.xs2a.core.profile.ScaApproach scaApproach)
authorisationId - String representation of the authorisation identifierscaApproach - Chosen SCA approachpublic void updateMultilevelScaRequired(String consentId, boolean multilevelScaRequired)
consentId - String representation of the consent identifiermultilevelScaRequired - multilevel SCA required indicatorpublic Optional<de.adorsys.psd2.xs2a.core.sca.AuthorisationScaApproachResponse> getAuthorisationScaApproach(String authorisationId)
authorisationId - String representation of the authorisation identifierCopyright © 2020. All rights reserved.