Package net.sf.esims.model.valueobject

Examples of net.sf.esims.model.valueobject.UserCredentialIfc


public class LoginService implements LoginServiceIfc {
 
  private LoginDAOIfc loginDAO;

  public UserCredentialIfc validateCredentials(String userName, String password) {
    UserCredentialIfc userCredential=null;
    if(isEmpty(userName))
      throw new IllegalArgumentException("Username found null/empty @ LoginService:validateCredentials");
    if(isEmpty(password))
      throw new IllegalArgumentException("Password found null/empty @ LoginService:validateCredentials");
    userCredential=loginDAO.getUserCredentials(userName, password);
View Full Code Here


  @SpringBean private LoginServiceIfc loginService;


  @DefaultHandler
  public Resolution login(){
    UserCredentialIfc userCredential=null;
    userCredential = this.loginService.validateCredentials(this.userName, this.password);
   
    if(userCredential != null){
     
      //Check if the account has been locked by the admin
      if(! userCredential.isActive()){
        this.getContext().logout();
        return new ForwardResolution("/WEB-INF/pages/_account_locked.jsp");
      }
      this.getContext().setUser(userCredential);
      return new ForwardResolution("/WEB-INF/pages/home.jsp");
View Full Code Here

TOP

Related Classes of net.sf.esims.model.valueobject.UserCredentialIfc

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.