Module: Rack::OAuth2::Server::Authorize::ErrorHandler

Included in:
BadRequest, ServerError, TemporarilyUnavailable
Defined in:
lib/rack/oauth2/server/authorize/error.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



6
7
8
# File 'lib/rack/oauth2/server/authorize/error.rb', line 6

def self.included(klass)
  klass.send :attr_accessor, :redirect_uri, :state, :protocol_params_location
end

Instance Method Details

#finishObject



14
15
16
17
18
19
20
21
22
# File 'lib/rack/oauth2/server/authorize/error.rb', line 14

def finish
  if redirect_uri.present? && protocol_params_location.present?
    super do |response|
      response.redirect Util.redirect_uri(redirect_uri, protocol_params_location, protocol_params)
    end
  else
    raise self
  end
end

#protocol_paramsObject



10
11
12
# File 'lib/rack/oauth2/server/authorize/error.rb', line 10

def protocol_params
  super.merge(:state => state)
end