tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1687706 - in /tomcat/trunk/java/org/apache/catalina/authenticator/jaspic: ./ provider/ provider/modules/
Date Fri, 26 Jun 2015 07:56:50 GMT
Author: markt
Date: Fri Jun 26 07:56:50 2015
New Revision: 1687706

URL: http://svn.apache.org/r1687706
Log:
Some javadoc's for JASPIC implementation
Patch by fjodorver

Modified:
    tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/JaspicCallbackHandler.java
    tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/PrincipalGroupCallback.java
    tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/provider/TomcatAuthConfigProvider.java
    tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/provider/modules/BasicAuthModule.java
    tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/provider/modules/TomcatAuthModule.java

Modified: tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/JaspicCallbackHandler.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/JaspicCallbackHandler.java?rev=1687706&r1=1687705&r2=1687706&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/JaspicCallbackHandler.java
(original)
+++ tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/JaspicCallbackHandler.java
Fri Jun 26 07:56:50 2015
@@ -31,7 +31,9 @@ import org.apache.catalina.Realm;
 import org.apache.tomcat.util.res.StringManager;
 
 /**
- * Callback handler which converts callbacks to realm.
+ * Callback handler which uses callbacks to construct JAAS Subject, which
+ * contains {@link org.apache.catalina.realm.GenericPrincipal} in private
+ * credentials.
  */
 public class JaspicCallbackHandler implements CallbackHandler {
     protected static final StringManager sm = StringManager.getManager(JaspicCallbackHandler.class);

Modified: tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/PrincipalGroupCallback.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/PrincipalGroupCallback.java?rev=1687706&r1=1687705&r2=1687706&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/PrincipalGroupCallback.java
(original)
+++ tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/PrincipalGroupCallback.java
Fri Jun 26 07:56:50 2015
@@ -28,7 +28,7 @@ import javax.security.auth.message.callb
 import org.apache.catalina.realm.GenericPrincipal;
 
 /**
- * This class merges two principal callbacks into one tomcat's
+ * This class uses callbacks to construct JAAS Subject with
  * {@link GenericPrincipal}.
  */
 public class PrincipalGroupCallback {
@@ -44,6 +44,10 @@ public class PrincipalGroupCallback {
         this.groupPrincipalCallback = groupPrincipalCallback;
     }
 
+
+    /**
+     * Enrich JAAS subject with Tomcat's {@link GenericPrincipal}.
+     */
     public void configureSubject() {
         GenericPrincipal principal = getPrincipal();
         if (principal == null) {
@@ -66,7 +70,8 @@ public class PrincipalGroupCallback {
     }
 
     /**
-     * Get tomcat's principal, which contains user principal and roles
+     * Get tomcat's principal, which contains user principal and roles.
+     *
      * @return {@link GenericPrincipal}
      */
     public GenericPrincipal getPrincipal() {

Modified: tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/provider/TomcatAuthConfigProvider.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/provider/TomcatAuthConfigProvider.java?rev=1687706&r1=1687705&r2=1687706&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/provider/TomcatAuthConfigProvider.java
(original)
+++ tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/provider/TomcatAuthConfigProvider.java
Fri Jun 26 07:56:50 2015
@@ -29,6 +29,10 @@ import org.apache.catalina.Context;
 import org.apache.catalina.Realm;
 import org.apache.tomcat.util.descriptor.web.LoginConfig;
 
+/**
+ * Tomcat's context based JASPIC authentication provider. It returns authentication
+ * modules depending on context login-config setup.
+ */
 public class TomcatAuthConfigProvider implements AuthConfigProvider {
 
     private Map<String, String> providerProperties;

Modified: tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/provider/modules/BasicAuthModule.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/provider/modules/BasicAuthModule.java?rev=1687706&r1=1687705&r2=1687706&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/provider/modules/BasicAuthModule.java
(original)
+++ tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/provider/modules/BasicAuthModule.java
Fri Jun 26 07:56:50 2015
@@ -40,6 +40,9 @@ import org.apache.tomcat.util.buf.ByteCh
 import org.apache.tomcat.util.buf.MessageBytes;
 import org.apache.tomcat.util.codec.binary.Base64;
 
+/**
+ * This class implements JASPIC based HTTP BASIC authentication.
+ */
 public class BasicAuthModule extends TomcatAuthModule {
 
     private Class<?>[] supportedMessageTypes = new Class[] { HttpServletRequest.class,

Modified: tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/provider/modules/TomcatAuthModule.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/provider/modules/TomcatAuthModule.java?rev=1687706&r1=1687705&r2=1687706&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/provider/modules/TomcatAuthModule.java
(original)
+++ tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/provider/modules/TomcatAuthModule.java
Fri Jun 26 07:56:50 2015
@@ -28,6 +28,9 @@ import javax.security.auth.message.modul
 import org.apache.catalina.authenticator.jaspic.MessageInfoImpl;
 import org.apache.tomcat.util.res.StringManager;
 
+/**
+ * Base class for JASPIC authentication modules.
+ */
 public abstract class TomcatAuthModule implements ServerAuthModule {
 
     public static final String REALM_NAME = "javax.servlet.http.realmName";
@@ -67,8 +70,18 @@ public abstract class TomcatAuthModule i
     }
 
 
-     @SuppressWarnings("rawtypes")
-     public abstract void initializeModule(MessagePolicy requestPolicy,
-             MessagePolicy responsePolicy, CallbackHandler handler, Map options)
-             throws AuthException;
+    /**
+     * Every subclass must extend this method in order to be initialized.
+     * Firstly, we initialize abstract module, then subclasses.
+     *
+     * @param requestPolicy
+     * @param responsePolicy
+     * @param handler
+     * @param options
+     * @throws AuthException
+     */
+    @SuppressWarnings("rawtypes")
+    public abstract void initializeModule(MessagePolicy requestPolicy,
+            MessagePolicy responsePolicy, CallbackHandler handler, Map options)
+            throws AuthException;
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message