Class: Nyauth::SessionsController
Instance Method Summary
collapse
#initialize
#detect_url_helper, #detect_url_helper_for_app, #detect_url_helper_for_nyauth, #method_missing, #root_path
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Nyauth::ApplicationHelper
Instance Method Details
#create ⇒ Object
10
11
12
13
14
15
16
17
|
# File 'app/controllers/nyauth/sessions_controller.rb', line 10
def create
sign_in(@service.client) if @service.save(as: nyauth_client_name)
redirect_path = session.delete("#{nyauth_client_name}_return_to")
respond_with @service,
location: redirect_path || \
Nyauth.configuration.redirect_path_after_sign_in.call(nyauth_client_name) || \
main_app.root_path
end
|
#destroy ⇒ Object
19
20
21
22
|
# File 'app/controllers/nyauth/sessions_controller.rb', line 19
def destroy
sign_out
respond_with @service, location: Nyauth.configuration.redirect_path_after_sign_out.call(nyauth_client_name) || new_session_path_for(nyauth_client_name)
end
|
#new ⇒ Object
7
8
|
# File 'app/controllers/nyauth/sessions_controller.rb', line 7
def new
end
|