Hi there,
I'm trying to get OpenID4Java (version 0.9.5.593) working with Google
App Engine.
I'm following the SampleConsumer example given.
Despite setting
HttpClientFactory.setMultiThreadedHttpClient(false);
I keep getting exceptions. Specially:
java.security.AccessControlException: access denied
(java.lang.RuntimePermission modifyThreadGroup)
Here is the very basic code:
try {
HttpClientFactory.setMultiThreadedHttpClient(false);
ConsumerManager manager = new ConsumerManager();
String openIdentifier = "
https://www.google.com/accounts/
o8/id";
String returnToUrl = "
http://localhost:8080/openid";
// perform discovery on the user-supplied identifier
List discoveries = manager.discover(openIdentifier);
// attempt to associate with the OpenID provider
// and retrieve one service endpoint for authentication
DiscoveryInformation discovered = manager.associate
(discoveries); <----- raises exception.
// obtain a AuthRequest message to be sent to the OpenID
provider
AuthRequest authRequest = manager.authenticate
(discovered, returnToUrl);
// Attribute Exchange example: fetching the 'email'
attribute
FetchRequest fetch = FetchRequest.createFetchRequest();
fetch.addAttribute("email",
// attribute alias
"
http://schema.openid.net/contact/email", //
type URI
true); //
required
// attach the extension to the authentication request
authRequest.addExtension(fetch);
getResponse().redirectPermanent
(authRequest.getDestinationUrl(true));
} catch (Exception e) {
e.printStackTrace();
}
}
What am I doing wrong? I need to get this working if possible.
Thanks in advance,
Matt