oauth

Twitter POST problems using api 1.1

倾然丶 夕夏残阳落幕 提交于 2019-12-30 07:07:11
问题 We've just changed to Twitter api 1.1, and now Tweeting doesn't work & returns an error "The remote server returned an error: (400) Bad Request." Researching on SO about this suggests that it's something to do with authentication, but we are sending the accessToken & secret which we've just got from the login page. It all worked fine with api 1.0. The code is - public void Tweet(Action<string> response, string message) { StringBuilder sb = new StringBuilder(); sb.Append("POST&"); sb.Append

Securing an API for use with Javascript widget

会有一股神秘感。 提交于 2019-12-30 04:41:10
问题 I'm writing a javascript plugin which will be installed by bloggers/website owners. It will communicate with my remote API. I'm wondering how to secure the API to ensure that only domains owned by users that have registered an account with the service can access resources from the API. I've read up on OAuth2 and understand the basics, but because the plugin will run from within the browser and not from server to server, i'm not sure how secure this can be. Tons of services like mixpanel,

omniauth OAuthException & OAuth::Unauthorized

痴心易碎 提交于 2019-12-30 04:37:21
问题 I have installed omniauth 1.0. Also I have oauth-0.4.5, oauth2-0.5.1, omniauth-facebook-1.0.0, omniauth-twitter-0.0.6. omniauth.rb Rails.application.config.middleware.use OmniAuth::Builder do provider :developer unless Rails.env.production? provider :facebook, ENV['167257285348131'], ENV['c8c722f697scb2afcf1600286c6212a9'], :scope => 'email,offline_access,read_stream', :display => 'popup' provider :twitter, ENV['fma2L22ObJCW52QrL7uew'], ENV['4aZfhCAOdiS7ap8pHJ7I1OZslFwVWWLiAMVpYUI'] end

How to read HTTP header from response using .NET HttpWebRequest API?

只愿长相守 提交于 2019-12-30 04:31:05
问题 My app currently uses OAuth to communicate with the Twitter API. Back in December, Twitter upped the rate limit for OAuth to 350 requests per hour. However, I am not seeing this. I am still getting 150 from the account/rate_limit_status method. I was told that I needed to use the X-RateLimit-Limit HTTP header to get the new rate limit. However, in my code, I do not see that header. Here is my code... HttpWebRequest request = (HttpWebRequest)WebRequest.Create(newURL); request.Method = "GET";

Customize OWIN/OAuth HTTP status code when rejecting a token request

时光毁灭记忆、已成空白 提交于 2019-12-30 04:00:10
问题 I've derived OAuthAuthorizationServerProvider in order to validate both clients and resource owners. When I validate resource owners I find their credentials aren't valid, I call context.Rejected() , and HTTP response comes with HTTP/400 Bad Request status code while I would expect HTTP/401 Unauthorized . How can I customize OAuthAuthorizationServerProvider 's response HTTP status codes? 回答1: This is how we override the OwinMiddleware...first we created our own middleware on top of Owin...I

owin cors or web api cors

送分小仙女□ 提交于 2019-12-30 03:55:08
问题 there are 100s of question on CORS on web-api, and on how to enable CORS, there is a different answer each one provides. I am so confused and dont know which answer is correct. And the problem is none of the answers actually explains it point wise, what each line of code does, so that I can understand and solve my problem rather than copy-pasting the code. anyways, the question is: I am using asp.net web api 2 using owin. And i need to enable CORS. how do I do it? There is cors settings for

Facebook Oauth Login With Jquery Mobile #_=_

∥☆過路亽.° 提交于 2019-12-30 03:22:31
问题 When I try to login using Facebook Oauth all goes ok until the part the url redirects with something like this: http://mywebsite.com/facebookoauthbackpage.php#_=_ I'm using jQuery Mobile on my pages and I think that # = is the problem. The page stays blank and nothing happens. If I remove the "# = " all goes alright and the action happens normally. Does anyone have any idea on how to fix that? I've notice that removing the "# = " from the Facebook will not be possible anymore, so maybe

SFSafariViewController Remove OAuth2 Cookie

不问归期 提交于 2019-12-30 02:42:11
问题 I have an iOS application that authenticates with Uber API using OAuth2 in a UIWebView . When upgrading to iOS 9, I run in to the issue of ATS blocking the https request for the login page. I then added an exception for the Uber login page, but then noticed the login page makes several other requests to Facebook, Amazon Web Services, and other websites, all getting blocked by ATS. I don't want to have to maintain a list of exceptions for the the Uber login page, as Uber can easily change

How get Facebook token using Oauth2 with chrome.identity

柔情痞子 提交于 2019-12-30 02:32:44
问题 I'm using chrome.identity in a packaged app to get a user token using Facebook. I call chrome.identity.launchWebAuthFlow, and I need to take the access token, send it to the server, and then access token is used to verify the user. Works great with Google+. But for some reason, it doesn't work for Facebook. For some reason, Facebook's OAuth appears to be special. I've added the extensionid.chromiumapp.org to the list of redirect URLs in the API. Added "https://extensionid.chromiumapp.org/*",

Office365 API - Accessing another users/room's calendars

邮差的信 提交于 2019-12-30 00:58:12
问题 I'm attempting to build an application that will have access to all of an organization's calendars (users, rooms, etc). Currently my auth flow will sign in on behalf of a tenant user and make use of refresh tokens to access needed resources. As soon as I make a request to: https://outlook.office365.com/api/v1.0/users/{room-resource@email}/events My application is responded with a 401 From my gathering, it seems that this flow is limited to a single user's scope. Although the tenant admin