You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2006/01/23 23:12:04 UTC
svn commit: r371686 -
/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java
Author: markt
Date: Mon Jan 23 14:12:00 2006
New Revision: 371686
URL: http://svn.apache.org/viewcvs?rev=371686&view=rev
Log:
Make it easier to customise the mapping between certificate DN and
username when authenticating using CLIENT-CERT.
Modified:
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java
Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java?rev=371686&r1=371685&r2=371686&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java (original)
+++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java Mon Jan 23 14:12:00 2006
@@ -409,7 +409,7 @@
}
// Check the existence of the client Principal in our database
- return (getPrincipal(certs[0].getSubjectDN().getName()));
+ return (getPrincipal(certs[0]));
}
@@ -1132,6 +1132,14 @@
*/
protected abstract String getPassword(String username);
+
+ /**
+ * Return the Principal associated with the given certificate.
+ */
+ protected Principal getPrincipal(X509Certificate usercert) {
+ return(getPrincipal(usercert.getSubjectDN().getName()));
+ }
+
/**
* Return the Principal associated with the given user name.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org