org.openid4java.consumer.ConsumerException Java Examples

The following examples show how to use org.openid4java.consumer.ConsumerException. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SecurityModule.java    From para with Apache License 2.0 6 votes vote down vote up
/**
 * @return filter
 */
@Provides
public OpenIDAuthFilter getOpenIDFilter() {
	if (openidFilter == null) {
		openidFilter = new OpenIDAuthFilter("/" + OpenIDAuthFilter.OPENID_ACTION);
		try {
			openidFilter.setConsumer(new OpenID4JavaConsumer(new SimpleAxFetchListFactory()));
		} catch (ConsumerException ex) {
			LoggerFactory.getLogger(SecurityModule.class).error(null, ex);
		}
		openidFilter.setReturnToUrlParameters(Collections.singleton(Config.getConfigParam("security.returnto", "/")));
		openidFilter.setAuthenticationSuccessHandler(getSuccessHandler());
		openidFilter.setAuthenticationFailureHandler(getFailureHandler());
		openidFilter.setRememberMeServices(getRemembeMeServices());
	}
	return openidFilter;
}
 
Example #2
Source File: OpenIdImpl.java    From socialauth with MIT License 4 votes vote down vote up
public OpenIdImpl(final Properties props) throws ConsumerException,
		Exception {
	manager = new ConsumerManager();
	discovered = null;
	this.id = props.getProperty("id");
}
 
Example #3
Source File: OpenIdImpl.java    From socialauth with MIT License 4 votes vote down vote up
public OpenIdImpl(final OAuthConfig config) throws ConsumerException,
		Exception {
	manager = new ConsumerManager();
	this.id = config.getId();
	discovered = null;
}