static final String TEST_SIGNIN_QUERY = "pubid=myid";
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
for (int i = 0; i < callbacks.length; i++) {
if (callbacks[i] instanceof HomeRealmCallback) {
HomeRealmCallback callback = (HomeRealmCallback) callbacks[i];
callback.setHomeRealm(TEST_HOME_REALM);
} else if (callbacks[i] instanceof RealmCallback) {
RealmCallback callback = (RealmCallback)callbacks[i];
callback.setRealm(TEST_WTREALM);
} else if (callbacks[i] instanceof WAuthCallback) {
WAuthCallback callback = (WAuthCallback) callbacks[i];
callback.setWauth(TEST_WAUTH);
} else if (callbacks[i] instanceof IDPCallback) {
IDPCallback callback = (IDPCallback) callbacks[i];
callback.setIssuerUrl(new URL(TEST_IDP));
} else if (callbacks[i] instanceof SignInQueryCallback) {
SignInQueryCallback callback = (SignInQueryCallback) callbacks[i];
Map<String, String> queryParamMap = new HashMap<String, String>();
queryParamMap.put("pubid", "myid");
queryParamMap.put("testenc", "<=>");
callback.setSignInQueryParamMap(queryParamMap);
} else {
throw new UnsupportedCallbackException(callbacks[i], "Unrecognized Callback");
}
}
}