Interface SCAApi
-
public interface SCAApi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<AuthorizeResponse>login(String login, String pin)STEP-P1, STEP-A1: Validates the login and password of a user.org.springframework.http.ResponseEntity<AuthorizeResponse>selectMethod(String scaId, String authorisationId, String methodId, String cookies)Select a method for sending the authentication code.org.springframework.http.ResponseEntity<AuthorizeResponse>validateAuthCode(String scaId, String authorisationId, String authCode, String cookies)
-
-
-
Field Detail
-
BASE_PATH
static final String BASE_PATH
- See Also:
- Constant Field Values
-
-
Method Detail
-
login
@PostMapping("/login") org.springframework.http.ResponseEntity<AuthorizeResponse> login(@RequestParam("login") String login, @RequestParam("pin") String pin)STEP-P1, STEP-A1: Validates the login and password of a user. This request is associated with an scaId that is directly bound to the consentId/paymentId used in the xs2a redirect request. BTW the scaId can be the initiating consent id itself or a random id mapping to the consentId (resp. paymentId) Implementation first validates existence of the consent. If the consent does not exist or has the wrong status, the request is rejected. Call the backend middleware to obtain a login token. This is a token only valid for the sca process. Store the login token in a cookie. If the user has no sca method, then return the consent access token. If the user has only one sca method, sent authentication code to the user and return the sac method id in the AuthorizeResponse If the user has more than one sca methods, returns the list of sca methods in the AuthorizeResponse and wait for sca method selection. Method expects- Parameters:
login- the customer banking loginpin- the customer banking pin- Returns:
- the auth response
-
selectMethod
@PostMapping(path="/{scaId}/authorisation/{authorisationId}/methods/{methodId}") org.springframework.http.ResponseEntity<AuthorizeResponse> selectMethod(@PathVariable("scaId") String scaId, @PathVariable("authorisationId") String authorisationId, @PathVariable("methodId") String methodId, @RequestHeader(name="Cookie",required=false) String cookies)Select a method for sending the authentication code.- Parameters:
scaId- the id of the login processmethodId- the auth method idauthorisationId- the auth id.cookies- the cookie string- Returns:
- the auth response.
-
validateAuthCode
@PostMapping(path="/{scaId}/authorisation/{authorisationId}/authCode", params="authCode") org.springframework.http.ResponseEntity<AuthorizeResponse> validateAuthCode(@PathVariable("scaId") String scaId, @PathVariable("authorisationId") String authorisationId, @RequestParam(name="authCode") String authCode, @RequestHeader(name="Cookie",required=false) String cookies)
-
-