Class: Keycard::Request::DirectAttributes
Overview
This class should be used to extract attributes when the application will serve HTTP requests directly or through a proxy that passes trusted values into the application environment to be accessed as usual.
Constant Summary
Constants inherited
from Attributes
Attributes::IDENTITY_ATTRS
Instance Method Summary
collapse
Methods inherited from Attributes
#[], #all, #external, #identity, #identity_keys, #initialize, #supplemental
Instance Method Details
#base ⇒ Object
8
9
10
11
12
13
14
|
# File 'lib/keycard/request/direct_attributes.rb', line 8
def base
{
user_pid: user_pid,
user_eid: user_eid,
client_ip: client_ip
}
end
|
#client_ip ⇒ Object
24
25
26
|
# File 'lib/keycard/request/direct_attributes.rb', line 24
def client_ip
safe('REMOTE_ADDR').split(',').first
end
|
#user_eid ⇒ Object
20
21
22
|
# File 'lib/keycard/request/direct_attributes.rb', line 20
def user_eid
user_pid
end
|
#user_pid ⇒ Object
16
17
18
|
# File 'lib/keycard/request/direct_attributes.rb', line 16
def user_pid
get 'REMOTE_USER'
end
|