Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Lyo » DOORS NG OAuth Dance
DOORS NG OAuth Dance [message #1440318] Wed, 08 October 2014 07:59 Go to next message
Matt Stone is currently offline Matt StoneFriend
Messages: 46
Registered: August 2014
Member
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
  • Attachment: dng-dance.rtf
    (Size: 17.41KB, Downloaded 579 times)
Re: DOORS NG OAuth Dance [message #1440512 is a reply to message #1440318] Wed, 08 October 2014 13:03 Go to previous messageGo to next message
Samuel Padgett is currently offline Samuel PadgettFriend
Messages: 30
Registered: July 2009
Member
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 Go to previous message
Matt Stone is currently offline Matt StoneFriend
Messages: 46
Registered: August 2014
Member
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
Previous Topic:Resource Writable Query?
Next Topic:Provider Link Modifications
Goto Forum:
  


Current Time: Tue Mar 19 05:36:56 GMT 2024

Powered by FUDForum. Page generated in 0.02359 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top