Class: Keycard::Request::CosignAttributes

Inherits:
Attributes
  • Object
show all
Defined in:
lib/keycard/request/cosign_attributes.rb

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, #auth_token, #base, #external, #identity, #identity_keys, #initialize, #supplemental

Constructor Details

This class inherits a constructor from Keycard::Request::Attributes

Instance Method Details

#client_ipObject



17
18
19
# File 'lib/keycard/request/cosign_attributes.rb', line 17

def client_ip
  safe('HTTP_X_FORWARDED_FOR').split(',').first
end

#user_eidObject



13
14
15
# File 'lib/keycard/request/cosign_attributes.rb', line 13

def user_eid
  user_pid
end

#user_pidObject



9
10
11
# File 'lib/keycard/request/cosign_attributes.rb', line 9

def user_pid
  get 'HTTP_X_REMOTE_USER'
end