How to create a CSP Login Page and control user sessions

How to create a CSP Login Page and control user sessions?

  • 0
  • 0
  • 198
  • 6
  • 2

Answers

 If (%session.NewSession = 1) {
    // this is a new session
 }

 

Set %session.Data("MyData") = 22 Write $Get(%session.Data("MyData")) // this should print 22 

 

 

 

to create your own Login Page you best start with  Class  %CSP.Login and adapt it to your specific needs.

defaulting to

and then you add the new Login Page to Security-> WebApplications

 

adapt :== create your own class and inherit %CSP.Login

Works, but customize ?

change Look & feel ?

i try override any method and gets 404

you better not change   %CSP.Login but make a personal copy and change this

404 = HTTP page not found. Most likely you put your copy to the wrong directory or namespace   

And then you have to put the reference in MgmtPortal Security-> WebApplications as Login page:
Again with the correct namespace and the correct directory.

A few weird things with custom login pages:

CSPSystem needs read permission on the DB containing them. (You'll need to close CSPGateway connections after making this change so that it can reconnect with the right privileges.)

It's specified with the ".cls" extension in the web application configuration, not just the classname.

best solution to my problem look like stupid solution :

In my case : i need a custom home page, look no cache system (Custom Logo, Custom Form)

my solution :

1.- create a simple index.html with a login form (Action page is my App Home)
2.- put this file in web app folder

3.- Set "Login Page" to my index.html

Bingo !

Comments