Class: Oauth::AuthorizationsController

Inherits:
Doorkeeper::AuthorizationsController
  • Object
show all
Includes:
Gitlab::Experimentation::ControllerConcern, InitializesCurrentUserMode
Defined in:
app/controllers/oauth/authorizations_controller.rb

Instance Method Summary collapse

Methods included from InitializesCurrentUserMode

#current_user_mode

Methods included from Gitlab::Experimentation::ControllerConcern

#experiment_enabled?, #experiment_tracking_category_and_group, #frontend_experimentation_tracking_data, #record_experiment_user, #set_experimentation_subject_id_cookie, #track_experiment_event

Instance Method Details

#newObject

Overridden from Doorkeeper::AuthorizationsController to include the call to session.delete


13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'app/controllers/oauth/authorizations_controller.rb', line 13

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