Login Customization

Login Screen/View Customization

  • Create a directory $REALM_DIR/src/webapp/xslt
  • Copy $YANEL_SRC/src/webapp/xslt/login-screen.xsl into $REALM_DIR/src/webapp/xslt
  • Start customizing $REALM_DIR/src/webapp/xslt/login-screen.xsl

whereas the filename xslt/login-screen.xsl is configurable globally inside WEB-INF/web.xml (See parameter login-screen-xslt).

NOTE for Developers: The realm dir ($REALM_DIR) is being resolved based on the Realm.getRootDir() and Realm.getConfigFile() or rather see the YanelServlet and in particular org.wyona.yanel.servlet.security.impl.DefaultWebAuthenticatorImpl#getXHTMLAuthenticationForm(...) for further details.

Login Logic/Controller Customization

  • Create a directory $REALM_DIR/src/webapp/global-resource-configs
  • Copy $YANEL_SRC/src/webapp/global-resource-configs/login_yanel-rc.xml into $REALM_DIR/src/webapp/global-resource-configs
  • Start customizing $REALM_DIR/src/webapp/global-resource-configs/login_yanel-rc.xml

Return 401 for REST interfaces instead login screen

One can configure a resource associated with a REST interface with the resource configuration parameter

<yanel:property name="yanel:401-only-when-access-denied" value="true"/>
such that when access denied, a 401 response is being returned instead a 200 with a login screen as body.

Your comments are much appreciated

Is the content of this page unclear or you think it could be improved? Please add a comment and we will try to improve it accordingly.