Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

0 votes


Accepted answer

Permanent link
[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

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938
× 7,495

Question asked: Feb 08 '15, 1:56 a.m.

Question was seen: 3,703 times

Last updated: Feb 09 '15, 8:59 a.m.

Confirmation Cancel Confirm