Author: markt
Date: Wed Jun 17 08:37:52 2015
New Revision: 1685943
URL: http://svn.apache.org/r1685943
Log:
Use i18n for error message
Patch provided by fjodorver
Modified:
tomcat/trunk/java/org/apache/catalina/authenticator/LocalStrings.properties
tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/JaspicCallbackHandler.java
Modified:
tomcat/trunk/java/org/apache/catalina/authenticator/LocalStrings.properties
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/authenticator/LocalStrings.properties?rev=1685943&r1=1685942&r2=1685943&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/authenticator/LocalStrings.properties
(original)
+++ tomcat/trunk/java/org/apache/catalina/authenticator/LocalStrings.properties
Wed Jun 17 08:37:52 2015
@@ -27,6 +27,7 @@ authenticator.notContext=Configuration e
authenticator.requestBodyTooBig=The request body was too large to be cached
during the authentication process
authenticator.sessionExpired=The time allowed for the login process has been
exceeded. If you wish to continue you must either click back twice and re-click
the link you requested or close and re-open your browser
authenticator.unauthorized=Cannot authenticate with the provided credentials
+authenticator.jaspic.unknownCallback=Unknown JASPIC callback: {0}
digestAuthenticator.cacheRemove=A valid entry has been removed from client
nonce cache to make room for new entries. A replay attack is now possible. To
prevent the possibility of replay attacks, reduce nonceValidity or increase
cnonceCacheSize. Further warnings of this type will be suppressed for 5 minutes.
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=1685943&r1=1685942&r2=1685943&view=diff
==============================================================================
---
tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/JaspicCallbackHandler.java
(original)
+++
tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/JaspicCallbackHandler.java
Wed Jun 17 08:37:52 2015
@@ -30,8 +30,10 @@ import javax.security.auth.message.callb
import org.apache.catalina.Realm;
import org.apache.catalina.realm.GenericPrincipal;
+import org.apache.tomcat.util.res.StringManager;
public class JaspicCallbackHandler implements CallbackHandler {
+ protected static final StringManager sm =
StringManager.getManager(JaspicCallbackHandler.class);
private Realm realm;
@@ -61,7 +63,7 @@ public class JaspicCallbackHandler imple
} else if (callback instanceof PasswordValidationCallback) {
handlePasswordValidationCallback((PasswordValidationCallback)
callback);
} else {
- throw new IllegalStateException("Unknown callback!");
+ throw new
IllegalStateException(sm.getString("authenticator.jaspic.unknownCallback",
callback.getClass()));
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]