Class AuthorisationMethodDecider


  • @Service
    public class AuthorisationMethodDecider
    extends Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isExplicitMethod​(boolean tppExplicitAuthorisationPreferred, boolean multilevelScaRequired)
      Decides whether explicit authorisation method will be used based on bank_profile configuration and tppExplicitAuthorisationPreferred, signingBasketSupported values.
      boolean isImplicitMethod​(boolean tppExplicitAuthorisationPreferred, boolean multilevelScaRequired)
      Decides whether implicit authorisation method will be used based on bank_profile configuration and tppExplicitAuthorisationPreferred and signingBasketSupported values.
      boolean isSigningBasketModeActive​(boolean tppExplicitAuthorisationPreferred)
      Decides whether signing basket mode activate will be used tppExplicitAuthorisationPreferred and signingBasketSupported values.
    • Constructor Detail

      • AuthorisationMethodDecider

        public AuthorisationMethodDecider()
    • Method Detail

      • isExplicitMethod

        public boolean isExplicitMethod​(boolean tppExplicitAuthorisationPreferred,
                                        boolean multilevelScaRequired)
        Decides whether explicit authorisation method will be used based on bank_profile configuration and tppExplicitAuthorisationPreferred, signingBasketSupported values.

        Explicit authorisation will be used if:

        - bank_profile configuration field 'startAuthorisationMode' is set to 'explicit'; - bank_profile configuration field 'startAuthorisationMode' is set to 'auto' and tppExplicitAuthorisationPreferred = true and signingBasketSupported = true or in case of multilevel SCA

        Parameters:
        tppExplicitAuthorisationPreferred - value of tpp's choice of authorisation method
        multilevelScaRequired - does response have multilevel SCA
        Returns:
        is explicit method of authorisation will be used
      • isImplicitMethod

        public boolean isImplicitMethod​(boolean tppExplicitAuthorisationPreferred,
                                        boolean multilevelScaRequired)
        Decides whether implicit authorisation method will be used based on bank_profile configuration and tppExplicitAuthorisationPreferred and signingBasketSupported values.

        Implicit authorisation will be used if:

        - bank_profile configuration field 'startAuthorisationMode' is set to 'implicit'; - bank_profile configuration field 'startAuthorisationMode' is set to 'auto' and tppExplicitAuthorisationPreferred = false and signingBasketSupported = false.

        Implicit approach is impossible in case of multilevel SCA

        Parameters:
        tppExplicitAuthorisationPreferred - value of TPP's choice of authorisation method
        multilevelScaRequired - does response have multilevel SCA
        Returns:
        is implicit method of authorisation will be used
      • isSigningBasketModeActive

        public boolean isSigningBasketModeActive​(boolean tppExplicitAuthorisationPreferred)
        Decides whether signing basket mode activate will be used tppExplicitAuthorisationPreferred and signingBasketSupported values. Signing basket mode is not active in case of tppExplicitAuthorisationPreferred is false
        Parameters:
        tppExplicitAuthorisationPreferred - value of TPP's choice of authorisation method
        Returns:
        is signing basket mode activate for authorisation