1

The documentation seems to suggest that it is not possible to define a form based on the role he'd like to apply for.

<login-config>
  <auth-method>FORM</auth-method>
  <form-login-config>
    <form-login-page>/login.xhtml</form>
    <form-error-page>/loginerror.xhtml</form>
  </form-login-config>
 </login-config>

E.g. navigating to xxx.xx/admin would go to adminlogin.xhtml and navigating to xxx.xx/account would go to login.xhtml.

Is there any way to accomplish this?

PS. Normally you would deploy the adminpanel to a subdomain, though due to specifications this is not possible.

1 Answer 1

0

No, there's no way to accomplish this, and with good reason. User can belong to several roles, and even though you may configer different security-constraint to /admin/, /account/, or /whatever/* the user can grant all these roles, some of them or none. Anyway, this can't be known in advance.

1
  • Hmm, I think I will redesign my entities a bit to better fit this. Since this is a bit of a best practice ofcourse. Thanks for your explanation.
    – Menno
    Apr 2, 2013 at 16:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.