class Doorkeeper::AuthorizationsController
def authorization
def authorization @authorization ||= Doorkeeper::OAuth::AuthorizationRequest.new(current_resource_owner, params) end
def create
def create if authorization.authorize redirect_to authorization.success_redirect_uri else render :error end end
def destroy
def destroy authorization.deny redirect_to authorization.invalid_redirect_uri end
def new
def new if authorization.valid? if authorization.access_token_exists? authorization.authorize redirect_to authorization.success_redirect_uri end else render :error end end