randyzwitch / oauth.jl Goto Github PK
View Code? Open in Web Editor NEWPure Julia implementation of OAuth v1.0a
Home Page: http://randyzwitch.com/OAuth.jl/latest/
License: Other
Pure Julia implementation of OAuth v1.0a
Home Page: http://randyzwitch.com/OAuth.jl/latest/
License: Other
The tag name "0.6.3" is not of the appropriate SemVer form (vX.Y.Z).
cc: @randyzwitch
Compared to HTTP 0.8, HTTP 0.9 contains some bug fixes (https://github.com/JuliaWeb/HTTP.jl/blob/master/CHANGELOG.md). Therefore, it would probably be a good idea to bump the compat entry and test whether OAuth still works.
Unfortunately, I don't have time to pick this up at this moment. My hope is that someone else sees this issue and picks it up. Otherwise, I'll pick it up later.
Nettle has just broken its API significantly, in order to be much more precompile-friendly. The big takeaway is that methods such as md5_hash(data)
should be mapped to digest("md5", data)
, there are no more auto-generated types for hashes, and internally the code is a little easier to grok. This new version of Nettle.jl
has not been released yet, I will make every effort to ensure that dependent packages such as this one have a chance to adapt before releasing the new version.
a new tag of HTTP will be released soon that deprecates HTTP.escape
for HTTP.escapeuri
. There will be a proper deprecation, but this is just a heads up.
Now that v0.4RC1 out, make sure everything works for 0.4, as well as support pre-compiling (although I think it would be negligible for this package)
Consider this line.
This generates a nonce using the default random, which is Mersenne Twister. MT is not a CSPRNG, i.e. the internal state and hence all past and future random numbers can be extracted from a few random numbers from the stream.
The nonce generation should use a secure random instead. For example, const CSPRNG = Random.RandomDevice()
and randstring(CSPRNG, length)
would do the job.
Cf general discussion (here)[https://github.com/JuliaLang/julia/issues/32954].
Hey @randyzwitch,
As part of efforts to rationalize and simplify JuliaWeb, I'm removing the encodeURI
method of HttpCommon.jl.
JuliaWeb/HttpCommon.jl#29
As far as I can tell, this package is the only one using it, so I wanted to notify you personally. JuliaWeb/URIParser.jl
has a URIParser.escape
method that does the same thing, and I'm more confident in that code as well (Keno wrote it, and its better tested). I'd guess the simplest change would be to define your own one-line alias for the URIParser version.
My code returns a 401 HTTP.ExceptionRequest.StatusError
: {"code":32,"message":"Could not authenticate you."}
Running Julia 1.0
with package status [22d8b318] OAuth v0.7.0
.
My tokens work using twurl
and tweepy
, code is:
import OAuth
endpoint = "https://api.twitter.com/1.1/users/show.json"
options = Dict("screen_name" => "twitterdev")
httpmethod = "GET"
oauth_consumer_key = "..."
oauth_consumer_secret = "..."
oauth_token = "..."
oauth_token_secret = "..."
OAuth.oauth_request_resource(endpoint, httpmethod, options, oauth_consumer_key,
oauth_consumer_secret, oauth_token, oauth_token_secret)
The response is:
ERROR: HTTP.ExceptionRequest.StatusError(401, HTTP.Messages.Response:
"""
HTTP/1.1 401 Unauthorized
content-length: 64
content-type: application/json; charset=utf-8
date: Sat, 20 Oct 2018 19:38:49 GMT
server: tsa_b
set-cookie: personalization_id="v1_7vUSIDnL5tNr88OLPIlFpw=="; Expires=Mon, 19 Oct 2020 19:38:49 GMT; Path=/; Domain=.twitter.com, guest_id=v1%3A154006432993982064; Expires=Mon, 19 Oct 2020 19:38:49 GMT; Path=/; Domain=.twitter.com
strict-transport-security: max-age=631138519
x-connection-hash: ff8b6f836dd6e46d4eb6c096a372b467
x-response-time: 10
{"errors":[{"code":32,"message":"Could not authenticate you."}]}""")
Hi @randyzwitch ,
I am doing some work on OAuth 2.0 for use with Azure. I wonder how we might combine these two packages, or should I just create a separate, but similar OAuth2.jl?
I'm just learning OAuth 2.0 and haven't worked with OAuth 1.0, so not sure how different they are.
Hey! I am trying to set up a program that pings an API. However, the API uses OAuth 2.0 so I need to set up a "configure a callback URL to your server". Is it possible to do this with OAuth.jl and if so, can you provide a simple example and what my URL would me?
Ported over from: JuliaWeb/HTTP.jl#485
This issue is used to trigger TagBot; feel free to unsubscribe.
If you haven't already, you should update your TagBot.yml
to include issue comment triggers.
Please see this post on Discourse for instructions and more details.
If you'd like for me to do this for you, comment TagBot fix
on this issue.
I'll open a PR within a few hours, please be patient!
From the documentation, it looks like we're missing:
oauth_encode_base64
oauth_decode_base64
oauth_url_escape
oauth_url_unescape
oauth_catenc
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.