Class ScaApproachResolver


  • @Service
    public class ScaApproachResolver
    extends Object
    • Method Detail

      • resolveScaApproach

        public de.adorsys.psd2.xs2a.core.profile.ScaApproach resolveScaApproach()
        Resolve which sca approach from sca approaches list in ASPSP-profile should be used for authorisation.

        If header "tpp-redirect-preferred" is provided with value "true" and ASPSP supports Redirect approach, then this approach will be used. If header "tpp-redirect-preferred" is provided with value "false", the first non-Redirect approach from the list will be used. If header "tpp-redirect-preferred" is not provided, the first approach from the list will be chosen. If ASPSP has only one SCA approach in profile, header "tpp-redirect-preferred" will be ignored and only approach from profile will be used

        Returns:
        chosen ScaApproach to be used for authorisation
      • getScaApproach

        @NotNull
        public @NotNull de.adorsys.psd2.xs2a.core.profile.ScaApproach getScaApproach​(@NotNull
                                                                                     @NotNull String authorisationId)
        Gets SCA approach from the existing initiation authorisation
        Parameters:
        authorisationId - authorisation identifier
        Returns:
        SCA approach, stored in the authorisation