Hi Harshan, On Fri, Jul 13, 2018 at 11:26 AM Harshan Liyanage <[email protected]> wrote:
> 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*. > No, if the* subject-identifier-step *is not completed, this method will return the subject of the lastly authenticated step. if *subject-identifier-step *is completed, it will return the subject of the *subject-identifier-step.* So, I think the name lastSubject can be meant as lastly authenticated steps' subject. thanks, > > I'm +1 with *context.currentStep.* > > Thanks, > > Harshan Liyanage > Mobile: *+94765672894* > Email: [email protected] > 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 <[email protected]> > 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 >> [email protected] >> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >> > _______________________________________________ > Architecture mailing list > [email protected] > https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture > -- *Senthalan Kanagalingam* *Software Engineer - WSO2 Inc.* *Mobile : +94 (0) 77 18 77 466* <http://wso2.com/signature>
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
