Examples of XrdsServiceEndpoint


Examples of org.openid4java.discovery.xrds.XrdsServiceEndpoint

            List results = new ArrayList();

            Iterator endpointIter = endpoints.iterator();
            while (endpointIter.hasNext())
            {
                XrdsServiceEndpoint endpoint = (XrdsServiceEndpoint) endpointIter.next();
                Iterator typesIter = endpoint.getTypes().iterator();
                while (typesIter.hasNext()) {
                    String type = (String) typesIter.next();
                    if (!targetTypes.contains(type)) continue;
                    try {
                        results.add(new DiscoveryInformation(
                            new URL(endpoint.getUri()),
                            parseIdentifier(endpoint.getCanonicalId()),
                            DiscoveryInformation.OPENID2.equals(type) ? endpoint.getLocalId() :
                            DiscoveryInformation.OPENID1_SIGNON_TYPES.contains(type) ? endpoint.getDelegate() : null,
                            type));
                    } catch (MalformedURLException e) {
                        throw new DiscoveryException("Invalid endpoint URL discovered: " + endpoint.getUri());
                    }
                }
            }
            return results;
        }
View Full Code Here

Examples of org.openid4java.discovery.xrds.XrdsServiceEndpoint

            List results = new ArrayList();

            Iterator endpointIter = endpoints.iterator();
            while (endpointIter.hasNext())
            {
                XrdsServiceEndpoint endpoint = (XrdsServiceEndpoint) endpointIter.next();
                Iterator typesIter = endpoint.getTypes().iterator();
                while (typesIter.hasNext()) {
                    String type = (String) typesIter.next();
                    if (!targetTypes.contains(type)) continue;
                    try {
                        results.add(new DiscoveryInformation(
                            new URL(endpoint.getUri()),
                            parseIdentifier(endpoint.getCanonicalId()),
                            DiscoveryInformation.OPENID2.equals(type) ? endpoint.getLocalId() :
                            DiscoveryInformation.OPENID1_SIGNON_TYPES.contains(type) ? endpoint.getDelegate() : null,
                            type));
                    } catch (MalformedURLException e) {
                        throw new DiscoveryException("Invalid endpoint URL discovered: " + endpoint.getUri());
                    }
                }
            }
            return results;
        }
View Full Code Here

Examples of org.openid4java.discovery.xrds.XrdsServiceEndpoint

    {
        List result = new ArrayList();

        if (hasEndpoints())
        {
            XrdsServiceEndpoint endpoint;
            Iterator endpointsIter = _endpoints.iterator();
            while (endpointsIter.hasNext()) {
                endpoint = (XrdsServiceEndpoint) endpointsIter.next();
                Iterator typesIter = endpoint.getTypes().iterator();
                while (typesIter.hasNext()) {
                    String type = (String) typesIter.next();
                    if (!targetTypes.contains(type)) continue;
                    try {
                        result.add(new DiscoveryInformation(
                            new URL(endpoint.getUri()),
                            DiscoveryInformation.OPENID_SIGNON_TYPES.contains(type) ?
                                new UrlIdentifier(_normalizedUrl) : null,
                            DiscoveryInformation.OPENID2.equals(type) ? endpoint.getLocalId() :
                            DiscoveryInformation.OPENID1_SIGNON_TYPES.contains(type) ? endpoint.getDelegate() : null,
                            type,
                            endpoint.getTypes()));
                    } catch (MalformedURLException e) {
                        throw new YadisException("Invalid endpoint URL discovered: " + endpoint.getUri(), OpenIDException.YADIS_INVALID_URL);
                    }
                }
            }
        }
        return result;
View Full Code Here

Examples of org.openid4java.discovery.xrds.XrdsServiceEndpoint

        dump.append("\nContent-type:").append(_contentType);

        if (_endpoints != null)
        {
            dump.append("\nXRDS:");
            XrdsServiceEndpoint endpoint;
            Iterator iter = _endpoints.iterator();
            while(iter.hasNext())
            {
                endpoint = (XrdsServiceEndpoint) iter.next();
                dump.append("\n\tType: ").append(endpoint.getTypes().toArray());
                dump.append("\n\tServicePriority: ").append(endpoint.getServicePriority());
                dump.append("\n\tUriPriority: ").append(endpoint.getUriPriority());
                dump.append("\n\tURI: ").append(endpoint.getUri());
            }
        }

        return dump.toString();
    }
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.