Package com.google.step2.discovery

Examples of com.google.step2.discovery.XrdDiscoveryResolver


            CertValidator step2XrdsCertValidator = new DefaultCertValidator();
            XrdDiscoveryResolver step2XrdResolver = new LegacyXrdsResolver(new DefaultHttpFetcher(), step2XrdsVerifier, step2XrdsCertValidator);
            HtmlResolver step2HtmlResolver = new HtmlResolver();
            YadisResolver step2YadisResolver = new YadisResolver();
            XriResolver step2XriResolver = new XriDotNetProxyResolver();
            Discovery2 step2Discovery = new Discovery2(step2HostMetaFetcher, step2XrdResolver, step2HtmlResolver, step2YadisResolver, step2XriResolver);
            openIDStep2ConsumerManager = new ConsumerManager();
            openIDStep2ConsumerManager.setDiscovery(step2Discovery);
        }
        catch (OpenIDException oide)
        {
View Full Code Here


        this.fetchers = fetchers;
    }

    public HostMeta getHostMeta(String domain) throws HostMetaException {
        for (int i = 0; i < fetchers.length; ++i) {
            HostMeta info = fetchers[i].getHostMeta(domain);
            if (isValidHostMeta(info)) {
                return info;
            }
        }
        return null;
View Full Code Here

            // assemble Step2 OpenID implementation; TODO: utilize a more
            // robust HTTPFetcher implementation since the DefaultHttpFetcher
            // may not be entirely thread safe due to connection manager
            // configuration in HttpComponents, (this is why there are 4
            // discrete instances of DefaultHttpFetcher used below).
            HostMetaFetcher step2GoogleHostMetaFetcher = new GoogleHostMetaFetcher(new DefaultHttpFetcher());
            HostMetaFetcher step2DefaultHostMetaFetcher = new DefaultHostMetaFetcher(new DefaultHttpFetcher());
            ThreadFactory parallelThreadFactory = new ThreadFactory()
            {
                public Thread newThread(Runnable r)
                {
                    Thread newThread = Executors.defaultThreadFactory().newThread(r);
                    newThread.setName(getClass().getSimpleName()+"-"+newThread.getName());
                    newThread.setDaemon(true);
                    return newThread;
                }
            };
            HostMetaFetcher step2HostMetaFetcher = new ParallelHostMetaFetcher(Executors.newFixedThreadPool(10, parallelThreadFactory), OPEN_ID_DISCOVERY_TIMEOUT_SECONDS, step2GoogleHostMetaFetcher, step2DefaultHostMetaFetcher);
            TrustRootsProvider step2XrdsTrustProvider = new DefaultTrustRootsProvider();
            CachedCertPathValidator step2XrdsCertPathValidator = new CachedCertPathValidator(step2XrdsTrustProvider);
            Verifier step2XrdsVerifier = new Verifier(step2XrdsCertPathValidator, new DefaultHttpFetcher());
            CertValidator step2XrdsCertValidator = new DefaultCertValidator();
            XrdDiscoveryResolver step2XrdResolver = new LegacyXrdsResolver(new DefaultHttpFetcher(), step2XrdsVerifier, step2XrdsCertValidator);
View Full Code Here

     * @throws RelyingPartyException
     */
    protected String authRequest(OpenIDAuthenticationRequest request) throws IdentityException {

        try {
            IdpIdentifier openId = new IdpIdentifier(request.getOpenIDUrl());

            AuthRequestHelper helper = consumerHelper.getAuthRequestHelper(openId,
                    request.getReturnUrl());
            addAttributes(helper, request);

View Full Code Here

    // if the user typed am email address, ignore the user part
    openid = openid.replaceFirst(".*@", "");

    // we assume that the user typed an identifier for an IdP, not for a user
    IdpIdentifier openId = new IdpIdentifier(openid);

    AuthRequestHelper helper = consumerHelper.getAuthRequestHelper(
        openId, returnToUrl.toString());

    helper.requestUxIcon(true);
View Full Code Here

    // if the user typed am email address, ignore the user part
    openid = openid.replaceFirst(".*@", "");

    // we assume that the user typed an identifier for an IdP, not for a user
    IdpIdentifier openId = new IdpIdentifier(openid);

    AuthRequestHelper helper = consumerHelper.getAuthRequestHelper(
        openId, returnToUrl.toString());

    helper.requestUxIcon(true);
View Full Code Here

        throw new ServletException(e);
      }
    }

    // we assume that the user typed an identifier for an IdP, not for a user
    IdpIdentifier openId = new IdpIdentifier(req.getParameter("openid"));

    AuthRequestHelper helper = consumerHelper.getAuthRequestHelper(
        openId, returnToUrl.toString());

    helper.requestUxIcon(true);
View Full Code Here

     * @return Auth request
     * @throws org.openid4java.OpenIDException if unable to discover the OpenID endpoint
     */
    AuthRequest startAuthentication(String op, HttpServletRequest request)
            throws OpenIDException {
        IdpIdentifier openId = new IdpIdentifier(op);

        String realm = realm(request);
        String returnToUrl = returnTo(request);

        AuthRequestHelper helper = consumerHelper.getAuthRequestHelper(openId, returnToUrl);
View Full Code Here

                            {
                                // verify discovery string is likely a host name
                                if ((userSuppliedDiscoveryString.indexOf("://") == -1) && (userSuppliedDiscoveryString.indexOf('@') == -1) && (userSuppliedDiscoveryString.indexOf('=') == -1))
                                {
                                    // Step2 OpenId discovery
                                    IdpIdentifier providerIdentifier = new IdpIdentifier(userSuppliedDiscoveryString);
                                    discoveries = providerOpenIDConsumerManager.getDiscovery().discover(providerIdentifier);                                   
                                }
                            }
                            else
                            {
View Full Code Here

            HostMetaFetcher step2HostMetaFetcher = new ParallelHostMetaFetcher(Executors.newFixedThreadPool(10, parallelThreadFactory), OPEN_ID_DISCOVERY_TIMEOUT_SECONDS, step2GoogleHostMetaFetcher, step2DefaultHostMetaFetcher);
            TrustRootsProvider step2XrdsTrustProvider = new DefaultTrustRootsProvider();
            CachedCertPathValidator step2XrdsCertPathValidator = new CachedCertPathValidator(step2XrdsTrustProvider);
            Verifier step2XrdsVerifier = new Verifier(step2XrdsCertPathValidator, new DefaultHttpFetcher());
            CertValidator step2XrdsCertValidator = new DefaultCertValidator();
            XrdDiscoveryResolver step2XrdResolver = new LegacyXrdsResolver(new DefaultHttpFetcher(), step2XrdsVerifier, step2XrdsCertValidator);
            HtmlResolver step2HtmlResolver = new HtmlResolver();
            YadisResolver step2YadisResolver = new YadisResolver();
            XriResolver step2XriResolver = new XriDotNetProxyResolver();
            Discovery2 step2Discovery = new Discovery2(step2HostMetaFetcher, step2XrdResolver, step2HtmlResolver, step2YadisResolver, step2XriResolver);
            openIDStep2ConsumerManager = new ConsumerManager();
View Full Code Here

TOP

Related Classes of com.google.step2.discovery.XrdDiscoveryResolver

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.