Class: Doorkeeper::DoorkeeperFor

Inherits:
Object
  • Object
show all
Defined in:
lib/doorkeeper/doorkeeper_for.rb

Direct Known Subclasses

AllDoorkeeperFor, SelectedDoorkeeperFor

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ DoorkeeperFor

Returns a new instance of DoorkeeperFor.

Raises:



4
5
6
7
8
9
10
11
12
# File 'lib/doorkeeper/doorkeeper_for.rb', line 4

def initialize(options)
  options ||= {}
  raise InvalidSyntax unless options.is_a? Hash
  @filter_options = {}

  options.each do |k, v|
    self.send(k, v)
  end
end

Instance Method Details

#filter_optionsObject



20
21
22
# File 'lib/doorkeeper/doorkeeper_for.rb', line 20

def filter_options
  @filter_options
end

#validate_token(token) ⇒ Object

TODO: move this to Token class



15
16
17
18
# File 'lib/doorkeeper/doorkeeper_for.rb', line 15

def validate_token(token)
  return false unless token
  validate_token_scopes(token)
end