Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @ManagedBean
- @SessionScoped
- public class loginBean() {
- private String username = null;
- private String password = null;
- private UUID uuid = null;
- private boolean rememberMe = false;
- public void doLogin() {
- checkCookies(); // this method sets the property values after checking if
- // username & uuid match the ones saved previously
- if (username != null && uuid != null && rememberMe) {
- // authenticate automatically. Here I don't know how to proceed, because
- // I don't have the password, unless I have saved it in the application's db,
- // duplicating it because it's already in LDAP server.
- } else {
- httpServletRequest.login(username, password); // this uses LDAP behind JAAS
- createCookies(); // this method also saves username & uuid in the app's db
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement