Giter VIP home page Giter VIP logo

oauth2-ruby's Introduction

Introduction

oauth2-ruby is a Ruby library that makes it easy for developers to use OAuth2 protocol, currently in use in sites such as Facebook, Twitter and Launchpad (37 Signals).

Disclaimer: As this is alpha software, it is suspected to change and considered unstable.

OAuth 2 protocol compliance

The current implementation of the gem is based on OAuth2 draft 00 (more about it here and here). Our goal is to support Draft 09 by the time gem hits version 1.0.

Packages

Currently the project consists of three seperate packages: oauth2-core, oauth2-server and oauth2-client - the latter will be available soon.

oauth2-core

  • makes parsing, validating and building Authorization and WWW-Authenticate headers easy
  • implements OAuth2::Attributes which gives the possibility to set an attribute via callback (blocks), accessor or passing a hash on object initialization. This ensures that the library is very flexible.

oauth2-server

  • provides different flows according to the OAuth2 specification. Currently, only the web server flow is implemented.
  • makes handling OAuth2 requests easy. It currently supports bearer and cryptographic requests.

Getting started

The wiki features some examples.

How to contribute

If you wish to helps us make OAuth 2 an easy ride with Ruby, please take note of the following:

  • If you have an issue, please submit it here on Github
  • Should you wish to commit a patch, please fork the project and send a pull request. But - please - don't forget the tests :)

License

This Ruby GEM is made available to you under the MIT license.

oauth2-ruby's People

Contributors

aflatter avatar miguelfteixeira 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

oauth2-ruby's Issues

HMAC

ruby-hmac website states the following: NOTE: If your apps can assume Ruby/OpenSSL available, consider using OpenSSL::HMAC instead.

Should we consider using OpenSSL::HMAC instead. Can / should we make that assumption?

Example client / server

Host two sites on heroku, one acting as an OAuth 2.0 server and the other as a client.

The code for both projects should be made available on github under the MIT license, furthermore referenced in this project's documentation.

Web Server Flow tests are failing

Since the class update we have 2 tests failing:

  • OAuth2::Server::Flows::WebServer #request_authorization should render authorize form if resource owner is identified
  • OAuth2::Server::Flows::WebServer #request_authorization should verify identity and return if resource owner is not identified

AccessToken#request fails : undefined method uri for NilClass

consumer = OAuth::Consumer.new(CONSUMER_KEY, CONSUMER_SECRET, :site => "http://api.whatever.com")
token = OAuth::AccessToken.new(consumer, TOKEN, SECRET)

req = token.request(:post, '/v1/api_path')

It always fails saying 'undefined method `uri' for nil:NilClass'. I'm doing something wrong as it seems like the most basic thing the lib does ?

Cheers,
Julien

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.