Module: Passage::Auth::PassPhrase::Helpers

Defined in:
lib/passage/auth/pass_phrase/pass_phrase.rb

Constant Summary collapse

CK =
'__phrase_ck'

Instance Method Summary collapse

Instance Method Details

#auth_fetchObject



13
14
15
# File 'lib/passage/auth/pass_phrase/pass_phrase.rb', line 13

def auth_fetch
  session[CK]
end

#auth_setup(req) ⇒ Object



9
10
11
# File 'lib/passage/auth/pass_phrase/pass_phrase.rb', line 9

def auth_setup(req) 
  session[CK] = req
end

#auth_validate!(identity, trust_root) ⇒ Object



17
18
19
# File 'lib/passage/auth/pass_phrase/pass_phrase.rb', line 17

def auth_validate!(identity, trust_root) 
  redirect '/login' unless session[:authorized]
end