Class: Capcoauth::LogoutController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Capcoauth::LogoutController
- Defined in:
- app/controllers/capcoauth/logout_controller.rb
Instance Method Summary collapse
Methods included from Helpers::Controller
#capcoauth_token, #oauth_callback_url
Instance Method Details
#show ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'app/controllers/capcoauth/logout_controller.rb', line 3 def show session.delete(:capcoauth_user_id) token = session.delete(:capcoauth_access_token) if token OAuth::TTLCache.remove(token) redirect_to root_url, notice: 'You have been logged out' else redirect_to root_url end end |