Package org.openid4java.util

Examples of org.openid4java.util.HttpCache



    public void testIncompleteHtmlParsing() throws DiscoveryException
    {
        // stop reading from the received HTML body shortly after the Yadis tag
        HttpFetcher cache = new HttpCache();
        HttpRequestOptions requestOptions = cache.getRequestOptions();
        requestOptions.setMaxBodySize(350);
        cache.setDefaultRequestOptions(requestOptions);

        YadisResolver resolver = new YadisResolver(cache);
        YadisResult result = resolver.discover("http://localhost:" + _servletPort + "/?html=simplehtml",
            10, Collections.singleton("http://example.com/"));
View Full Code Here


    public void testXrdsSizeExceeded()
    {
        HttpRequestOptions requestOptions = new HttpRequestOptions();
        requestOptions.setMaxBodySize(10);

        HttpFetcher cache = new HttpCache();
        cache.setDefaultRequestOptions(requestOptions);

        YadisResolver resolver = new YadisResolver(cache);

        try
        {
View Full Code Here

        {
            _log.info("Starting discovery on URL identifier: " + identifier);

            UrlIdentifier urlId = (UrlIdentifier) identifier;

            HttpCache cache = new HttpCache();

            result = _yadisResolver.discover(urlId.getIdentifier(), cache);

            // fall-back to HTML discovery
            if (result == null || result.size() == 0)
View Full Code Here

     * @see #discover(UrlIdentifier, HttpCache)
     */
    public List discoverHtml(UrlIdentifier identifier)
        throws DiscoveryException
    {
        return discoverHtml(identifier, new HttpCache());
    }
View Full Code Here

     * @return      List of DiscoveryInformation entries discovered
     *              from the RP's endpoints
     */
    public List discoverRP(String url) throws DiscoveryException
    {
        return discover(url, 0, new HttpCache(),
            Collections.singleton(DiscoveryInformation.OPENID2_RP))
            .getDiscoveredInformation(Collections.singleton(DiscoveryInformation.OPENID2_RP));
    }
View Full Code Here

     *                      obtained from the URL Identifier.
     * @see YadisResult #discover(String, int, HttpCache)
     */
    public List discover(String url) throws DiscoveryException
    {
        return discover(url, _maxRedirects, new HttpCache() );
    }
View Full Code Here

     *                      obtained from the URL Identifier.
     * @see YadisResult #discover(String, int, HttpCache)
     */
    public List discover(String url, int maxRedirects) throws DiscoveryException
    {
        return discover(url, maxRedirects, new HttpCache());
    }
View Full Code Here

TOP

Related Classes of org.openid4java.util.HttpCache

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.