Sha256: 44d50ef0b5e1a64abd523494321a2fee05a8087984cec9c49e6149bd7b14572e

Contents?: true

Size: 1.56 KB

Versions: 9

Compression:

Stored size: 1.56 KB

Contents

require 'devise'
require 'rack/oauth2'
require 'devise/oauth2_providable/engine'
require 'devise/oauth2_providable/expirable_token'
require 'devise/oauth2_providable/strategies/oauth2_providable_strategy'
require 'devise/oauth2_providable/strategies/oauth2_password_grant_type_strategy'
require 'devise/oauth2_providable/strategies/oauth2_refresh_token_grant_type_strategy'
require 'devise/oauth2_providable/strategies/oauth2_authorization_code_grant_type_strategy'
require 'devise/oauth2_providable/models/oauth2_providable'
require 'devise/oauth2_providable/models/oauth2_password_grantable'
require 'devise/oauth2_providable/models/oauth2_refresh_token_grantable'
require 'devise/oauth2_providable/models/oauth2_authorization_code_grantable'

module Devise
  module Oauth2Providable
    CLIENT_ENV_REF = 'oauth2.client'
    REFRESH_TOKEN_ENV_REF = "oauth2.refresh_token"

    class << self
      def random_id
        SecureRandom.hex
      end
      def table_name_prefix
        'oauth2_'
      end
    end
  end
end

Devise.add_module(:oauth2_providable,
  :strategy => true,
  :model => 'devise/oauth2_providable/models/oauth2_providable')
Devise.add_module(:oauth2_password_grantable,
  :strategy => true,
  :model => 'devise/oauth2_providable/models/oauth2_password_grantable')
Devise.add_module(:oauth2_refresh_token_grantable,
  :strategy => true,
  :model => 'devise/oauth2_providable/models/oauth2_refresh_token_grantable')
Devise.add_module(:oauth2_authorization_code_grantable,
  :strategy => true,
  :model => 'devise/oauth2_providable/models/oauth2_authorization_code_grantable')

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
brycesch-devise_oauth2_providable-1.2.8 lib/devise_oauth2_providable.rb
brycesch-devise_oauth2_providable-1.2.7 lib/devise_oauth2_providable.rb
brycesch-devise_oauth2_providable-1.2.6 lib/devise_oauth2_providable.rb
brycesch-devise_oauth2_providable-1.2.5 lib/devise_oauth2_providable.rb
brycesch-devise_oauth2_providable-1.2.4 lib/devise_oauth2_providable.rb
brycesch-devise_oauth2_providable-1.2.3 lib/devise_oauth2_providable.rb
brycesch-devise_oauth2_providable-1.2.2 lib/devise_oauth2_providable.rb
brycesch-devise_oauth2_providable-1.2.1 lib/devise_oauth2_providable.rb
brycesch-devise_oauth2_providable-1.2.0 lib/devise_oauth2_providable.rb