Package org.openid4java.consumer

Examples of org.openid4java.consumer.ConsumerManager


        assertTrue("XRDS with an empty URI is valid; Yadis should have succeeded",
                   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


    if (proxyProps != null) {
      LOG.debug("ProxyProperties: " + proxyProps);
      HttpClientFactory.setProxyProperties(proxyProps);
    }

    this.manager = new ConsumerManager();
    manager.setAssociations(new InMemoryConsumerAssociationStore());
    manager.setNonceVerifier(new InMemoryNonceVerifier(5000));
    manager.setMinAssocSessEnc(AssociationSessionType.DH_SHA256);
  }
View Full Code Here

   
    public void init(FilterConfig config) throws ServletException {
        super.init(config);
        try
        {
            this.manager = new ConsumerManager();
        } catch (ConsumerException ex) {
            throw new ServletException(ex);
        }
        manager.setAssociations(new InMemoryConsumerAssociationStore());
        manager.setNonceVerifier(new InMemoryNonceVerifier(5000));
View Full Code Here

//    ProxyProperties proxyProps = new ProxyProperties();
//    proxyProps.setProxyHostName("some-proxy");
//    proxyProps.setProxyPort(8080);
//    HttpClientFactory.setProxyProperties(proxyProps);

    this.manager = new ConsumerManager();
    this.userDao = userDao;

  }
View Full Code Here

public class OpenIDService implements IOpenIDService {
    private ConsumerManager consumerManager;

    public OpenIDService() {
        try {
            consumerManager = new ConsumerManager();
        } catch (ConsumerException e) {
            throw new RuntimeException(e);
        }
    }
View Full Code Here

        return consumerManager;
    }

    @Inject
    public void startup() throws Exception {
        consumerManager = new ConsumerManager();
    }
View Full Code Here

    @Create
    public void init()
        throws ConsumerException
    {
        manager = new ConsumerManager();
        discovered = null;
        id = null;
        validatedId = null;
    }
View Full Code Here

     */
    private ConsumerManager getConsumerManager() {
        if(this.consumerManager != null) {
            return this.consumerManager;
        }
        return new ConsumerManager();
    }
View Full Code Here

    List<OpenIDAttribute> attributes = Arrays.asList(new OpenIDAttribute("a","b"), new OpenIDAttribute("b","b", Arrays.asList("c")));

    @SuppressWarnings("deprecation")
    @Test
    public void beginConsumptionCreatesExpectedSessionData() throws Exception {
        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

        consumer.beginConsumption(request, "", "", "");
    }

    @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(), "", "", "");
    }
View Full Code Here

TOP

Related Classes of org.openid4java.consumer.ConsumerManager

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.