Class: DeviseG5Authenticatable::SessionsController
- Inherits:
-
Devise::OmniauthCallbacksController
- Object
- Devise::OmniauthCallbacksController
- DeviseG5Authenticatable::SessionsController
- Defined in:
- app/controllers/devise_g5_authenticatable/sessions_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
13 14 15 16 |
# File 'app/controllers/devise_g5_authenticatable/sessions_controller.rb', line 13 def create self.resource = resource_class.find_and_update_for_g5_oauth(auth_data) resource ? sign_in_resource : register_resource end |
#destroy ⇒ Object
18 19 20 21 22 |
# File 'app/controllers/devise_g5_authenticatable/sessions_controller.rb', line 18 def destroy signed_in_resource.try(:revoke_g5_credentials!) local_sign_out remote_sign_out end |
#new ⇒ Object
5 6 7 |
# File 'app/controllers/devise_g5_authenticatable/sessions_controller.rb', line 5 def new redirect_to (resource_name) end |
#omniauth_passthru ⇒ Object
9 10 11 |
# File 'app/controllers/devise_g5_authenticatable/sessions_controller.rb', line 9 def omniauth_passthru render status: 404, text: 'Authentication passthru.' end |