cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jordi <jordi_torre...@hotmail.com>
Subject Re: [jira] [Resolved] (CXF-4051) Custom OAuth scopes are not supported
Date Fri, 13 Apr 2012 16:27:58 GMT
Hi Sergey,
thanks a lot for your answer, but now I've got a new doubt... :-(

To build the authorization header I use the following piece of code:

	WebClient wc = WebClient.create("http://localhost:8080/oauth/initiate");

wc.accept("application/x-www-form-urlencoded,text/html,application/xhtml+xml,application/xml");
	Consumer consumer = new Consumer(aKey, aSecretKey);
	URI callback = new URI("http://localhost:8080/dummyclient/callback");
			
	// CXF extra parameters
	Map<String, String> extra = new HashMap<String, String>();
	extra.put("x_oauth_uri", "users/list");
	extra.put("x_oauth_scope", "read_profile");
	extra.put("state", "intercepted");
	//
			
	Token rt = OAuthClientUtils.getRequestToken(wc, consumer, callback, extra);

But if I try to run it without adding the Google library I received the
error:

Exception in thread "main" java.lang.NoClassDefFoundError:
net/oauth/OAuthConsumer
	at
org.apache.cxf.rs.security.oauth.client.OAuthClientUtils.getRequestToken(OAuthClientUtils.java:84)

So, how can I avoid that?

Thanks in advance,
Jordi 



--
View this message in context: http://cxf.547215.n5.nabble.com/jira-Created-CXF-4051-Custom-OAuth-scopes-are-not-supported-tp5164840p5638815.html
Sent from the cxf-issues mailing list archive at Nabble.com.

Mime
View raw message