Author: max.andersen(a)jboss.com
Date: 2011-11-29 15:48:55 -0500 (Tue, 29 Nov 2011)
New Revision: 36746
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/src/org/jboss/ide/eclipse/as/internal/management/as71/AS71Manager.java
Log:
actually handle realm similar to arquillian code. JBIDE-10224
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/src/org/jboss/ide/eclipse/as/internal/management/as71/AS71Manager.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/src/org/jboss/ide/eclipse/as/internal/management/as71/AS71Manager.java 2011-11-29
20:39:52 UTC (rev 36745)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/src/org/jboss/ide/eclipse/as/internal/management/as71/AS71Manager.java 2011-11-29
20:48:55 UTC (rev 36746)
@@ -38,6 +38,7 @@
import javax.security.auth.callback.NameCallback;
import javax.security.auth.callback.PasswordCallback;
import javax.security.auth.callback.UnsupportedCallbackException;
+import javax.security.sasl.RealmCallback;
import javax.security.sasl.RealmChoiceCallback;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -94,8 +95,10 @@
NameCallback name = null;
PasswordCallback pass = null;
for (Callback current : callbacks) {
- if (current instanceof RealmChoiceCallback) {
- throw new UnsupportedCallbackException(current, "Realm choice not
currently supported.");
+ if (current instanceof RealmCallback) {
+ RealmCallback rcb = (RealmCallback) current;
+ String defaultText = rcb.getDefaultText();
+ rcb.setText(defaultText); // For now just use the realm suggested.
}
if (current instanceof NameCallback) {
name = (NameCallback) current;
Show replies by date