For more complicated conditional
workflows like this, you can always use clientSession notes and
save/read the state from here. For example authenticator1 will
call something like this if "particular case" happened:
clientSession.setNote("someNote", "particularCaseHappened");
And authenticator2 can then use something like this in the
beginning of method "authenticate" :
if
("particularCaseHappened".equals(clientSession.getNote("someNote")
{
log.info("Ignoring this authenticator based on fact that
'particular case' from authenticator1 happened");
context.attempted();
return;
}
Marek
On 09/06/16 03:48, Rashmi Singh wrote:
I have one more question on this. I have my own
implementation of two authenticators now: Username Authenticator
(REQUIRED) and OTP authenticator (OPTIONAL) under an ALTERNATIVE
subflow. The second optional authenticator has Authenticator.configuredFor returns false (I have
this because I do not want this to be invoked only when the
user is set in the context already). Now, the second
authenticator is invoked which is good. But, there is one case
in my usernamePassword Authenticator for which the optional
OTPAuthenticator should not be invoked. Can this be achieved?
Other than that case, OTP authenticator should be invoked as
now. Can I stop this second optional OTPAuthenticator from
being invoked for a particular case in my UsernamePassword
authenticator?