Sha256: 7edfb3ce5f1fc003d3d474e93432ef4e85264c985cd73dfc6b2b1195ffc10b8b

Contents?: true

Size: 360 Bytes

Versions: 4

Compression:

Stored size: 360 Bytes

Contents

module Capcoauth
  class LogoutController < Capcoauth::ApplicationController

    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
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
capcoauth-0.1.4 app/controllers/capcoauth/logout_controller.rb
capcoauth-0.1.3 app/controllers/capcoauth/logout_controller.rb
capcoauth-0.1.2 app/controllers/capcoauth/logout_controller.rb
capcoauth-0.1.1 app/controllers/capcoauth/logout_controller.rb