Sha256: 00495e69e42db3160df6bc50d084929421f042115d7fc63db5fdab9f942d26a7

Contents?: true

Size: 729 Bytes

Versions: 5

Compression:

Stored size: 729 Bytes

Contents

require "doorkeeper_hub/version"
require 'doorkeeper_hub/configurator'
require "doorkeeper_hub/saml"
require "doorkeeper_hub/helpers"
require 'doorkeeper_hub/engine' if defined?(::Rails) && Rails::VERSION::MAJOR > 4

module DoorkeeperHub
  def self.config
    @config ||= DoorkeeperHub::Configurator.new
  end

  def self.configure
    yield config
  end

  def self.devise_routes_scope
    user_model.to_s.downcase.pluralize.to_sym
  end

  def self.devise_scope
    user_model.to_s.downcase.to_sym
  end

  def self.user_model
    config.user_model
  end

  def self.token_name
    config.doorkeeper_token_name
  end

  def self.token_param
    :doorkeeper_token
  end

  def self.client_mode?
    config.client_mode
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
doorkeeper_hub-0.2.4 lib/doorkeeper_hub.rb
doorkeeper_hub-0.2.3 lib/doorkeeper_hub.rb
doorkeeper_hub-0.2.2 lib/doorkeeper_hub.rb
doorkeeper_hub-0.2.1 lib/doorkeeper_hub.rb
doorkeeper_hub-0.2.0 lib/doorkeeper_hub.rb