It's all about the answers!

Ask a question

OAuth Consumer/Provider: While creating friend(Automation Provider) in the RQM using OAuth generates error


Umeshkumar Rajani (16512) | asked Feb 08 '15, 1:56 a.m.
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

Accepted answer


permanent link
Paul Slauenwhite (8.4k12) | answered Feb 09 '15, 8:59 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
[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
Umeshkumar Rajani selected this answer as the correct answer

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.