Giter VIP home page Giter VIP logo

Comments (5)

nov avatar nov commented on August 30, 2024

Ah, sorry.

The Rack::OAuth2's README was wrong.
Actually, it support "The OAuth 2.0 Protocol: Bearer Tokens"'s draft 04 not 03.
http://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-04

The newest bearer token spec doesn't support "oauth_token" at all and use "bearer_token" instead.

from rack-oauth2.

wireframe avatar wireframe commented on August 30, 2024

thanks for clarifying. i've been going though lots of oauth examples, and they were using the oauth_token param. according to the spec, the bearer_token should be supported as part of the query string. is this currently supported by the gem?
it does not appear to be accepted as a query param. ex:
curl -v -XGET 'http://localhost:3000/me?bearer_token=9NFyf9d2NM+jpfM0OBlCGw=='

but header and payload work fine. ex:
curl -v -XGET 'http://localhost:3000/me' -F bearer_token='9NFyf9d2NM+jpfM0OBlCGw=='
curl -v -XGET 'http://localhost:3000/me' -H 'Authorization: Bearer 9NFyf9d2NM+jpfM0OBlCGw=='

from rack-oauth2.

nov avatar nov commented on August 30, 2024

Yes, bearer_token in query is supported.
You need to do URL encode for the value though.

from rack-oauth2.

wireframe avatar wireframe commented on August 30, 2024

Ah, perfect. that totally makes sense.

I realize that query param is not the preferred solution, and intended to
only use it during testing so it wasn't too big of a deal.

thanks again for the fast response!

On Thu, Apr 21, 2011 at 10:30 AM, nov <
[email protected]>wrote:

Yes, bearer_token in query is supported.
You need to do URL encode for the value though.

Reply to this email directly or view it on GitHub:
#2 (comment)

  • Ryan Sonnek
  • twitter: twitter.com/wireframe6464
  • phone: 949.351.7290

from rack-oauth2.

nov avatar nov commented on August 30, 2024

No problem.

Since you use Ruby (= you can use HTTP header), I recommend you to use Authorization header anytime.
If you use Rack::OAuth2::AccessToken::Bearer, it always use the header.

nov

On Apr 22, 2011, at 1:17 AM, [email protected] wrote:

Ah, perfect. that totally makes sense.

I realize that query param is not the preferred solution, and intended to
only use it during testing so it wasn't too big of a deal.

thanks again for the fast response!

On Thu, Apr 21, 2011 at 10:30 AM, nov <
[email protected]>wrote:

Yes, bearer_token in query is supported.
You need to do URL encode for the value though.

Reply to this email directly or view it on GitHub:
#2 (comment)

  • Ryan Sonnek
  • twitter: twitter.com/wireframe6464
  • phone: 949.351.7290

Reply to this email directly or view it on GitHub:
#2 (comment)

from rack-oauth2.

Related Issues (20)

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.