Package org.openid4java.consumer

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


        ConsumerManager mgr = mock(ConsumerManager.class);
        AuthRequest authReq = mock(AuthRequest.class);
        DiscoveryInformation di = mock(DiscoveryInformation.class);

        when(mgr.authenticate(any(DiscoveryInformation.class), anyString(), anyString())).thenReturn(authReq);
        when(mgr.associate(anyList())).thenReturn(di);

        OpenID4JavaConsumer consumer = new OpenID4JavaConsumer(mgr, attributes);

        MockHttpServletRequest request = new MockHttpServletRequest();
        consumer.beginConsumption(request, "", "", "");
View Full Code Here


            // StringRepresentation("Could not connect to Identity Server in time.",MediaType.TEXT_HTML);
            // }

            // attempt to associate with the OpenID provider
            // and retrieve one service endpoint for authentication
            DiscoveryInformation discovered = manager.associate(discoveries);

            // store the discovery information in the user's session
            // getContext().getAttributes().put("openid-disc", discovered);
            String sessionId = String.valueOf(System
                    .identityHashCode(discovered));
View Full Code Here

                target = di.getOPEndpoint().toString();
            }
        }

        ConsumerManager manager = getManager(target);
        DiscoveryInformation discovered = manager.associate(discoveries);

        // store the discovery information in the user's session
        // getContext().getAttributes().put("openid-disc", discovered);
        String sessionId = String.valueOf(System.identityHashCode(discovered));
        session.put(sessionId, discovered);
View Full Code Here

      // 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);

      // Create a memento to rebuild the discovered information in a subsequent request
      DiscoveryInformationMemento memento = new DiscoveryInformationMemento();
      if (discovered.getClaimedIdentifier() != null) {
        memento.setClaimedIdentifier(discovered.getClaimedIdentifier().getIdentifier());
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

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