geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r552956 - in /geronimo/specs/branches/geronimo-spec-jaspi: ./ src/main/java/javax/security/auth/message/ src/main/java/javax/security/auth/message/callback/ src/main/java/javax/security/auth/message/config/
Date Tue, 03 Jul 2007 19:20:40 GMT
Author: djencks
Date: Tue Jul  3 12:20:39 2007
New Revision: 552956

URL: http://svn.apache.org/viewvc?view=rev&rev=552956
Log:
update to pfd2 apis

Modified:
    geronimo/specs/branches/geronimo-spec-jaspi/pom.xml
    geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/AuthStatus.java
    geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/MessagePolicy.java
    geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/callback/PasswordValidationCallback.java
    geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/callback/PrivateKeyCallback.java
    geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/config/AuthConfig.java
    geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/config/AuthConfigFactory.java
    geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/config/ClientAuthConfig.java
    geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/config/ServerAuthConfig.java

Modified: geronimo/specs/branches/geronimo-spec-jaspi/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/geronimo-spec-jaspi/pom.xml?view=diff&rev=552956&r1=552955&r2=552956
==============================================================================
--- geronimo/specs/branches/geronimo-spec-jaspi/pom.xml (original)
+++ geronimo/specs/branches/geronimo-spec-jaspi/pom.xml Tue Jul  3 12:20:39 2007
@@ -2,7 +2,7 @@
   <parent>
     <artifactId>specs</artifactId>
     <groupId>org.apache.geronimo.specs</groupId>
-    <version>1.2-SNAPSHOT</version>
+    <version>1.2</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>geronimo-jaspi_1.0pr_spec</artifactId>

Modified: geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/AuthStatus.java
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/AuthStatus.java?view=diff&rev=552956&r1=552955&r2=552956
==============================================================================
--- geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/AuthStatus.java
(original)
+++ geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/AuthStatus.java
Tue Jul  3 12:20:39 2007
@@ -27,4 +27,8 @@
     public static final AuthStatus SEND_FAILURE = new AuthStatus();
     public static final AuthStatus SEND_SUCCESS = new AuthStatus();
     public static final AuthStatus SUCCESS = new AuthStatus();
+
+    private AuthStatus() {
+    }
+    
 }

Modified: geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/MessagePolicy.java
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/MessagePolicy.java?view=diff&rev=552956&r1=552955&r2=552956
==============================================================================
--- geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/MessagePolicy.java
(original)
+++ geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/MessagePolicy.java
Tue Jul  3 12:20:39 2007
@@ -50,7 +50,7 @@
         static String AUTHENTICATE_RECIPIENT = "javax.security.auth.message.AUTHENTICATE_RECIPIENT";
         static String AUTHENTICATE_SENDER = "javax.security.auth.message.AUTHENTICATE_SENDER";
 
-        public String getID();
+        String getID();
     }
 
     public static interface Target {
@@ -68,9 +68,6 @@
         private final ProtectionPolicy protectionPolicy;
 
         public TargetPolicy(Target[] targets, ProtectionPolicy protectionPolicy) throws IllegalArgumentException
{
-            if (targets == null) {
-                throw new IllegalArgumentException("targets is null");
-            }
             if (protectionPolicy == null) {
                 throw new IllegalArgumentException("protectionPolicy is null");
             }
@@ -79,7 +76,7 @@
         }
 
         public Target[] getTargets() {
-            if (targets.length == 0) {
+            if (targets == null || targets.length == 0) {
                 return null;
             }
             return targets;

Modified: geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/callback/PasswordValidationCallback.java
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/callback/PasswordValidationCallback.java?view=diff&rev=552956&r1=552955&r2=552956
==============================================================================
--- geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/callback/PasswordValidationCallback.java
(original)
+++ geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/callback/PasswordValidationCallback.java
Tue Jul  3 12:20:39 2007
@@ -18,6 +18,8 @@
 package javax.security.auth.message.callback;
 
 import javax.security.auth.callback.Callback;
+import javax.security.auth.Subject;
+
 import java.util.Arrays;
 
 /**
@@ -25,15 +27,21 @@
  */
 public class PasswordValidationCallback implements Callback {
 
+    private final Subject subject;
     private final String username;
     private char[] password;
     private boolean result;
 
-    public PasswordValidationCallback(String username, char[] password) {
+    public PasswordValidationCallback(Subject subject, String username, char[] password)
{
+        this.subject = subject;
         this.username = username;
         this.password = password;
     }
 
+    public Subject getSubject() {
+        return subject;
+    }
+
     public String getUsername() {
         return username;
     }
@@ -47,7 +55,7 @@
         password = new char[0];
     }
 
-    public boolean isResult() {
+    public boolean getResult() {
         return result;
     }
 

Modified: geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/callback/PrivateKeyCallback.java
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/callback/PrivateKeyCallback.java?view=diff&rev=552956&r1=552955&r2=552956
==============================================================================
--- geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/callback/PrivateKeyCallback.java
(original)
+++ geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/callback/PrivateKeyCallback.java
Tue Jul  3 12:20:39 2007
@@ -69,6 +69,25 @@
         }
     }
 
+    public static class DigestRequest implements Request {
+        private final byte[] digest;
+        private final String algorithm;
+
+
+        public DigestRequest(byte[] digest, String algorithm) {
+            this.digest = digest;
+            this.algorithm = algorithm;
+        }
+
+        public byte[] getDigest() {
+            return digest;
+        }
+
+        public String getAlgorithm() {
+            return algorithm;
+        }
+    }
+
     public static class SubjectKeyIDRequest implements Request {
 
         private final byte[] subjectKeyID;

Modified: geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/config/AuthConfig.java
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/config/AuthConfig.java?view=diff&rev=552956&r1=552955&r2=552956
==============================================================================
--- geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/config/AuthConfig.java
(original)
+++ geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/config/AuthConfig.java
Tue Jul  3 12:20:39 2007
@@ -27,9 +27,11 @@
 
     String getAppContext();
 
+    String getAuthContextID(MessageInfo messageInfo) throws IllegalArgumentException;
+
     String getMessageLayer();
 
-    String getOperation(MessageInfo messageInfo) throws IllegalArgumentException;
+    boolean isProtected();
 
     void refresh() throws AuthException, SecurityException;
 }

Modified: geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/config/AuthConfigFactory.java
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/config/AuthConfigFactory.java?view=diff&rev=552956&r1=552955&r2=552956
==============================================================================
--- geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/config/AuthConfigFactory.java
(original)
+++ geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/config/AuthConfigFactory.java
Tue Jul  3 12:20:39 2007
@@ -28,6 +28,8 @@
  */
 public abstract class AuthConfigFactory {
 
+    public static final String DEFAULT_FACTORY_SECURITY_PROPERTY = "authconfigprovider.factory";
+
     private static AuthConfigFactory factory;
     private static ClassLoader contextClassLoader;
 
@@ -38,7 +40,7 @@
                                 return Thread.currentThread().getContextClassLoader();
                             }
                         });
-    };
+    }
     
     public static AuthConfigFactory getFactory() throws AuthException, SecurityException
{
         SecurityManager sm = System.getSecurityManager();
@@ -49,7 +51,7 @@
             String className = (String) java.security.AccessController
                             .doPrivileged(new java.security.PrivilegedAction() {
                                 public Object run() {
-                                    return java.security.Security.getProperty("authconfigprovider.factory");
+                                    return java.security.Security.getProperty("DEFAULT_FACTORY_SECURITY_PROPERTY");
                                 }
                             });
             if (className == null) {
@@ -85,6 +87,10 @@
         AuthConfigFactory.factory = factory;
     }
 
+
+    protected AuthConfigFactory() {
+    }
+
     public abstract String[] detachListener(RegistrationListener listener, String layer,
String appContext) throws SecurityException;
 
     public abstract AuthConfigProvider getConfigProvider(String layer, String appContext,
RegistrationListener listener);
@@ -95,6 +101,8 @@
 
     public abstract void refresh() throws AuthException, SecurityException;
 
+    public abstract String registerConfigProvider(AuthConfigProvider provider, String layer,
String appContext, String description) throws AuthException, SecurityException;
+
     public abstract String registerConfigProvider(String className, Map properties, String
layer, String appContext, String description) throws AuthException, SecurityException;
 
     public abstract boolean removeRegistration(String registrationID) throws SecurityException;
@@ -106,6 +114,9 @@
         String getDescription();
 
         String getMessageLayer();
+
+        boolean isPersistent();
+        
     }
 
 }

Modified: geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/config/ClientAuthConfig.java
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/config/ClientAuthConfig.java?view=diff&rev=552956&r1=552955&r2=552956
==============================================================================
--- geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/config/ClientAuthConfig.java
(original)
+++ geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/config/ClientAuthConfig.java
Tue Jul  3 12:20:39 2007
@@ -27,5 +27,5 @@
  */
 public interface ClientAuthConfig extends AuthConfig {
 
-    ClientAuthContext getAuthContext(String operation, Subject clientSubject, Map properties)
throws AuthException;
+    ClientAuthContext getAuthContext(String authContextID, Subject clientSubject, Map properties)
throws AuthException;
 }

Modified: geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/config/ServerAuthConfig.java
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/config/ServerAuthConfig.java?view=diff&rev=552956&r1=552955&r2=552956
==============================================================================
--- geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/config/ServerAuthConfig.java
(original)
+++ geronimo/specs/branches/geronimo-spec-jaspi/src/main/java/javax/security/auth/message/config/ServerAuthConfig.java
Tue Jul  3 12:20:39 2007
@@ -27,5 +27,5 @@
  */
 public interface ServerAuthConfig extends AuthConfig {
 
-    ServerAuthContext getAuthContext(String operation, Subject serviceSubject, Map properties)
throws AuthException;
+    ServerAuthContext getAuthContext(String authContextID, Subject serviceSubject, Map properties)
throws AuthException;
 }



Mime
View raw message