Class: Keycard::Request::DirectAttributes

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

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, #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



16
17
18
# File 'lib/keycard/request/direct_attributes.rb', line 16

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

#user_eidObject



12
13
14
# File 'lib/keycard/request/direct_attributes.rb', line 12

def user_eid
  user_pid
end

#user_pidObject



8
9
10
# File 'lib/keycard/request/direct_attributes.rb', line 8

def user_pid
  get 'REMOTE_USER'
end