Package org.apache.cxf.fediz.core.spi

Examples of org.apache.cxf.fediz.core.spi.IDPCallback


        FederationProtocol fp = (FederationProtocol)ctx.getProtocol();
       
        Object issuerObj = fp.getIssuer();
        Assert.assertTrue(issuerObj instanceof CallbackHandler);
        CallbackHandler issuerCB = (CallbackHandler)issuerObj;
        IDPCallback callbackIDP = new IDPCallback(null);
        issuerCB.handle(new Callback[] {callbackIDP});
        String issuerURL = callbackIDP.getIssuerUrl().toString();
        Assert.assertEquals(TestCallbackHandler.TEST_IDP, issuerURL);
       
        Object wAuthObj = fp.getAuthenticationType();
        Assert.assertTrue(wAuthObj instanceof CallbackHandler);
        CallbackHandler wauthCB = (CallbackHandler)wAuthObj;
View Full Code Here


            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);
           
            StringBuilder sb = new StringBuilder();
View Full Code Here

        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();
        }
        return issuerURL;
    }
View Full Code Here

        FederationProtocol fp = (FederationProtocol)ctx.getProtocol();
       
        Object issuerObj = fp.getIssuer();
        Assert.assertTrue(issuerObj instanceof CallbackHandler);
        CallbackHandler issuerCB = (CallbackHandler)issuerObj;
        IDPCallback callbackIDP = new IDPCallback(null);
        issuerCB.handle(new Callback[] {callbackIDP});
        String issuerURL = callbackIDP.getIssuerUrl().toString();
        Assert.assertEquals(TestCallbackHandler.TEST_IDP, issuerURL);
       
        Object wAuthObj = fp.getAuthenticationType();
        Assert.assertTrue(wAuthObj instanceof CallbackHandler);
        CallbackHandler wauthCB = (CallbackHandler)wAuthObj;
View Full Code Here

                callback.setWauth(TEST_WAUTH);
            } else if (callbacks[i] instanceof WReqCallback) {
                WReqCallback callback = (WReqCallback) callbacks[i];
                callback.setWreq(TEST_WREQ);
            } 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");
            }
        }
    }
View Full Code Here

        FederationProtocol fp = (FederationProtocol)ctx.getProtocol();
       
        Object issuerObj = fp.getIssuer();
        Assert.assertTrue(issuerObj instanceof CallbackHandler);
        CallbackHandler issuerCB = (CallbackHandler)issuerObj;
        IDPCallback callbackIDP = new IDPCallback(null);
        issuerCB.handle(new Callback[] {callbackIDP});
        String issuerURL = callbackIDP.getIssuerUrl().toString();
        Assert.assertEquals(TestCallbackHandler.TEST_IDP, issuerURL);
       
        Object wAuthObj = fp.getAuthenticationType();
        Assert.assertTrue(wAuthObj instanceof CallbackHandler);
        CallbackHandler wauthCB = (CallbackHandler)wAuthObj;
View Full Code Here

                callback.setHomeRealm(TEST_HOME_REALM);
            } 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 {
                throw new UnsupportedCallbackException(callbacks[i], "Unrecognized Callback");
            }
        }
    }
View Full Code Here

            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();
View Full Code Here

        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();
        }
        return issuerURL;
    }
View Full Code Here

                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");
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.fediz.core.spi.IDPCallback

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.