For example you can create 2 subflows
of the top flow and mark them as ALTERNATIVE. Then if you create
"children" execution of subflow1 pointing to your authenticator
inside it, then in the code of your authenticator you can switch
the state to ATTEMPTED and if the authenticator execution is
required, it will cancel subflow1 and go to subflow2. At least I
hope it will work like this
:-)
If you want some more complex logic and dependency of
authenticator on the state of other authenticator etc. you can
maintain the state inside clientSession notes. Then authenticators
will be executed in the fixed order, but for example in the code
of authenticator2 you can do something like :
if
("true".equals(clientSession.getNote("wasAuthenticator1FinishedSuccessfully"))
{
// skip this authenticator2 as authenticator1 already
authenticated user or did something, which allows you to skip
authenticator2 and move directly to authenticator3 etc.
context.attempted();
return;
}
etc.
Marek
On 19/05/16 16:31, Rashmi Singh wrote:
Could someone please tell me if this is even
possible? I do not want the execution engines/authentication
providers to be executed in a fixed order defined in the admin
console. But, need to be able to switch to any in the chain
depending on some response I get upon invoking an external
service. I needed to know if this is possible and if yes, then
how? Any help would be appreciated.