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 2014/09/25 21:32:54 UTC
svn commit: r1627604 -
/tomcat/trunk/java/org/apache/catalina/CredentialHandler.java
Author: markt
Date: Thu Sep 25 19:32:53 2014
New Revision: 1627604
URL: http://svn.apache.org/r1627604
Log:
Add docs
Modified:
tomcat/trunk/java/org/apache/catalina/CredentialHandler.java
Modified: tomcat/trunk/java/org/apache/catalina/CredentialHandler.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/CredentialHandler.java?rev=1627604&r1=1627603&r2=1627604&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/CredentialHandler.java (original)
+++ tomcat/trunk/java/org/apache/catalina/CredentialHandler.java Thu Sep 25 19:32:53 2014
@@ -16,9 +16,35 @@
*/
package org.apache.catalina;
+/**
+ * This interface is used by the {@link Realm} to compare the user provided
+ * credentials with the credentials stored in the {@link Realm} for that user.
+ */
public interface CredentialHandler {
+ /**
+ * Checks to see if the input credentials match the stored credentials
+ *
+ * @param inputCredentials User provided credentials
+ * @param storedCredentials Credentials stored in the {@link Realm}
+ *
+ * @return <code>true</code> if the inputCredentials match the
+ * storedCredentials, otherwise <code>false</code>
+ */
boolean matches(String inputCredentials, String storedCredentials);
+ /**
+ * Generates the equivalent stored credentials for the given input
+ * credentials.
+ *
+ * @param inputCredentials User provided credentials
+ * @param salt Salt, if any
+ * @param iterations Number of iterations of the algorithm associated
+ * with this CredentialHandler applied to the
+ * inputCredentials to generate the equivalent
+ * stored credentials
+ * @return The equivalent stored credentials for the given input
+ * credentials
+ */
String mutate(String inputCredentials, byte[] salt, int iterations);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org