cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: [jira] [Resolved] (CXF-4051) Custom OAuth scopes are not supported
Date Fri, 13 Apr 2012 16:38:54 GMT
Hi
On 13/04/12 17:27, jordi wrote:
> 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?
>
This class is in the net core module so add it as a dependency please
HTH, Sergey
> 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.


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Mime
View raw message