DOORS NG OAuth Dance [message #1440318] |
Wed, 08 October 2014 07:59  |
Eclipse User |
|
|
|
Do you have any sample Lyo code which is capable of performing the OAuth dance with DNG? I keep getting the following exception when retrieving an access token...
net.oauth.OAuthProblemException: invalid_expired_token
at net.oauth.client.OAuthResponseMessage.toOAuthProblemException(OAuthResponseMessage.java:83)
at net.oauth.client.OAuthClient.invoke(OAuthClient.java:306)
at net.oauth.client.OAuthClient.invoke(OAuthClient.java:260)
at net.oauth.client.OAuthClient.getAccessToken(OAuthClient.java:229)
at org.eclipse.lyo.client.oslc.OslcOAuthClient.getResourceInternal(OslcOAuthClient.java:224)
at org.eclipse.lyo.client.oslc.OslcOAuthClient.getResource(OslcOAuthClient.java:99)
Note that I've insured that the consumer and provider system clocks match. I'm not sure what else to try. There is nothing useful in the DNG tomcat log.
I've attached a TCP sniffer log file which shows what's happening during the dance. Maybe it will help.
Thanks,
Matt
|
|
|
Re: DOORS NG OAuth Dance [message #1440512 is a reply to message #1440318] |
Wed, 08 October 2014 13:03   |
Eclipse User |
|
|
|
Matt,
I think you need an oauth_verifier when exchanging the request token for an access token, at least if it's OAuth 1.0a.
Have you looked at the Lyo sample for DOORS?
/org.eclipse.lyo.client.java.sample/src/main/java/org/eclipse/lyo/client/oslc/samples/DoorsOauthSample.java
Sam
|
|
|
Re: DOORS NG OAuth Dance [message #1440538 is a reply to message #1440512] |
Wed, 08 October 2014 13:40  |
Eclipse User |
|
|
|
Sam,
My DNG Oauth logic was based directly on the DoorsOauthSample code. I was hoping it would be that simple. I noticed the verifier was null too.
I suppose I'll have to do some packet sniffing between other consumers and DNG to see what I'm missing.
Thanks,
Matt
|
|
|
Powered by
FUDForum. Page generated in 0.04380 seconds