Class: Doorkeeper::Request::Code
- Inherits:
-
Object
- Object
- Doorkeeper::Request::Code
- Defined in:
- lib/doorkeeper/request/code.rb
Instance Attribute Summary collapse
-
#pre_auth ⇒ Object
Returns the value of attribute pre_auth.
-
#server ⇒ Object
Returns the value of attribute server.
Class Method Summary collapse
-
.build(server) ⇒ Object
TODO: this is so wrong!.
Instance Method Summary collapse
- #authorize ⇒ Object
-
#initialize(pre_auth, server) ⇒ Code
constructor
A new instance of Code.
- #request ⇒ Object
Constructor Details
#initialize(pre_auth, server) ⇒ Code
Returns a new instance of Code.
11 12 13 |
# File 'lib/doorkeeper/request/code.rb', line 11 def initialize(pre_auth, server) @pre_auth, @server = pre_auth, server end |
Instance Attribute Details
#pre_auth ⇒ Object
Returns the value of attribute pre_auth.
9 10 11 |
# File 'lib/doorkeeper/request/code.rb', line 9 def pre_auth @pre_auth end |
#server ⇒ Object
Returns the value of attribute server.
9 10 11 |
# File 'lib/doorkeeper/request/code.rb', line 9 def server @server end |
Class Method Details
.build(server) ⇒ Object
TODO: this is so wrong!
5 6 7 |
# File 'lib/doorkeeper/request/code.rb', line 5 def self.build(server) new(server.context.send(:pre_auth), server) end |
Instance Method Details
#authorize ⇒ Object
19 20 21 |
# File 'lib/doorkeeper/request/code.rb', line 19 def request. end |
#request ⇒ Object
15 16 17 |
# File 'lib/doorkeeper/request/code.rb', line 15 def request @request ||= OAuth::CodeRequest.new(pre_auth, server.current_resource_owner) end |