Sha256: d73e4dcd64f718756b5fc1607136ebb779a556aa5b55fa53abd85d199186f37d

Contents?: true

Size: 371 Bytes

Versions: 9

Compression:

Stored size: 371 Bytes

Contents

module Capcoauth
  class LogoutController < Capcoauth::ApplicationController
    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
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
capcoauth-0.4.0 app/controllers/capcoauth/logout_controller.rb
capcoauth-0.3.3 app/controllers/capcoauth/logout_controller.rb
capcoauth-0.3.2 app/controllers/capcoauth/logout_controller.rb
capcoauth-0.3.1 app/controllers/capcoauth/logout_controller.rb
capcoauth-0.3.0 app/controllers/capcoauth/logout_controller.rb
capcoauth-0.2.3 app/controllers/capcoauth/logout_controller.rb
capcoauth-0.2.2 app/controllers/capcoauth/logout_controller.rb
capcoauth-0.2.1 app/controllers/capcoauth/logout_controller.rb
capcoauth-0.2.0 app/controllers/capcoauth/logout_controller.rb