You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by am...@apache.org on 2002/11/12 21:09:30 UTC
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm JNDIRealm.java
amyroh 2002/11/12 12:09:30
Modified: catalina/src/share/org/apache/catalina/realm JNDIRealm.java
Log:
Port SSL support for JNDIRealm.
Revision Changes Path
1.2 +66 -5 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java
Index: JNDIRealm.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- JNDIRealm.java 18 Jul 2002 16:47:55 -0000 1.1
+++ JNDIRealm.java 12 Nov 2002 20:09:29 -0000 1.2
@@ -190,6 +190,12 @@
/**
+ * The type of authentication to use
+ */
+ protected String authentication = null;
+
+
+ /**
* The connection username for the server we will contact.
*/
protected String connectionName = null;
@@ -235,6 +241,12 @@
/**
+ * The protocol that will be used in the communication with the directory server.
+ */
+ protected String protocol = null;
+
+
+ /**
* The base element for user searches.
*/
protected String userBase = "";
@@ -325,6 +337,28 @@
/**
+ * Return the type of authentication to use.
+ */
+ public String getAuthentication() {
+
+ return authentication;
+
+ }
+
+
+ /**
+ * Set the type of authentication to use.
+ *
+ * @param authentication The authentication
+ */
+ public void setAuthentication(String authentication) {
+
+ this.authentication = authentication;
+
+ }
+
+
+ /**
* Return the connection username for this Realm.
*/
public String getConnectionName() {
@@ -411,6 +445,29 @@
}
+
+ /**
+ * Return the protocol to be used.
+ */
+ public String getProtocol() {
+
+ return protocol;
+
+ }
+
+
+ /**
+ * Set the protocol for this Realm.
+ *
+ * @param protocol The new protocol.
+ */
+ public void setProtocol(String protocol) {
+
+ this.protocol = protocol;
+
+ }
+
+
/**
* Return the base element for user searches.
*/
@@ -1294,6 +1351,11 @@
env.put(Context.SECURITY_CREDENTIALS, connectionPassword);
if (connectionURL != null)
env.put(Context.PROVIDER_URL, connectionURL);
+ if (authentication != null)
+ env.put(Context.SECURITY_AUTHENTICATION, authentication);
+ if (protocol != null)
+ env.put(Context.SECURITY_PROTOCOL, protocol);
+
context = new InitialDirContext(env);
return (context);
@@ -1378,4 +1440,3 @@
}
}
-
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>