Sha256: dc3e9942c6c08900e13b64109c1c8a1c2a6f7670d3b29e6956f4b39757491f73

Contents?: true

Size: 755 Bytes

Versions: 4

Compression:

Stored size: 755 Bytes

Contents

require "doorkeeper_hub/version"
require 'doorkeeper_hub/configurator'
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.token_name
    config.doorkeeper_token_name
  end

  def self.token_param
    :doorkeeper_token
  end

  def self.client_mode?
    config.client_mode
  end

  class User
    attr_accessor :company_tokens, :id

    def initialize(attrs)
      @company_tokens = attrs['company_tokens']
      @id             = attrs['id']
    end

    def to_key
      id
    end

    def authenticatable_salt
      ''
    end
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
doorkeeper_hub-0.3.3 lib/doorkeeper_hub.rb
doorkeeper_hub-0.3.2 lib/doorkeeper_hub.rb
doorkeeper_hub-0.3.1 lib/doorkeeper_hub.rb
doorkeeper_hub-0.3.0 lib/doorkeeper_hub.rb