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

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


        + "</RequestSecurityToken>";
   
    public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
        for (int i = 0; i < callbacks.length; i++) {
            if (callbacks[i] instanceof WReqCallback) {
                WReqCallback callback = (WReqCallback) callbacks[i];
                callback.setWreq(TEST_WREQ);
            } else {
                throw new UnsupportedCallbackException(callbacks[i], "Unrecognized Callback");
            }
        }
    }
View Full Code Here


        + "</RequestSecurityToken>";
   
    public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
        for (int i = 0; i < callbacks.length; i++) {
            if (callbacks[i] instanceof WReqCallback) {
                WReqCallback callback = (WReqCallback) callbacks[i];
                callback.setWreq(TEST_WREQ);
            } else {
                throw new UnsupportedCallbackException(callbacks[i], "Unrecognized Callback");
            }
        }
    }
View Full Code Here

        if (wReqObj != null) {
            if (wReqObj instanceof String) {
                wReq = (String)wReqObj;
            } else if (wReqObj instanceof CallbackHandler) {
                CallbackHandler wauthCB = (CallbackHandler)wReqObj;
                WReqCallback callback = new WReqCallback(request);
                wauthCB.handle(new Callback[] {callback});
                wReq = callback.getWreq();
           
        }
        return wReq;
    }
View Full Code Here

        Assert.assertEquals(TestCallbackHandler.TEST_WAUTH, wAuth);
       
        Object wReqObj = fp.getRequest();
        Assert.assertTrue(wReqObj instanceof CallbackHandler);
        CallbackHandler wreqCB = (CallbackHandler)wReqObj;
        WReqCallback callbackReq = new WReqCallback(null);
        wreqCB.handle(new Callback[] {callbackReq});
        String wReq = callbackReq.getWreq();
        Assert.assertEquals(TestCallbackHandler.TEST_WREQ, wReq);
       
        Object homeRealmObj = fp.getHomeRealm();
        Assert.assertTrue(homeRealmObj instanceof CallbackHandler);
        CallbackHandler hrCB = (CallbackHandler)homeRealmObj;
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 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

TOP

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

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.