Revert "BUG 4624: Use default domain when credentials dont provide one" 43/30143/1
authorRyan Goulding <ryandgoulding@gmail.com>
Tue, 24 Nov 2015 14:28:52 +0000 (14:28 +0000)
committerRyan Goulding <ryandgoulding@gmail.com>
Tue, 24 Nov 2015 14:28:52 +0000 (14:28 +0000)
This reverts commit 4e67c246552d8bb40d5090bc0f572df91cce84ac.

Change-Id: I389426f9f95e6d6c91bc2b300dfe257af992f571
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
aaa-idmlight/src/main/java/org/opendaylight/aaa/idm/IdmLightProxy.java

index 92d3a59cbf493d1c61a4ac60ab5a9abdd7484e06..777c2a499ea2e6939f332714ce0803734efbb132 100644 (file)
@@ -86,9 +86,9 @@ public class IdmLightProxy implements CredentialAuth<PasswordCredentials>,IdMSer
         // 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);
@@ -97,7 +97,7 @@ public class IdmLightProxy implements CredentialAuth<PasswordCredentials>,IdMSer
         // 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);