Class: Rack::OAuth2::Server::Token

Inherits:
Abstract::Handler show all
Defined in:
lib/rack/oauth2/server/token.rb,
lib/rack/oauth2/server/token/error.rb,
lib/rack/oauth2/server/token/password.rb,
lib/rack/oauth2/server/token/extension.rb,
lib/rack/oauth2/server/token/extension/jwt.rb,
lib/rack/oauth2/server/token/refresh_token.rb,
lib/rack/oauth2/server/token/client_credentials.rb,
lib/rack/oauth2/server/token/authorization_code.rb

Defined Under Namespace

Modules: ErrorMethods, Extension Classes: AuthorizationCode, BadRequest, ClientCredentials, Password, RefreshToken, Request, Response, Unauthorized

Instance Attribute Summary

Attributes inherited from Abstract::Handler

#authenticator, #request, #response

Instance Method Summary (collapse)

Methods inherited from Abstract::Handler

#initialize

Constructor Details

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

Instance Method Details

- (Object) call(env)



7
8
9
10
11
12
# File 'lib/rack/oauth2/server/token.rb', line 7

def call(env)
  request = Request.new(env)
  grant_type_for(request).new(&@authenticator).call(env).finish
rescue Rack::OAuth2::Server::Abstract::Error => e
  e.finish
end