OAuth Consumer/Provider: While creating friend(Automation Provider) in the RQM using OAuth generates error
Hi,
We have developed 'Automation Provider' using OSLC and also implemented OAuth Provider, We want to make RQM is the consumer of the 'Automatio Provider'.
So, when I tried to add automation provider as a friend in the RQM it gives following error at OAuth Provider side:
2015-02-05 16:11:59 DEBUG Requests:184 -
{
"name": null,
"secret": "123",
"secretType": "string",
"trusted": false,
"userId": null
}
2015-02-05 16:11:59 DEBUG RequestProcessor:279 - java.lang.NullPointerException with message "null" was encountered during invocation of method provisionalKey of declaring class org.eclipse.lyo.server.oauth.webapp.services.OAuthService on the instance of a class org.eclipse.lyo.server.oauth.webapp.services.OAuthService@47074fe with parameters []
DEBUG_FRAME = org.eclipse.lyo.server.oauth.webapp.services.OAuthService.provisionalKey(OAuthService.java:393)
So why are we getting consumer name and user id as null?
Thanks,
Umesh
We have developed 'Automation Provider' using OSLC and also implemented OAuth Provider, We want to make RQM is the consumer of the 'Automatio Provider'.
So, when I tried to add automation provider as a friend in the RQM it gives following error at OAuth Provider side:
2015-02-05 16:11:59 DEBUG Requests:184 -
{
"name": null,
"secret": "123",
"secretType": "string",
"trusted": false,
"userId": null
}
2015-02-05 16:11:59 DEBUG RequestProcessor:279 - java.lang.NullPointerException with message "null" was encountered during invocation of method provisionalKey of declaring class org.eclipse.lyo.server.oauth.webapp.services.OAuthService on the instance of a class org.eclipse.lyo.server.oauth.webapp.services.OAuthService@47074fe with parameters []
DEBUG_FRAME = org.eclipse.lyo.server.oauth.webapp.services.OAuthService.provisionalKey(OAuthService.java:393)
So why are we getting consumer name and user id as null?
Thanks,
Umesh
Accepted answer
[On behalf of Samuel Padgett]
Hi, Umesh. My line numbers don't match up, so it's difficult to say what is wrong. The name can be null, and things should still work.
Did you initialize a consumer store for your OAuth provider? For instance,
OAuthConfiguration.getInstance().setConsumerStore(new FileSystemConsumerStore("OAuthStore.xml"));
The Bugzilla adapter has a good example.
org.eclipse.lyo.oslc4j.bugzilla.servlet.CredentialsFilter.init(FilterConfig)
Otherwise, let me know what is on that line for you or tell me what Git revision your are at, and I can help debug.
Thanks,
Sam
Hi, Umesh. My line numbers don't match up, so it's difficult to say what is wrong. The name can be null, and things should still work.
Did you initialize a consumer store for your OAuth provider? For instance,
OAuthConfiguration.getInstance().setConsumerStore(new FileSystemConsumerStore("OAuthStore.xml"));
The Bugzilla adapter has a good example.
org.eclipse.lyo.oslc4j.bugzilla.servlet.CredentialsFilter.init(FilterConfig)
Otherwise, let me know what is on that line for you or tell me what Git revision your are at, and I can help debug.
Thanks,
Sam