I have an application that will have anonymous access on all the xpages except a couple. I need to force the user to login for those xpages. Is using the beforepageload event to check and redirecting the user to logon page the right way or is there a better way?
Share
Yes this would be a valid way to do it and is how I handle the situation in a couple of my own apps.
This is the code that I use
I have this setup as a function that I just call from the beforePageLoad event. I’m redirecting to another XPage but you could also redirect to the database.nsf?login which will use the authentication type setup on the server.