Class: Keycard::Request::CosignAttributes
Overview
This class extracts attributes for Cosign-protected applications. It follows the same basic pattern as for general proxied requests; that is, the pid/eid are the same and there are currently no additional attributes extracted.
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
9
10
11
12
13
14
15
|
# File 'lib/keycard/request/cosign_attributes.rb', line 9
def base
{
user_pid: user_pid,
user_eid: user_eid,
client_ip: client_ip
}
end
|
#client_ip ⇒ Object
25
26
27
|
# File 'lib/keycard/request/cosign_attributes.rb', line 25
def client_ip
safe('HTTP_X_FORWARDED_FOR').split(',').first
end
|
#user_eid ⇒ Object
21
22
23
|
# File 'lib/keycard/request/cosign_attributes.rb', line 21
def user_eid
user_pid
end
|
#user_pid ⇒ Object
17
18
19
|
# File 'lib/keycard/request/cosign_attributes.rb', line 17
def user_pid
get 'HTTP_X_REMOTE_USER'
end
|