You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by ra...@apache.org on 2019/01/09 17:26:26 UTC

[tomee] 38/48: TOMEE-2365 - Removed unneeded methods.

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

radcortez pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee.git

commit ab0eb4c8491df1393c99b38ab0b1f9386462b5d3
Author: Roberto Cortez <ra...@yahoo.com>
AuthorDate: Fri Dec 28 17:07:25 2018 +0000

    TOMEE-2365 - Removed unneeded methods.
---
 .../security/cdi/BasicAuthenticationMechanism.java   | 20 ++------------------
 .../security/cdi/DefaultAuthenticationMechanism.java | 13 -------------
 .../security/cdi/FormAuthenticationMechanism.java    | 13 -------------
 3 files changed, 2 insertions(+), 44 deletions(-)

diff --git a/tomee/tomee-security/src/main/java/org/apache/tomee/security/cdi/BasicAuthenticationMechanism.java b/tomee/tomee-security/src/main/java/org/apache/tomee/security/cdi/BasicAuthenticationMechanism.java
index 3bb5bea..8b86323 100644
--- a/tomee/tomee-security/src/main/java/org/apache/tomee/security/cdi/BasicAuthenticationMechanism.java
+++ b/tomee/tomee-security/src/main/java/org/apache/tomee/security/cdi/BasicAuthenticationMechanism.java
@@ -16,8 +16,6 @@
  */
 package org.apache.tomee.security.cdi;
 
-import org.apache.tomee.security.identitystore.TomEEIdentityStoreHandler;
-
 import javax.enterprise.context.ApplicationScoped;
 import javax.inject.Inject;
 import javax.security.enterprise.AuthenticationException;
@@ -26,6 +24,7 @@ import javax.security.enterprise.authentication.mechanism.http.HttpAuthenticatio
 import javax.security.enterprise.authentication.mechanism.http.HttpMessageContext;
 import javax.security.enterprise.credential.BasicAuthenticationCredential;
 import javax.security.enterprise.identitystore.CredentialValidationResult;
+import javax.security.enterprise.identitystore.IdentityStoreHandler;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.util.Optional;
@@ -36,7 +35,7 @@ import static javax.ws.rs.core.HttpHeaders.AUTHORIZATION;
 @ApplicationScoped
 public class BasicAuthenticationMechanism implements HttpAuthenticationMechanism {
     @Inject
-    private TomEEIdentityStoreHandler identityStoreHandler;
+    private IdentityStoreHandler identityStoreHandler;
 
     @Override
     public AuthenticationStatus validateRequest(final HttpServletRequest request,
@@ -64,21 +63,6 @@ public class BasicAuthenticationMechanism implements HttpAuthenticationMechanism
         return httpMessageContext.responseUnauthorized();
     }
 
-    @Override
-    public AuthenticationStatus secureResponse(final HttpServletRequest request,
-                                               final HttpServletResponse response,
-                                               final HttpMessageContext httpMessageContext)
-            throws AuthenticationException {
-        return null;
-    }
-
-    @Override
-    public void cleanSubject(final HttpServletRequest request,
-                             final HttpServletResponse response,
-                             final HttpMessageContext httpMessageContext) {
-
-    }
-
     private BasicAuthenticationCredential parseAuthenticationHeader(final String authenticationHeader) {
         return Optional.ofNullable(authenticationHeader)
                        .filter(header -> !header.isEmpty())
diff --git a/tomee/tomee-security/src/main/java/org/apache/tomee/security/cdi/DefaultAuthenticationMechanism.java b/tomee/tomee-security/src/main/java/org/apache/tomee/security/cdi/DefaultAuthenticationMechanism.java
index 54bb000..cd18a17 100644
--- a/tomee/tomee-security/src/main/java/org/apache/tomee/security/cdi/DefaultAuthenticationMechanism.java
+++ b/tomee/tomee-security/src/main/java/org/apache/tomee/security/cdi/DefaultAuthenticationMechanism.java
@@ -64,18 +64,5 @@ public class DefaultAuthenticationMechanism implements HttpAuthenticationMechani
                 throws AuthenticationException {
             return httpMessageContext.doNothing();
         }
-
-        @Override
-        public AuthenticationStatus secureResponse(final HttpServletRequest request, final HttpServletResponse response,
-                                                   final HttpMessageContext httpMessageContext)
-                throws AuthenticationException {
-            return httpMessageContext.doNothing();
-        }
-
-        @Override
-        public void cleanSubject(final HttpServletRequest request, final HttpServletResponse response,
-                                 final HttpMessageContext httpMessageContext) {
-
-        }
     }
 }
diff --git a/tomee/tomee-security/src/main/java/org/apache/tomee/security/cdi/FormAuthenticationMechanism.java b/tomee/tomee-security/src/main/java/org/apache/tomee/security/cdi/FormAuthenticationMechanism.java
index f60e7ea..08f482b 100644
--- a/tomee/tomee-security/src/main/java/org/apache/tomee/security/cdi/FormAuthenticationMechanism.java
+++ b/tomee/tomee-security/src/main/java/org/apache/tomee/security/cdi/FormAuthenticationMechanism.java
@@ -56,19 +56,6 @@ public class FormAuthenticationMechanism implements HttpAuthenticationMechanism,
         return httpMessageContext.doNothing();
     }
 
-    @Override
-    public AuthenticationStatus secureResponse(final HttpServletRequest request, final HttpServletResponse response,
-                                               final HttpMessageContext httpMessageContext)
-            throws AuthenticationException {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public void cleanSubject(final HttpServletRequest request, final HttpServletResponse response,
-                             final HttpMessageContext httpMessageContext) {
-        throw new UnsupportedOperationException();
-    }
-
     public LoginToContinue getLoginToContinue() {
         return loginToContinue.get();
     }