Sha256: c6faf906558d4f98b970c55342b7ecba7d7df24ee169b3c85acad8c2b2eee2ba

Contents?: true

Size: 673 Bytes

Versions: 48

Compression:

Stored size: 673 Bytes

Contents

# frozen-string-literal: true

module Rodauth
  Feature.define(:logout, :Logout) do
    notice_flash "You have been logged out"
    loaded_templates %w'logout'
    view 'logout', 'Logout'
    additional_form_tags
    before
    after
    button 'Logout'
    redirect{require_login_redirect}

    auth_methods :logout

    route do |r|
      before_logout_route

      r.get do
        logout_view
      end

      r.post do
        transaction do
          before_logout
          logout
          after_logout
        end
        set_notice_flash logout_notice_flash
        redirect logout_redirect
      end
    end

    def logout
      clear_session
    end
  end
end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
rodauth-2.31.0 lib/rodauth/features/logout.rb
rodauth-2.30.0 lib/rodauth/features/logout.rb
rodauth-2.29.0 lib/rodauth/features/logout.rb
rodauth-2.28.0 lib/rodauth/features/logout.rb
rodauth-2.27.0 lib/rodauth/features/logout.rb
rodauth-2.26.1 lib/rodauth/features/logout.rb
rodauth-2.26.0 lib/rodauth/features/logout.rb
rodauth-2.25.0 lib/rodauth/features/logout.rb
rodauth-2.24.0 lib/rodauth/features/logout.rb
rodauth-2.23.0 lib/rodauth/features/logout.rb
rodauth-2.22.0 lib/rodauth/features/logout.rb
rodauth-2.21.0 lib/rodauth/features/logout.rb
rodauth-2.20.0 lib/rodauth/features/logout.rb
rodauth-2.19.0 lib/rodauth/features/logout.rb
rodauth-2.18.0 lib/rodauth/features/logout.rb
rodauth-2.17.0 lib/rodauth/features/logout.rb
rodauth-2.16.0 lib/rodauth/features/logout.rb
rodauth-2.15.0 lib/rodauth/features/logout.rb
rodauth-2.14.0 lib/rodauth/features/logout.rb
rodauth-2.13.0 lib/rodauth/features/logout.rb