Reputation: 31
Is it possible to combine that stuff? I just need a simple log-in page even without db backend :) Username/pwd should be stored in the securityContext...
Can somebody provide me a tutorial or show how the things must be configured?
Thank you!
Upvotes: 3
Views: 6449
Reputation: 22524
There are several ways to do this:
The "plain HTML way". In this case you use a standard Spring Security configuration and use a standard HTML page, pointing the submit form to Spring Security login-url.
The "JSF 2.0 way". What I do in this case is implement a backing bean for the login page and register an ActionListener for the submit button that dispatches to the login-url using FacesContext.getExternalContext(),dispatch(), and then calls FacesContext.responseComplete(), ending the request lifecycle. You might need to tweak your web.xml
to allow Spring Security to intercept FORWARD requests for the login-url.
Upvotes: 1