Class: Oauth::AuthorizationsController

Inherits:
Doorkeeper::AuthorizationsController
  • Object
show all
Defined in:
app/controllers/oauth/authorizations_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject

TODO: Handle raise invalid authorization


21
22
23
# File 'app/controllers/oauth/authorizations_controller.rb', line 21

def create
  redirect_or_render authorization.authorize
end

#destroyObject


25
26
27
# File 'app/controllers/oauth/authorizations_controller.rb', line 25

def destroy
  redirect_or_render authorization.deny
end

#newObject


6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'app/controllers/oauth/authorizations_controller.rb', line 6

def new
  if pre_auth.authorizable?
    if skip_authorization? || matching_token?
      auth = authorization.authorize
      session.delete(:user_return_to)
      redirect_to auth.redirect_uri
    else
      render "doorkeeper/authorizations/new"
    end
  else
    render "doorkeeper/authorizations/error"
  end
end