Class: Doorkeeper::Request::ClientCredentials

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client, server) ⇒ ClientCredentials

Returns a new instance of ClientCredentials.


10
11
12
# File 'lib/doorkeeper/request/client_credentials.rb', line 10

def initialize(client, server)
  @client, @server = client, server
end

Instance Attribute Details

#clientObject

Returns the value of attribute client


8
9
10
# File 'lib/doorkeeper/request/client_credentials.rb', line 8

def client
  @client
end

#serverObject

Returns the value of attribute server


8
9
10
# File 'lib/doorkeeper/request/client_credentials.rb', line 8

def server
  @server
end

Class Method Details

.build(server) ⇒ Object


4
5
6
# File 'lib/doorkeeper/request/client_credentials.rb', line 4

def self.build(server)
  new(server.client, server)
end

Instance Method Details

#authorizeObject


18
19
20
# File 'lib/doorkeeper/request/client_credentials.rb', line 18

def authorize
  request.authorize
end

#requestObject


14
15
16
# File 'lib/doorkeeper/request/client_credentials.rb', line 14

def request
  @request ||= OAuth::ClientCredentialsRequest.new(Doorkeeper.configuration, client, server.parameters)
end