Class: Masks::Sessions::Request
Overview
Session for masking ActionDispatch::Request
and Rack::Request
.
Constant Summary
Masks::Session::CHECK_KEY
Instance Method Summary
collapse
#access, #actor=, #checks_for, #cleanup!, #device, #error_message, #extra, #extras, #find_check, #id, #mask, mask!, #mask!, #passed?, #passed_at, #passed_checks?, #past_checks, #scoped, #session_params
Instance Method Details
#data ⇒ Object
29
30
31
|
# File 'app/models/masks/sessions/request.rb', line 29
def data
request.session
end
|
#fingerprint ⇒ Object
21
22
23
|
# File 'app/models/masks/sessions/request.rb', line 21
def fingerprint
params[:_fingerprint]
end
|
#ip_address ⇒ Object
13
14
15
|
# File 'app/models/masks/sessions/request.rb', line 13
def ip_address
request.remote_ip
end
|
#matches_mask?(mask) ⇒ Boolean
33
34
35
|
# File 'app/models/masks/sessions/request.rb', line 33
def matches_mask?(mask)
mask.matches_request?(request)
end
|
#params ⇒ Object
25
26
27
|
# File 'app/models/masks/sessions/request.rb', line 25
def params
request.params
end
|
#to_s ⇒ Object
9
10
11
|
# File 'app/models/masks/sessions/request.rb', line 9
def to_s
"mask(#{request.method.upcase} #{request.path})"
end
|
#user_agent ⇒ Object
17
18
19
|
# File 'app/models/masks/sessions/request.rb', line 17
def user_agent
request.user_agent
end
|
#writable? ⇒ Boolean
37
38
39
|
# File 'app/models/masks/sessions/request.rb', line 37
def writable?
request.post?
end
|