[oauth] Re: Java Desktop Sample
After you've authorized, DesktopClient.access expects Mediamatic to redirect your browser to its embedded server; that is the Jetty server to which the local variable access.server refers. The URL is something like http://localhost:5298/oauth/callback. It sounds like Mediamatic isn't doing that. Has Mediamatic upgraded to OAuth 1.0a recently? On Jul 14, 8:48 pm, monkeyvu wrote: > I have run the sample application Mediamatic.java but it's hang at the > following statement: > > accessor.wait(); > > That statement is in DesktopClient.java file. The snippet of the > function is: > > BareBonesBrowserLaunch.browse(authorizationURL); > accessor.wait(); > if (accessor.accessToken == null) { > getOAuthClient().getAccessToken(accessor, null, null); > > } > > Actually, it opened a new browser with authorization URL, then I got > the code from the site, enter that code into the running application , > close the browser but nothing happened. The application just kept > running and looks like it's hang... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "OAuth" group. To post to this group, send email to oauth@googlegroups.com To unsubscribe from this group, send email to oauth+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/oauth?hl=en -~--~~~~--~~--~--~---
[oauth] Re: How should the be notified if a request for authorization is denied?
I would pass a verifier, perhaps oauth_verifier=placeholder. I imagine a careless consumer might behave badly if the verifier is absent. On Jul 13, 4:48 pm, Richard Wallace wrote: > The OAuth spec section 6.2.3 states that "If the User denies access, > the Consumer MAY be notified that the Request Token has been revoked." > At first I was thinking that I would just flag the request token as > being denied on the service provider and then when the consumer tries > to swap tokens specify that the oauth_problem is permission_denied. > But when the service provider redirects the user to the consumer > callback URI, should I still pass the verifier parameter or not > bother? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "OAuth" group. To post to this group, send email to oauth@googlegroups.com To unsubscribe from this group, send email to oauth+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/oauth?hl=en -~--~~~~--~~--~--~---
[oauth] Re: File Upload
Try calling client.access, instead of client.invoke. The invoke method is intended for requesting OAuth tokens, not accessing protected resources. On Jul 9, 3:43 pm, Siahm wrote: > Hello I am trying to upload a file with OAuth and I can´t. I get error > 500 or 200, but I am looking for 201 response. I am using this code: > > ... > params.put("param01", "value01"); > > aouthRequest = access.newRequestMessage(method, baseUrl, > params.entrySet(), new FileInputStream(file)); > > aouthRequest.getHeaders().add(new OAuth.Parameter("Content-Length", > String.valueOf(file.length(; > > //Validation is ok at this point > aouthRequest.validateMessage(access, new SimpleOAuthValidator()); > > OAuthMessage rs = client.invoke(aouthRequest, > net.oauth.ParameterStyle.AUTHORIZATION_HEADER); > > > I have checked the oauth_ parameters and they are right. I have also > try to put content type headers and it fails. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "OAuth" group. To post to this group, send email to oauth@googlegroups.com To unsubscribe from this group, send email to oauth+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/oauth?hl=en -~--~~~~--~~--~--~---