GithubHelp home page GithubHelp logo

neuecc / asyncoauth Goto Github PK

View Code? Open in Web Editor NEW
101.0 101.0 39.0 1.1 MB

Portable Client Library and HttpClient based OAuth library, including all platform(for PCL).

C# 68.03% Visual Basic 31.89% Shell 0.09%

asyncoauth's Introduction

I'm Yoshifumi Kawai, CEO/CTO of Cysharp, Inc.

I have published a lot of C# OSS.
Currently, I continue to publish OSS at github.com/Cysharp, so please look there for the latest production OSS.
I strive to provide state-of-the-art libraries that are always mindful of performance and modern APIs.
As the original author of MessagePack for C#, I also continue to maintain it in the MessagePack-CSharp Organization.

If you want to support me, please see GitHub Sponsors

This is currently my primary focus for C# OSS.

Serializer

Framework

For GameEngine

Toolkit

asyncoauth's People

Contributors

gjulianm avatar hatsunea avatar karno avatar neuecc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

asyncoauth's Issues

Cannot compile 0.8.4 in WP7.5 project

I just updated from 0.8.3 to 0.8.4 today and now I cannot compile my WP75 project; it says "GetRequestToken and GetAccessToken is not supported by the language", which makes no sense. WP80 project compiles fine.

I have the latest BCL packages installed already.

Any ideas?

Twitter Authenticate issue.

Hello,

first of all, congrats for your AsyncOAuth. I am trying to use this to auth users on a portable client library.

I have get the 'Authorize' process and I get the AccessToken (Key and Secret). All is fine, and even I have got the user timeline. But...

Now I am trying to only authenticate a previously already authorized user to identify him/her:
https://dev.twitter.com/docs/api/1/get/oauth/authenticate

I have tryied a lot of ways but every time I try to call it:
https://api.twitter.com/oauth/authenticate?oauth_token={0}

I get a 403-forbidden.

Any help or example will be great.

Thanks and congrats again.

OAuth header signing

Hello,

One question, does OAuth header regenerated after 'GetRequestToken' method execution?
var tokenResponse = await authorizer.GetRequestToken("https://api.some_app.com/v0/oauth/initiate");

I meant, for instance, first, when we compute the hash, we did it during app start. We create signature key as key=encode('consumerSecret&') and buffer as Request method&link&blablabla.

But after we get request token, the signature key should be renew as: key=encode('consumerSecret&requestToken.Secret') and buffer as usual.

So, seems like, signature key after getting of request token do not renewed and when we try to navigate by authorize url
authorizer.BuildAuthorizeUrl("https://api.some_app.com/v0/oauth/authorize", requestToken);
we will have response like '< title >Authorization error</ title >'.
error: Invalid token or something went wrong. Please, return to application page and try to authorize once more.

Is it possible to force regenerate a signature, but at the same time keep 'auth_nonce' and 'oauth_timestamp' old values. Or even does it make sense?

Issue with Twitter Streaming

Hello, I have some problems with implementing streaming API:

First time I have created stream without setting timespan and it had worked. But some time after it stoped working: on creating stream I just receive friends id's and no tweets.
Then I have tried to set timespan and get such error:
"This instance has already started one or more requests. Properties can only be modified before sending the first request."
but I set timespan after creating client and before any requests.

Thank you!

Yelp API v2

I'm trying to use the library with Yelp API v2 but I'm only getting a BAD REQUEST as response.

var handler = new OAuthMessageHandler("consumerKey", "consumerSecret", new AccessToken("accessToken", "accessTokenSecret"));
var client = new HttpClient(handler);
var json = await client.GetAsync("http://api.yelp.com/v2/business/vapiano-ribeirão-preto");
return await json.Content.ReadAsStringAsync();

I found something strange. When I do the request using POSTMAN, the oauth_nouce generated is small than generated from the library:

POSTMAN: oauth_nonce=sZWDGE
AsyncOAuth: oauth_nonce="674817390"

Could not authenticate you

when using the PostUpdate method I get with Twitter API 1.1

{"errors":[{"message":"Could not authenticate you","code":32}]}

this is a new problem, as everything worked fine until a short time ago

other methods seem to be fine, e.g. I can use a stream ok, PostUpdateWithMedia works fine, but I am no longer able to post a simple test status message to Twitter

Windows Phone 8.1 Universal APP(windows store) status API not working

I am developing for Windows phone 8.1 using universal apps Windows store.
Able to get AccessToken after adding Portable library target to Windows phone 8.1 but status API not fetching any data and throw exception like "net_http_message_not_success_statuscode".

Code:
var client = OAuthUtility.CreateOAuthClient(key, secret accessToken);

        var json = await client.GetStringAsync("http://api.twitter.com/1.1/statuses/home_timeline.json?count=" + 10 + "&page=" + 1);

Please help.

GetRequestToken swallow exceptions

Method OAuthAuthorizer.GetRequestToken() swallows the original exception by throwing a new HttpRequestException. Should use HttpResponseMessage.EnsureSuccessStatusCode instead to throw the correct WebException or catch it to the send as the inner exception.

Sync versions of all calls

While it might not be a priority or feasible for this project adding in non-async versions of each call would allow us in the Fitbit.NET library (https://github.com/aarondcoleman/Fitbit.NET) to replace all our OAuth code and maintain our existing APIs while adding in async versions all relying on this one project. Ideally all the method names would have been done with the XxxxXxxxAsync() style in this project, but they aren't so perhaps there's another way to group sync versions with their async counterparts.

If there's a similar project that is also PCL OAuth we might use please let me know.

Binary in Nuget cannot work in WP8.1 simulator

An exception is thown when using AsyncOAuth:

System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at AsyncOAuth.OAuthAuthorizer.GetTokenResponse[T](String url, OAuthMessageHandler handler, HttpContent postValue, Func3 tokenFactory) at AsyncOAuth.OAuthAuthorizer.GetRequestToken(String requestTokenUrl, IEnumerable1 parameters, HttpContent postValue)

Support for xAuth

Will there be support for xAuth at all in future versions? I want to use this against the Instapaper API and they only support xAuth for their authentication on the full API. Or can xAuth be done with the library in its current state? If so, any tips?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.