java.lang.Object
org.apache.sling.starter.login.models.Login

@Model(adaptables=org.apache.sling.api.SlingJakartaHttpServletRequest.class) public class Login extends Object
Model to assist rendering the custom login page
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.apache.sling.api.SlingJakartaHttpServletRequest
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns an informational message according to the value provided in the j_reason_code request parameter.
    Return the resource path to go to after login is successful

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • request

      protected org.apache.sling.api.SlingJakartaHttpServletRequest request
  • Constructor Details

    • Login

      public Login()
  • Method Details

    • getResource

      public String getResource()
      Return the resource path to go to after login is successful
      Returns:
      the resource path or null
    • getReason

      public String getReason()
      Returns an informational message according to the value provided in the j_reason_code request parameter. Supported reasons are invalid credentials and session timeout.
      Returns:
      The "translated" reason to render the login form or an empty string if there is no specific reason