Hi Senthalan,

What I understood by reading your description on the behavior of the
*context.currentSubject *method is that it always returns the subject of
the *last-completed-subject-identifier-step* rather than the subject of the
current subject identifier step. If my understanding is correct, I suggest
you change it to something more meaningful name such as
*context.lastSubject*.

I'm +1 with *context.currentStep.*

Thanks,

Harshan Liyanage
Mobile: *+94765672894*
Email: hars...@wso2.com
Blog: http://harshanliyanage.blogspot.com/
Medium: https://medium.com/@harshan.dll
*WSO2, Inc.:** wso2.com <http://wso2.com/>*
lean.enterprise.middleware.


On Tue, Jul 10, 2018 at 9:39 PM Senthalan Kanagalingam <sentha...@wso2.com>
wrote:

> Hi all,
>
> I am working on to get the currently authenticated subject and currently
> executing step from the authentication script. Now, if the identity admin
> wants to get the authenticated subject, he/she has to know which step was
> set as the subject identifier step and have to call,
> "context.step[<stepNo>].subject".
>
> So, we have planned to implement a method as,
>
> *context.currentSubject *
>
> which will return the subject of the "subject identifier step", if that
> step is completed. Else return the subject of the last completed step.
>
> Another implementation is to have a method to get the currently exected
> method. Currently, identity admin has to specify the step number in order
> to get the details. "context.step[<stepNo>]". This will affect the
> reusability of the code.
>
> With this new implementation, the identity admin can use,
>
> *context.currentStep*
>
> which will return the executing step.
>
> Please share your comments on the naming of the methods.
>
> thanks,
> Senthalan.
> --
>
> *Senthalan Kanagalingam*
> *Software Engineer - WSO2 Inc.*
> *Mobile : +94 (0) 77 18 77 466*
> <http://wso2.com/signature>
> _______________________________________________
> Architecture mailing list
> Architecture@wso2.org
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
_______________________________________________
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to