This is an automated email from the ASF dual-hosted git repository.

jinmeiliao pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
     new 198b9e0  GEODE-4076: throw AuthenticationRequiredException when failed 
to find… (#1369)
198b9e0 is described below

commit 198b9e003d0ac9320c707ef8866f7b9569fe40e6
Author: jinmeiliao <jil...@pivotal.io>
AuthorDate: Fri Feb 2 16:08:29 2018 -0800

    GEODE-4076: throw AuthenticationRequiredException when failed to find… 
(#1369)
---
 .../org/apache/geode/internal/security/IntegratedSecurityService.java | 2 +-
 .../apache/geode/internal/security/IntegratedSecurityServiceTest.java | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/security/IntegratedSecurityService.java
 
b/geode-core/src/main/java/org/apache/geode/internal/security/IntegratedSecurityService.java
index 393db2b..eaeceec 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/security/IntegratedSecurityService.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/security/IntegratedSecurityService.java
@@ -186,7 +186,7 @@ public class IntegratedSecurityService implements 
SecurityService {
   @Override
   public ThreadState bindSubject(final Subject subject) {
     if (subject == null) {
-      throw new GemFireSecurityException("Error: Anonymous User");
+      throw new AuthenticationRequiredException("Failed to find the 
authenticated user.");
     }
 
     ThreadState threadState = new SubjectThreadState(subject);
diff --git 
a/geode-core/src/test/java/org/apache/geode/internal/security/IntegratedSecurityServiceTest.java
 
b/geode-core/src/test/java/org/apache/geode/internal/security/IntegratedSecurityServiceTest.java
index 01bc78f..6f8526e 100644
--- 
a/geode-core/src/test/java/org/apache/geode/internal/security/IntegratedSecurityServiceTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/internal/security/IntegratedSecurityServiceTest.java
@@ -35,7 +35,6 @@ import org.junit.experimental.categories.Category;
 
 import org.apache.geode.internal.security.shiro.SecurityManagerProvider;
 import org.apache.geode.security.AuthenticationRequiredException;
-import org.apache.geode.security.GemFireSecurityException;
 import org.apache.geode.security.PostProcessor;
 import org.apache.geode.security.SecurityManager;
 import org.apache.geode.test.junit.categories.UnitTest;
@@ -73,7 +72,8 @@ public class IntegratedSecurityServiceTest {
   @Test
   public void bindSubject_nullSubject_shouldReturn_null() throws Exception {
     assertThatThrownBy(() -> this.securityService.bindSubject(null))
-        
.isInstanceOf(GemFireSecurityException.class).hasMessageContaining("Anonymous 
User");
+        .isInstanceOf(AuthenticationRequiredException.class)
+        .hasMessageContaining("Failed to find the authenticated user");
   }
 
   @Test

-- 
To stop receiving notification emails like this one, please contact
jinmeil...@apache.org.

Reply via email to