// TODO: ensure domain names are unique change to 'getDomain'
debug("get domain");
try {
- domain = ServiceLocator.INSTANCE.getStore().readDomain(credsDomain);
+ domain = ServiceLocator.INSTANCE.getStore().readDomain(creds.domain());
if(domain==null){
- throw new AuthenticationException("Domain :" + credsDomain + " does not exist");
+ throw new AuthenticationException("Domain :" + creds.domain() + " does not exist");
}
} catch (IDMStoreException e) {
throw new AuthenticationException("Error while fetching domain",e);
// check to see user exists and passes cred check
try {
debug("check user / pwd");
- Users users = ServiceLocator.INSTANCE.getStore().getUsers(creds.username(), credsDomain);
+ Users users = ServiceLocator.INSTANCE.getStore().getUsers(creds.username(),creds.domain());
List<User> userList = users.getUsers();
if (userList.size()==0) {
throw new AuthenticationException("User :" + creds.username() + " does not exist in domain "+credsDomain);