Package org.openid4java.consumer

Examples of org.openid4java.consumer.ConsumerManager.discover()


                   yadis.getEndpoints().size() > 0);

        // also run through Discovery.extractDiscoveryInformation()
        ConsumerManager manager = new ConsumerManager();

        List results = manager.discover("http://localhost:" +
            _servletPort + "/?headers=simplexrds&xrds=malformedxrds6");

        assertEquals("No discovery information should have been returned for an empty URI",
                     0, results.size());
View Full Code Here


    @Test(expected = OpenIDConsumerException.class)
    public void discoveryExceptionRaisesOpenIDException() throws Exception {
        ConsumerManager mgr = mock(ConsumerManager.class);
        OpenID4JavaConsumer consumer = new OpenID4JavaConsumer(mgr, new NullAxFetchListFactory());
        when(mgr.discover(anyString())).thenThrow(new DiscoveryException("msg"));
        consumer.beginConsumption(new MockHttpServletRequest(), "", "", "");
    }

    @Test
    public void messageOrConsumerAuthenticationExceptionRaisesOpenIDException() throws Exception {
View Full Code Here

      // (this is to preserve session state such as nonce values etc)
      ConsumerManager consumerManager = new ConsumerManager();
      InMemoryOpenIDCache.INSTANCE.putConsumerManager(sessionToken, consumerManager);

      // Perform discovery on the user-supplied identifier
      List discoveries = consumerManager.discover(identifier);

      // Attempt to associate with the OpenID provider
      // and retrieve one service endpoint for authentication
      DiscoveryInformation discovered = consumerManager.associate(discoveries);
View Full Code Here

  }

  private DiscoveryInformation performDiscovery(String openId) {
    try {
      ConsumerManager consumerManager = getConsumerManager();
      List<?> discoveries = consumerManager.discover(openId);
      return consumerManager.associate(discoveries);
    } catch (DiscoveryException e) {
      throw new WicketRuntimeException("discovery failed", e);
    }
  }
View Full Code Here

  }

  private DiscoveryInformation performDiscovery(String openId) {
    try {
      ConsumerManager consumerManager = getConsumerManager();
      List<?> discoveries = consumerManager.discover(openId);
      return consumerManager.associate(discoveries);
    } catch (DiscoveryException e) {
      throw new WicketRuntimeException("discovery failed", e);
    }
  }
View Full Code Here

  }

  private DiscoveryInformation performDiscovery(String openId) {
    try {
      ConsumerManager consumerManager = getConsumerManager();
      List<?> discoveries = consumerManager.discover(openId);
      return consumerManager.associate(discoveries);
    } catch (DiscoveryException e) {
      throw new WicketRuntimeException("discovery failed", e);
    }
  }
View Full Code Here

  }

  private DiscoveryInformation performDiscovery(String openId) {
    try {
      ConsumerManager consumerManager = getConsumerManager();
      List<?> discoveries = consumerManager.discover(openId);
      return consumerManager.associate(discoveries);
    } catch (DiscoveryException e) {
      throw new WicketRuntimeException("discovery failed", e);
    }
  }
View Full Code Here

                                }
                            }
                            else
                            {
                                // standard OpenId discovery
                                discoveries = providerOpenIDConsumerManager.discover(userSuppliedDiscoveryString);
                            }
                            if ((discoveries != null) && !discoveries.isEmpty())
                            {
                                discovered = providerOpenIDConsumerManager.associate(discoveries);
                            }
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.