List of usage examples for org.springframework.security.openid AxFetchListFactory AxFetchListFactory
AxFetchListFactory
From source file:org.mitre.provenance.openid.OpenId4JavaProxyConsumer.java
public OpenId4JavaProxyConsumer() { if (proxyHost != null) { ProxyProperties proxyProps = new ProxyProperties(); proxyProps.setProxyHostName(proxyHost); proxyProps.setProxyPort(proxyPort); HttpClientFactory.setProxyProperties(proxyProps); } // End if/* w w w . j a v a 2 s . c o m*/ this.consumerManager = new ConsumerManager(); OpenIDAttribute email = new OpenIDAttribute("email", "http://axschema.org/contact/email"); OpenIDAttribute email2 = new OpenIDAttribute("email2", "http://schema.openid.net/contact/email"); OpenIDAttribute name = new OpenIDAttribute("name", "http://axschema.org/namePerson"); OpenIDAttribute firstName = new OpenIDAttribute("firstName", "http://axschema.org/namePerson/first"); OpenIDAttribute lastName = new OpenIDAttribute("lastName", "http://axschema.org/namePerson/last"); final List<OpenIDAttribute> attributes = new ArrayList<OpenIDAttribute>(); attributes.add(email); attributes.add(email2); attributes.add(name); attributes.add(firstName); attributes.add(lastName); this.attributesToFetchFactory = new AxFetchListFactory() { private final List<OpenIDAttribute> fetchAttrs = Collections.unmodifiableList(attributes); public List<OpenIDAttribute> createAttributeList(String identifier) { return fetchAttrs; } }; }