-// $Id$
/**
* Copyright (C) 2007 EDIT
* European Distributed Institute of Taxonomy
private ConversationHolder conversation;
+ public static final String INCORRECT_CREDENTIALS_MESSAGE = "Login and/or Password incorrect";
+ public static final String ACCOUNT_LOCKED_MESSAGE = "Account is locked";
+ public static final String EMPTY_CREDENTIALS_MESSAGE = "Login and/or Password empty";
+
public LoginManager(){
- CdmStore.getContextManager().addContextListener(this);
+ CdmStore.getContextManager().addContextListener(this);
}
/**
doAuthenticate(username, password);
} catch (CdmAuthenticationException e) {
MessagingUtils.warningDialog("Could not authenticate", this, e.getMessage());
+ return false;
}
return true;
}
this.notifyObservers();
}
} catch(BadCredentialsException e){
- throw new CdmAuthenticationException("Login and/or Password incorrect", e);
+ throw new CdmAuthenticationException(INCORRECT_CREDENTIALS_MESSAGE, e);
} catch(LockedException e){
- throw new CdmAuthenticationException("Account is locked", e);
+ throw new CdmAuthenticationException(ACCOUNT_LOCKED_MESSAGE, e);
} catch(IllegalArgumentException e){
- throw new CdmAuthenticationException("Login and/or Password empty", e);
+ throw new CdmAuthenticationException(EMPTY_CREDENTIALS_MESSAGE, e);
}
}
+
private void _logGrantedAuthotities(StringBuilder gaText, String indent,
Set<GrantedAuthority> gaSet) {
for(GrantedAuthority ga : gaSet){