Class: Booth::Userland::Sessions::Show

Inherits:
Object
  • Object
show all
Includes:
Concerns::Action
Defined in:
lib/booth/userland/sessions/show.rb

Overview

‘DELETE /sessions/123` may present a page with a WebAuth authentication challenge. That challenge is responded to asynchronously and in that response the server destroys the session. After that, the page is reloaded by JS using `GET /sessions/123`, which is the `show` action. But we don’t actually have a show action for sessions. We just informatively redirect to the index action.

Instance Method Summary collapse

Instance Method Details

#callObject



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/booth/userland/sessions/show.rb', line 11

def call
  request.must_be_get!
  request.must_be_html!
  request.must_be_logged_in!

  unless request.authentication.mode == :username_and_webauth
    return Tron.failure :only_applicable_when_passwordless
  end

  ::Booth::Userland::Sessions::Transitions::Show::EnterWebauth.call request:
end