String issuerURL = null;
if (issuerObj instanceof String) {
issuerURL = (String)issuerObj;
} else if (issuerObj instanceof CallbackHandler) {
CallbackHandler issuerCB = (CallbackHandler)issuerObj;
IDPCallback callback = new IDPCallback(request);
issuerCB.handle(new Callback[] {callback});
issuerURL = callback.getIssuerUrl().toString();
}
LOG.info("Issuer url: " + issuerURL);
if (issuerURL != null && issuerURL.length() > 0) {
redirectURL = issuerURL;
}
Object wAuthObj = ((FederationProtocol)config.getProtocol()).getAuthenticationType();
String wAuth = null;
if (wAuthObj != null) {
if (wAuthObj instanceof String) {
wAuth = (String)wAuthObj;
} else if (wAuthObj instanceof CallbackHandler) {
CallbackHandler wauthCB = (CallbackHandler)wAuthObj;
WAuthCallback callback = new WAuthCallback(request);
wauthCB.handle(new Callback[] {callback});
wAuth = callback.getWauth();
}
}
LOG.info("WAuth: " + wAuth);
Object homeRealmObj = ((FederationProtocol)config.getProtocol()).getHomeRealm();
String homeRealm = null;
if (homeRealmObj != null) {
if (homeRealmObj instanceof String) {
homeRealm = (String)homeRealmObj;
} else if (homeRealmObj instanceof CallbackHandler) {
CallbackHandler hrCB = (CallbackHandler)homeRealmObj;
HomeRealmCallback callback = new HomeRealmCallback(request);
hrCB.handle(new Callback[] {callback});
homeRealm = callback.getHomeRealm();
}
}
LOG.info("HomeRealm: " + homeRealm);
Object freshnessObj = ((FederationProtocol)config.getProtocol()).getFreshness();
String freshness = null;
if (freshnessObj != null) {
if (freshnessObj instanceof String) {
freshness = (String)freshnessObj;
} else if (freshnessObj instanceof CallbackHandler) {
CallbackHandler frCB = (CallbackHandler)freshnessObj;
FreshnessCallback callback = new FreshnessCallback(request);
frCB.handle(new Callback[] {callback});
freshness = callback.getFreshness();
}
}
LOG.info("Freshness: " + freshness);
StringBuilder sb = new StringBuilder();