Examples of FetchRequest


Examples of org.openid4java.message.ax.FetchRequest

            // authReq.setRealm(getReference().getHostIdentifier().toString());
            log.info("OpenID - REALM = " + getReference().getBaseRef());
            authReq.setRealm(getReference().getBaseRef().toString());

            // Attribute Exchange - getting optional and required
            FetchRequest fetch = null;
            String[] optional = params.getValuesArray("ax_optional", true);
            for (String o : optional) {
                if (!ax.containsKey(o)) {
                    log.warning("Not supported AX extension : " + o);
                    continue;
                }
                if (fetch == null)
                    fetch = FetchRequest.createFetchRequest();
                fetch.addAttribute(o, ax.get(o), false);
            }

            String[] required = params.getValuesArray("ax_required", true);
            for (String r : required) {
                if (!ax.containsKey(r)) {
                    log.warning("Not supported AX extension : " + r);
                    continue;
                }
                if (fetch == null)
                    fetch = FetchRequest.createFetchRequest();
                fetch.addAttribute(r, ax.get(r), true);
            }

            if (fetch != null) {
                authReq.addExtension(fetch);
            }
View Full Code Here

Examples of org.openid4java.message.ax.FetchRequest

            if (verified != null) {
                AuthSuccess authSuccess = (AuthSuccess) verification
                        .getAuthResponse();

                if (authSuccess.hasExtension(AxMessage.OPENID_NS_AX)) {
                    FetchRequest fetchResp = (FetchRequest) authSuccess
                            .getExtension(AxMessage.OPENID_NS_AX);

                    MessageExtension ext = authSuccess
                            .getExtension(AxMessage.OPENID_NS_AX);
                    if (ext instanceof FetchRequest) {
                        // FetchRequest fetchReq = (FetchRequest) ext;
                        Map<String, String> required = fetchResp
                                .getAttributes(true);
                        axRequired.putAll(required);
                        Map<String, String> optional = fetchResp
                                .getAttributes(false);
                        axOptional.putAll(optional);
                    }
                }
View Full Code Here

Examples of org.openid4java.message.ax.FetchRequest

        String ref = request.getResourceRef().getBaseRef().toString();
        l.info("OpenID - REALM = " + ref);
        authReq.setRealm(ref);

        // Attribute Exchange - getting optional and required
        FetchRequest fetch = null;
        // String[] optional = params.getValuesArray("ax_optional", true);
        for (AX o : this.optionalAttributes) {
            if (fetch == null)
                fetch = FetchRequest.createFetchRequest();
            fetch.addAttribute(o.toString(), ax.get(o), false);
        }

        // String[] required = params.getValuesArray("ax_required", true);
        for (AX r : this.requiredAttributes) {
            if (fetch == null)
                fetch = FetchRequest.createFetchRequest();
            fetch.addAttribute(r.toString(), ax.get(r), true);
        }

        if (fetch != null) {
            authReq.addExtension(fetch);
        }
View Full Code Here

Examples of org.openid4java.message.ax.FetchRequest

        if (authReq.hasExtension(AxMessage.OPENID_NS_AX))
        {
            MessageExtension ext = authReq.getExtension(AxMessage.OPENID_NS_AX);
            if (ext instanceof FetchRequest)
            {
                FetchRequest fetchReq = (FetchRequest) ext;
                Map required = fetchReq.getAttributes(true);
                Map optional = fetchReq.getAttributes(false);
                if (required.containsKey("email"))
                {
                    Map userDataExt = new HashMap();
                    userDataExt.put("email", "someone@someplace.com");
                    FetchResponse fetchResp = FetchResponse.createFetchResponse(fetchReq, userDataExt);
View Full Code Here

Examples of org.rrd4j.core.FetchRequest

                "unless order is decending and a single value is requested");
          }
        } else {
          start = filter.getBeginDate().getTime()/1000;
        }
        FetchRequest request = db.createFetchRequest(consolidationFunction, start, end, 1);

        List<HistoricItem> items = new ArrayList<HistoricItem>();
        FetchData result = request.fetchData();
        long ts = result.getFirstTimestamp();
        long step = result.getRowCount() > 1 ? result.getStep() : 0;
        for(double value : result.getValues(DATASOURCE_STATE)) {
          if(!Double.isNaN(value)) {
            RRD4jItem rrd4jItem = new RRD4jItem(itemName, mapToState(value, itemName), new Date(ts * 1000));
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.