Login Page

This page is defined by the /pages/login.ftl template in the portal theme. This page is used when a portal uses an LDAP authentication scheme, to gather the username and password for the user.

This page is only required for portals secured using LDAP. If a user is not logged in or their session has recently expired and they attempt to visit any page within the Portal, they will be forwarded to this page if the Portal does not support anonymous browsing. Attempting to access the login page in a Portal without security will redirect to portal-home.ftl. In order to log in, a client must send a successful POST containing valid username and password parameters to the URL below. If their information matches the credentials stored in the server connected to by the LDAP configuration set up on the admin application then they will be forwarded to the portal. If the request was unsuccessful for any reason, the user will be redirected to login.ftl and there will be an error message added to the model.

The most basic login.ftl should contain the following contents:

<!DOCTYPE html>
<html lang="en">
<head>
 <meta charset="utf-8">
</head>

<body>

 <#if errorMessage??>
  ${errorMessage?html}
 </#if>

 <form action="login" method="post">
  <label for="username">User Name</label>
  <input type="text" name="username" placeholder="User Name">
  <label for="password">Password</label>
  <input type="password" name="password" placeholder="Password">
  <button type="submit">Submit</button>
 </form>

</body>

</html>

Page Variables

In addition to the common variables, this page has access to the following:

errorMessage
A string with the error message produced by the previous login attempt.