[jboss-cvs] JBossAS SVN: r73913 - projects/security/security-spi/trunk/spi/src/main/org/jboss/security.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Jun 2 08:27:48 EDT 2008


Author: anil.saldhana at jboss.com
Date: 2008-06-02 08:27:48 -0400 (Mon, 02 Jun 2008)
New Revision: 73913

Added:
   projects/security/security-spi/trunk/spi/src/main/org/jboss/security/ServerAuthenticationManager.java
Modified:
   projects/security/security-spi/trunk/spi/src/main/org/jboss/security/AuthenticationManager.java
Log:
SECURITY-228: JSR-196 related isValid method goes into ServerAuthenticationManager

Modified: projects/security/security-spi/trunk/spi/src/main/org/jboss/security/AuthenticationManager.java
===================================================================
--- projects/security/security-spi/trunk/spi/src/main/org/jboss/security/AuthenticationManager.java	2008-06-02 12:25:34 UTC (rev 73912)
+++ projects/security/security-spi/trunk/spi/src/main/org/jboss/security/AuthenticationManager.java	2008-06-02 12:27:48 UTC (rev 73913)
@@ -25,8 +25,6 @@
 import java.util.Map;
 
 import javax.security.auth.Subject;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.message.MessageInfo;
 
 /** The AuthenticationManager is responsible for validating credentials
  * associated with principals.
@@ -36,7 +34,7 @@
  * @version $Revision$
  */
 public interface AuthenticationManager extends BaseSecurityManager
-{ 
+{   
    /** The isValid method is invoked to see if a user identity and associated
     credentials as known in the operational environment are valid proof of the
     user identity. Typically this is implemented as a call to isValid with a
@@ -66,29 +64,8 @@
     @return true if the principal, credential pair is valid, false otherwise.
    */
    boolean isValid(Principal principal, Object credential,
-      Subject activeSubject);
+      Subject activeSubject); 
    
-   /**
-    * Authenticate a Subject given the request response JSR-196(JASPI) messages
-    * @param requestMessage 
-    * @param clientSubject Pre-created or null subject
-    * @param layer Message Layer for the JASPI (Optional):  Default: HTTP
-    * @return true if client subject is valid, false otherwise
-    * @deprecated
-    */
-   boolean isValid(MessageInfo requestMessage, Subject clientSubject, String layer);
-   
-   /**
-    * Authenticate a Subject given the request response JSR-196(JASPI) messages
-    * @param requestMessage 
-    * @param clientSubject Pre-created or null subject
-    * @param layer Message Layer for the JASPI (Optional):  Default: HTTP
-    * @param callbackHandler CallbackHandler
-    * @return true if client subject is valid, false otherwise
-    */
-   boolean isValid(MessageInfo requestMessage, Subject clientSubject, String layer,
-         CallbackHandler callbackHandler);
-   
    /** Get the currently authenticated subject. Historically implementations of
     AuthenticationManager isValid methods had the side-effect of setting the
     active Subject. This caused problems with multi-threaded usecases where the

Added: projects/security/security-spi/trunk/spi/src/main/org/jboss/security/ServerAuthenticationManager.java
===================================================================
--- projects/security/security-spi/trunk/spi/src/main/org/jboss/security/ServerAuthenticationManager.java	                        (rev 0)
+++ projects/security/security-spi/trunk/spi/src/main/org/jboss/security/ServerAuthenticationManager.java	2008-06-02 12:27:48 UTC (rev 73913)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.security;
+
+import javax.security.auth.Subject;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.message.MessageInfo;
+
+/**
+ * AuthenticationManager with JSR-196 Semantics
+ * @author Anil.Saldhana at redhat.com
+ * @since May 30, 2008
+ */
+public interface ServerAuthenticationManager extends AuthenticationManager
+{  
+   /**
+    * Authenticate a Subject given the request response JSR-196(JASPI) messages
+    * @param requestMessage 
+    * @param clientSubject Pre-created or null subject
+    * @param layer Message Layer for the JASPI (Optional):  Default: HTTP
+    * @param callbackHandler CallbackHandler
+    * @return true if client subject is valid, false otherwise
+    */
+   boolean isValid(MessageInfo requestMessage, Subject clientSubject, String layer,
+         CallbackHandler callbackHandler);
+}
\ No newline at end of file




More information about the jboss-cvs-commits mailing list