Class: Rack::OAuth2::Server::Token::Extension::Example

Inherits:
Abstract::Handler show all
Defined in:
lib/rack/oauth2/server/token/extension/example.rb

Defined Under Namespace

Classes: Request

Constant Summary collapse

GRANT_TYPE_URN =
'urn:ietf:params:oauth:grant-type:example'

Instance Attribute Summary

Attributes inherited from Abstract::Handler

#authenticator, #request, #response

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Abstract::Handler

#call, #initialize

Constructor Details

This class inherits a constructor from Rack::OAuth2::Server::Abstract::Handler

Class Method Details

.grant_type_for?(grant_type) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/rack/oauth2/server/token/extension/example.rb', line 10

def grant_type_for?(grant_type)
  grant_type == GRANT_TYPE_URN
end

Instance Method Details

#_call(env) ⇒ Object



15
16
17
18
19
# File 'lib/rack/oauth2/server/token/extension/example.rb', line 15

def _call(env)
  @request  = Request.new env
  @response = Response.new request
  super
end