Hi Senthalan,
+1,

But I think best is to flag {"retryCount" : N} , and not having the onFail
mechanism for retry in the script, but handle in the framework, for simple
retry cases.


Cheers,
Ruwan A


On Thu, Jul 18, 2019 at 11:26 AM Senthalan Kanagalingam <sentha...@wso2.com>
wrote:

> Hi all,
>
> Currently, in our authentication framework, we force to retry the complete
> authentication process. With the adaptive authentication script, it will be
> great if we support force to retry mechanism per step. Let me explain a
> use-case. There will be 3 steps for authentication. if the 1st and 2nd
> steps passed successfully and the 3rd step failed the user has to again
> authenticate with 2nd step to retry the 3rd steps.
>
> We can pass a flag in the authentication options parameter (let's say {
> forceStepRetry : true }) from the script for each excuteStep() method and
> forced to retry the step in the step handler.
>
> function onLoginRequest(context) {
>     executeStep(1, {
>         onSuccess: function (context) {
>            forceRetry(context);
>         }
>     });
> }
>
> function forceRetry(context) {
>
> executeStep(2, { forceStepRetry : true }, {
>
>      onSuccess: function (context){
>
>      executeStep(3, {
>
> onSuccess: function (context){
>
>      // Logic to execute if step 3 succeeded
>
> },
>
>                 onFail: function (context){
>                     forceRetry(context);
>                 }
>
>            });
>       }
> });
>
> }
>
>
> Please share your thoughts on this.
>
>
> Thanks,
> Senthalan
> --
> Senthalan Kanagalingam | Software Engineer | WSO2 Inc.
> (m) +94 (0) 77 18 77 466 | (w) +94117435800 | (e) sentha...@wso2.com
> <http://wso2.com/signature>
>
>
>

-- 
Ruwan Abeykoon | Director/Architect | WSO2 Inc.
(w) +947435800  | Email: ruw...@wso2.com
_______________________________________________
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to