WAM SessionStatus not working for me
Posted: Thu Feb 23, 2017 1:45 am
I have a site built with WAM using sessions for logins. One WAM (LOGIN) is used for login and logout, like this:
Another WAM (MENU) is like this:
Now, my problem is that I can be on the MENU WAM, click on a link to LOGIN.logoff. This executes and there is a transfer to the LOGIN.startpage webroutine. Then I press back in my browser and is returned to the MENU WAM but now I am logged in again.
I believe I have done as described in http://docs.lansa.com/14/en/LANSA087/Co ... b1_360.htm
Can anyone spot my mistake?
Code: Select all
Webroutine Name(StartPage) Onentry(*sessionstatus_none)
Web_Map For(*BOTH) Fields(#WAWUSR #wawpwd)
...
Endroutine
* validate login - no interface for this routine
Webroutine Name(ValidateLogin) Onentry(*sessionstatus_none)
Web_Map For(*both) Fields(#WAWUSR #wawpwd)
... if login is succesful
#com_self.sessionStatus := Active
Transfer Toroutine(#FIRSTPAGE.INITIALIZE)
... else something else
Endroutine
Webroutine Name(logoff)
#secure #BUTNR #WAWUSR #WAWPWD := *null
#com_self.SessionStatus := Invalid
Transfer Toroutine(#LOGIN.startpage)
Endroutine
Code: Select all
Evtroutine Handling(#com_owner.sessioninvalid) Options(*noclearmessages *noclearerrors)
Transfer Toroutine(#LOGIN.startpage)
Endroutine
I believe I have done as described in http://docs.lansa.com/14/en/LANSA087/Co ... b1_360.htm
Can anyone spot my mistake?