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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]