Class GeneralAuthorisationService


  • @Component
    public class GeneralAuthorisationService
    extends Object
    • Method Detail

      • authorisePsuForConsent

        public de.adorsys.psd2.xs2a.spi.domain.response.SpiResponse<de.adorsys.psd2.xs2a.spi.domain.authorisation.SpiPsuAuthorisationResponse> authorisePsuForConsent​(@NotNull
                                                                                                                                                                      @NotNull de.adorsys.psd2.xs2a.spi.domain.psu.SpiPsuData spiPsuData,
                                                                                                                                                                      String pin,
                                                                                                                                                                      String consentId,
                                                                                                                                                                      String authorisationId,
                                                                                                                                                                      de.adorsys.ledgers.middleware.api.domain.sca.OpTypeTO opType,
                                                                                                                                                                      @NotNull
                                                                                                                                                                      @NotNull de.adorsys.psd2.xs2a.spi.domain.SpiAspspConsentDataProvider aspspConsentDataProvider)
        First authorization of the PSU.

        The result of this authorisation must contain an scaStatus with following options: - ScaStatusTO.EXEMPTED: There is no SCA needed. The user does not have any SCA method anyway. - ScaStatusTO.SCAMETHODSELECTED: The user has receive an authorisation code and must enter it. - ScaStatusTO.PSUIDENTIFIED: the user must select an authorisation method to complete authorisation.

        In all three cases, we store the response object for reuse in an AspspConsentData object.

        Parameters:
        spiPsuData - identification data for the psu
        pin - : pis of the psu
        aspspConsentDataProvider - :Provides access to read/write encrypted data to be stored in the consent management system
        Returns:
        : the authorisation status
      • validateToken

        public de.adorsys.ledgers.middleware.api.domain.um.BearerTokenTO validateToken​(String accessToken)
      • getResponseIfScaSelected

        public de.adorsys.psd2.xs2a.spi.domain.response.SpiResponse<de.adorsys.psd2.xs2a.spi.domain.authorisation.SpiAuthorizationCodeResult> getResponseIfScaSelected​(de.adorsys.psd2.xs2a.spi.domain.SpiAspspConsentDataProvider aspspConsentDataProvider,
                                                                                                                                                                       de.adorsys.ledgers.middleware.api.domain.sca.SCAResponseTO sca)
      • returnScaMethodSelection

        public de.adorsys.psd2.xs2a.spi.domain.response.SpiResponse<de.adorsys.psd2.xs2a.spi.domain.authorisation.SpiAuthorizationCodeResult> returnScaMethodSelection​(de.adorsys.psd2.xs2a.spi.domain.SpiAspspConsentDataProvider aspspConsentDataProvider,
                                                                                                                                                                       de.adorsys.ledgers.middleware.api.domain.sca.SCAResponseTO sca)