class Rack::OAuth2::Server::Rails::Authorize
Public Class Methods
new(app)
click to toggle source
Calls superclass method
Rack::OAuth2::Server::Abstract::Handler::new
# File lib/rack/oauth2/server/rails/authorize.rb, line 6 def initialize(app) super() @app = app end
Public Instance Methods
_call(env)
click to toggle source
# File lib/rack/oauth2/server/rails/authorize.rb, line 11 def _call(env) prepare_oauth_env env @app.call env rescue Rack::OAuth2::Server::Abstract::Error => e e.finish end
Private Instance Methods
prepare_oauth_env(env)
click to toggle source
# File lib/rack/oauth2/server/rails/authorize.rb, line 20 def prepare_oauth_env(env) response_type = response_type_for( Server::Authorize::Request.new(env) ).new response_type._call(env) response_type.response.extend ResponseExt env[REQUEST] = response_type.request env[RESPONSE] = response_type.response rescue Rack::OAuth2::Server::Abstract::Error => e env[ERROR] = e end