oauth

Google's oauth endpoint is returning a 'Bad Request'… but why?

拟墨画扇 提交于 2020-01-02 20:59:06
问题 After a lot of time wasted googling for the possible reasons for a 'Bad Request' when requesting for a token at https://accounts.google.com/o/oauth2/token, I decided to ask why this code can't obtain nothing but a 'bad request' response from the server... String url = "https://accounts.google.com/o/oauth2/token"; HttpsURLConnection con = (HttpsURLConnection) obj.openConnection(); con.setChunkedStreamingMode(0); con.setRequestMethod("POST"); con.setRequestProperty("Host", "accounts.google.com"

Calculating an oauth signature

。_饼干妹妹 提交于 2020-01-02 15:26:50
问题 I am trying something a little specific, namely trying to call a REST API. I have been following these instructions. I have been very careful to ensure that I am creating the "Signature base string" correctly. They define it to be created like this: (HTTP Method)&(Request URL)&(Normalized Parameters) You can double check if need be in my code, but I am very sure that it is fine. The problem that I am having is creating what they call the "oauth signature" and mine isn't matching theirs. They

Facebook OAuth2 Logout does not remove fb_ cookie

夙愿已清 提交于 2020-01-02 15:03:23
问题 This used to work so I'm not sure what went wrong. User is able to login to Facebook just fine. Logging out is the problem. I log the user out by redirecting them to the Facebook logout php script. $facebook->getLogoutUrl(); When the user clicks on that link, they are logged out of the Facebook page. However, when they are directed back to my site, I notice the fb_ cookie is still there. PHP SDK still returns the user fb session details. The strange thing is going to www.facebook.com shows I

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

Securing a REST API

可紊 提交于 2020-01-02 10:22:26
问题 I am in the middle of developing a PHP social media web application which will be supported by various web services each operating a REST API. Web services will probably be implemented in Java with MySQL data layer but the whole point of what I am trying to do is make it really easy to implement modules in different languages/data stores depending on what is approriate. So for example when the user logs into the application via a login form the PHP code connects to a web service and POSTs the

Securing a REST API

会有一股神秘感。 提交于 2020-01-02 10:22:14
问题 I am in the middle of developing a PHP social media web application which will be supported by various web services each operating a REST API. Web services will probably be implemented in Java with MySQL data layer but the whole point of what I am trying to do is make it really easy to implement modules in different languages/data stores depending on what is approriate. So for example when the user logs into the application via a login form the PHP code connects to a web service and POSTs the

YouTube API Request : How could I get the Right token ( about Jim S.' code )

大城市里の小女人 提交于 2020-01-02 10:02:49
问题 I’m trying to implement the YouTube API on my codeIgniter website. I followed the Jim Saunders instructions here : and here : http://codeigniter.com/wiki/OAuth_for_Google/ (approximately the same) SO first of all, I needed to get the token secret with a request_youtube function, that function works correctly, i’ve entered my consumer key and consumer secret from google and everything is just fine. So then I’m redirected to YouTube to authorize the YouTube access, but when I’m redirected to my

YouTube API Request : How could I get the Right token ( about Jim S.' code )

大兔子大兔子 提交于 2020-01-02 10:01:20
问题 I’m trying to implement the YouTube API on my codeIgniter website. I followed the Jim Saunders instructions here : and here : http://codeigniter.com/wiki/OAuth_for_Google/ (approximately the same) SO first of all, I needed to get the token secret with a request_youtube function, that function works correctly, i’ve entered my consumer key and consumer secret from google and everything is just fine. So then I’m redirected to YouTube to authorize the YouTube access, but when I’m redirected to my

OAuth Client Credential Flow - Refresh Tokens

[亡魂溺海] 提交于 2020-01-02 07:53:29
问题 The Scenario I've recently built an ASP.NET WEB API , and have protected its resources using OAuth Bearer Access Tokens. I've used the Client_Credentials Flow, as it will be accessed by clients as opposed to users. Here's the thing, when a client has successfully provided the client_id and the client_secret they receive a response like the following :- { "access_token": "<Access Token>", "token_type": "bearer", "expires_in": 1199, "refresh_token": "<Refresh Token>" } Refresh Tokens. Not

Twitter OAuth Flow - Confused about oob/3-legged auth and general flow, don't need PIN?

天涯浪子 提交于 2020-01-02 07:48:06
问题 Continuation from : Setting up Twitter OAuth without 3rd party libraries Thanks to Mr. Nylander's help, I managed to get my oAuth class working (albeit only after a long time)! However, I'm confused about a few aspects of the oAuth flow. Here's a breakdown of what's happening in a program I made: ==edit, I think I'll post partial code, it's hard to explain with just words for me== //1st code segment HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://api.twitter.com/oauth