Class: Doorkeeper::OAuth::Hooks::Context

Inherits:
Object
  • Object
show all
Defined in:
lib/doorkeeper/oauth/hooks/context.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**attributes) ⇒ Context

Returns a new instance of Context.



9
10
11
12
13
# File 'lib/doorkeeper/oauth/hooks/context.rb', line 9

def initialize(**attributes)
  attributes.each do |name, value|
    instance_variable_set(:"@#{name}", value) if respond_to?(name)
  end
end

Instance Attribute Details

#authObject (readonly)

Returns the value of attribute auth.



7
8
9
# File 'lib/doorkeeper/oauth/hooks/context.rb', line 7

def auth
  @auth
end

#pre_authObject (readonly)

Returns the value of attribute pre_auth.



7
8
9
# File 'lib/doorkeeper/oauth/hooks/context.rb', line 7

def pre_auth
  @pre_auth
end

Instance Method Details

#issued_tokenObject



15
16
17
# File 'lib/doorkeeper/oauth/hooks/context.rb', line 15

def issued_token
  auth&.issued_token
end