scribe

401 response when do a POST using scribe oauth java

风格不统一 提交于 2020-01-02 11:19:14
问题 This does NOT happen when I use it with a GET. i.e. this DOES NOT WORK: ProxyAuthenticator pa = new ProxyAuthenticator(); Authenticator.setDefault( pa ); OAuthService service = new ServiceBuilder().provider( TwitterApi.class ).apiKey( strAPIKey ).apiSecret( strAPISecret ).build(); Token requestToken = service.getRequestToken(); Scanner in = new Scanner( System.in ); Verifier verifier = new Verifier(in.nextLine()); String url = "http://api.twitter.com/1/statuses/update.json?status=helllllooooo

Java SSL DH Keypair Generation - Prime Size Error

醉酒当歌 提交于 2019-12-30 04:50:11
问题 I'm currently implementing Reddit OAuth2 login into my web app. The handshake and token exchange work fine when testing locally but when running on the server (hosted on 'OpenShift' DIY cartridge) I get the following error: java.security.InvalidAlgorithmParameterException: Prime size must be multiple of 64, and can only range from 512 to 1024 (inclusive) Which is results in java.lang.RuntimeException: Could not generate DH keypair I've been searching most of the day and have found different

What are the end points to get the emailId using oauth for the google, yahoo, twitter service providers?

╄→гoц情女王★ 提交于 2019-12-25 15:33:32
问题 I am using google appengine java web application. I'm trying to put OpenId authentication withIn my project. I am using scribe to make this happen. I am able to get the Access Token from the google, yahoo, twitter Service Providers. After getting the Access Token, I need to get the currently logged-in user email address. I'm using OAuth2.0 for google, OAuth1.0a for yahoo and twitter. Any suggestions would be appreciated. 回答1: Google : https://www.googleapis.com/oauth2/v3/userinfo?access_token

Grails: Oauth Twitter userID from token

戏子无情 提交于 2019-12-25 09:40:19
问题 Its grails project, Twitter Authentication is successful, How to get twitter userID from this oauth_token received? Thanks 回答1: Try this..,. Config: import org.scribe.builder.api.TwitterApi ... oauth { providers { twitter { api = TwitterApi key = 'YOUR_KRY' secret = 'YOUR_SECRET' callback = "http://localhost:8080/appName/oauth/twitter/callback" successUri = "http://localhost:8080/appName/myController/twitterSuccess" failureUri = "http://localhost:8080/appName/myController/twitterFailure" } }

oauth facebook with grails accessing token

…衆ロ難τιáo~ 提交于 2019-12-25 04:51:20
问题 Its a grails project, Facebook authentication is successful via oauth, Now when it comes back to my controller, I want to get emailID of the logged in user, Searched a lot, but did not find proper documentation, I am using scribe and have following code in Config.groory import org.scribe.builder.api.FacebookApi oauth { providers { facebook { api = FacebookApi key = 'xxxx' secret = 'yyyy' callback = "http://my-domain-name-here:8080/TestOAuth2/dashBoard/facebooklogin" successUri = "http://my

Scribe PATCH request not working

你离开我真会死。 提交于 2019-12-25 01:10:05
问题 Seems like a bug in scribe. It is using java.net.HttpURLConnection which is limited to /* valid HTTP methods */ private static final String[] methods = { "GET", "POST", "HEAD", "OPTIONS", "PUT", "DELETE", "TRACE" }; There's no easy way to override this part (to use apache httpClient for instance) and there's a constant in Scribe org.scribe.model.Verb.PATCH, which basically never works with the rest of scribe code as it is now. Any easy workarounds? 回答1: For the moment Im removing PATCH from

Twitter application authentication to get user timelines for single user account

谁说胖子不能爱 提交于 2019-12-24 13:29:50
问题 Does Scribe provide a way to incorporate Application authentication for Twitter ? The details of this authentication are as described here: https://dev.twitter.com/docs/auth/application-only-auth We need to get the user_timeline for an application twitter account and do not want to go through the user OAuth 1.0a authentication process since the user is the same. Thanks 来源: https://stackoverflow.com/questions/17320119/twitter-application-authentication-to-get-user-timelines-for-single-user

Scribe-java and async request in Android 4

怎甘沉沦 提交于 2019-12-23 14:58:02
问题 In my Android 4.2.2 emulator I try to use scribe code snippet: OAuthService service = new ServiceBuilder() .provider(TwitterApi.class) .apiKey("abc") .apiSecret("aaa123") .debug() .build(); Scanner in = new Scanner(System.in); Token requestToken = service.getRequestToken(); In logcat I get the following error. I think it can be because of Scribe's this example code is not async-task. Can you recommend an async example please ? Note that this code snippet works in Android 2.3.3. It doesn't

Twitter rejects my Oauth Request using scribe-java with “SSL is required”

≯℡__Kan透↙ 提交于 2019-12-23 02:54:13
问题 When trying to execute service.getRequestToken() from scribe library (Version 1.3.5) for using oauth with twitter api I always get "SSL is required" as response. I have already checked all my configurations but there is https everywhere. 回答1: In version 1.3.5 of scribe-java, the method getRequestTokenEndpoint() of TwitterApi uses the non-SSL version of the URL. In version 1.3.6 this has been fixed. Unfortunetaly, this version has not yet made its way to the downloads section (http:/

Vimeo search API with Java and Scribe

匆匆过客 提交于 2019-12-22 11:33:58
问题 In its API Vimeo engineers are claiming that we should be able to search without access token, I have spent hours and unfortunately cannot get it to work, I'm not sure if I'm doing something wrong, So please help if you have done this before. OAuthService service = new ServiceBuilder().provider(VimeoApi.class).apiKey(consumerString).apiSecret(consumerSecret).build(); OAuthRequest myrequest = new OAuthRequest(Verb.GET,"http://vimeo.com/api/rest/v2format=json&method=vimeo.videos.search&query