class Doorkeeper::AuthorizationsController

def authorize_response

def authorize_response
  @authorize_response ||= begin
    return pre_auth.error_response unless pre_auth.authorizable?
    context = build_context(pre_auth: pre_auth)
    before_successful_authorization(context)
    auth = strategy.authorize
    context = build_context(auth: auth)
    after_successful_authorization(context)
    auth
  end
end