Class: Capcoauth::LogoutController

Inherits:
ApplicationController show all
Defined in:
app/controllers/capcoauth/logout_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



4
5
6
7
8
9
10
11
12
# File 'app/controllers/capcoauth/logout_controller.rb', line 4

def show
  session.delete(:capcoauth_user_id)
  if token = session.delete(:capcoauth_access_token)
    OAuth::TTLCache.delete(token)
    redirect_to root_url, notice: 'You have been logged out'
  else
    redirect_to root_url
  end
end