@Service public class Xs2aAisConsentService extends Object
| Constructor and Description |
|---|
Xs2aAisConsentService() |
| Modifier and Type | Method and Description |
|---|---|
void |
consentActionLog(String tppId,
String consentId,
ActionStatus actionStatus,
String requestUri)
Sends a POST request to CMS to perform decrement of consent usages and report status of the operation held with certain AIS consent
|
Optional<CreateAisConsentAuthorizationResponse> |
createAisConsentAuthorization(String consentId,
ScaStatus scaStatus,
PsuIdData psuData)
Sends a POST request to CMS to store created consent authorization
|
String |
createConsent(CreateConsentReq request,
PsuIdData psuData,
TppInfo tppInfo)
Sends a POST request to CMS to store created AISconsent
|
boolean |
findAndTerminateOldConsentsByNewConsentId(String newConsentId)
Requests CMS to find old consents for current TPP and PSU and terminate them.
|
Optional<AccountConsentAuthorization> |
getAccountConsentAuthorizationById(String authorizationId,
String consentId)
Requests CMS to retrieve AIS consent authorization by its identifier
|
Optional<AccountConsent> |
getAccountConsentById(String consentId)
Requests CMS to retrieve AIS consent by its identifier
|
Optional<ConsentStatus> |
getAccountConsentStatusById(String consentId)
Requests CMS to retrieve AIS consent status by its identifier
|
Optional<AuthorisationScaApproachResponse> |
getAuthorisationScaApproach(String authorisationId)
Gets SCA approach from the authorisation
|
Optional<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
|
Optional<AccountConsent> |
getInitialAccountConsentById(String consentId)
Requests CMS to retrieve AIS consent by its identifier
|
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<Xs2aAuthenticationObject> methods)
Saves authentication methods in provided authorisation
|
Optional<AccountConsent> |
updateAspspAccountAccess(String consentId,
AisAccountAccessInfo aisAccountAccessInfo)
Sends a PUT request to CMS to update AIS account access information by consent ID
|
void |
updateConsentAuthorization(UpdateConsentPsuDataReq updatePsuData)
Sends a PUT request to CMS to update created AIS consent authorization
|
void |
updateConsentStatus(String consentId,
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,
ScaApproach scaApproach)
Updates AIS SCA approach in authorisation
|
public String createConsent(CreateConsentReq request, PsuIdData psuData, TppInfo tppInfo)
request - Request body storing main consent detailspsuData - PsuIdData container of authorisation data about PSUtppInfo - Information about particular TPP from TPP Certificatepublic Optional<AccountConsent> getAccountConsentById(String consentId)
consentId - String representation of identifier of stored consentpublic Optional<AccountConsent> getInitialAccountConsentById(String consentId)
consentId - String representation of identifier of stored consentpublic Optional<ConsentStatus> getAccountConsentStatusById(String consentId)
consentId - String representation of identifier of stored consentpublic boolean findAndTerminateOldConsentsByNewConsentId(String newConsentId)
newConsentId - id of new consentpublic void updateConsentStatus(String consentId, ConsentStatus consentStatus)
consentId - String representation of identifier of stored consentconsentStatus - ConsentStatus the consent be changed topublic void consentActionLog(String tppId, String consentId, ActionStatus actionStatus, String requestUri)
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 requestpublic Optional<CreateAisConsentAuthorizationResponse> createAisConsentAuthorization(String consentId, ScaStatus scaStatus, PsuIdData psuData)
consentId - String representation of identifier of stored consentscaStatus - Enum for status of the SCA method appliedpsuData - authorisation data about PSUpublic Optional<AccountConsentAuthorization> getAccountConsentAuthorizationById(String authorizationId, String consentId)
authorizationId - String representation of identifier of stored consent authorizationconsentId - ID of the consentpublic void updateConsentAuthorization(UpdateConsentPsuDataReq updatePsuData)
updatePsuData - Consent psu datapublic Optional<AccountConsent> updateAspspAccountAccess(String consentId, 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<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<Xs2aAuthenticationObject> 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, 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<AuthorisationScaApproachResponse> getAuthorisationScaApproach(String authorisationId)
authorisationId - String representation of the authorisation identifierCopyright © 2019. All rights reserved.