Question
· Mar 18, 2019

How to create a CSP Login Page and control user sessions

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

Discussion (13)1
Log in or sign up to continue

Name the file login.csp

And inside it check for Error:ErrorCode request parameter:

<html><head><title>Login</title></head>
<body>
My login page:</br>
<form method='post'>
Name: <input name="CacheUserName"/><br/>
Password: <input type='password' name="CachePassword"/><br/>
<input type='submit'/>
</form>

<server>
Set tMsg = $Get(%request.Data("Error:ErrorCode",1))
    If ((tMsg'="")&&($SYSTEM.Status.GetErrorCodes(tMsg)'[$$$ERRORCODE($$$RequireAuthentication))) {
        &html<<center>>
        write "Auth failed!"
        &html<</center>>
    }
</server>
</body>
</html>