devise_oauth2_providable — Mongoid Support Version (in progress)
Rails3 engine that brings OAuth2 Provider support to your application.
Current OAuth2 Specification Draft: http://tools.ietf.org/html/draft-ietf-oauth-v2-15
- integrates OAuth2 authentication with Devise authenthentication stack
- one-stop-shop includes all Models, Controllers and Views to get up and running quickly
- All server requests support authentication via bearer token included in the request. http://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-04
# Bundler Gemfile gem 'devise_oauth2_providable'
If you're using active record:
# create new Rails migration class CreateOauth2Schema < ActiveRecord::Migration def self.up Devise::Oauth2Providable::Schema.up(self) end def self.down Devise::Oauth2Providable::Schema.down(self) end end
class User # NOTE: include :database_authenticatable configuration # if supporting Resource Owner Password Credentials Grant Type devise :oauth2_providable, :oauth2_password_grantable, :oauth2_refresh_token_grantable, :oauth2_authorization_code_grantable end
If you're using Mongoid, you should be good to go.
registered OAuth2 client for storing the unique client_id and client_secret.
Short lived token used by clients to perform subsequent requests (see bearer token spec)
expires after 15min by default.
Long lived token used by clients to request new access tokens without requiring user intervention to re-authorize.
expires after 1 month by default.
Very short lived token created to allow a client to request an access token after a user has gone through the authorization flow.
expires after 1min by default.
Endpoint to start client authorization flow. Models, controllers and views are included for out of the box deployment.
Supports the Authorization Code and Implicit grant types.
Endpoint to request access token. See grant type documentation for supported flows.
Resource Owner Password Credentials Grant Type
in order to use the Resource Owner Password Credentials Grant Type, your Devise model must be configured with the :database_authenticatable option
Client Credentials Grant Type
Authorization Code Grant Type
Implicit Grant Type
Refresh Token Grant Type
- Fork the project
- Fix the issue
- Add unit tests
- Submit pull request on github
See CONTRIBUTORS.txt for list of project contributors
Copyright (c) 2011 Socialcast, Inc. See LICENSE.txt for further details.