Method: ElsToken::ClassMethods#els_config
- Defined in:
- lib/els_token.rb
#els_config(options = {}) ⇒ Object
els_config expects a hash with environmental parameters including the els gateway and expected cookie name (when used in a Rack environment) An optional fake identity can be supplied which will override any active authentication. This can be especially useful during automated testing. The fake ID can take any of the ElsIdentity properties
A typical setup would initialize a options hash to include the following
faker:
name: neilcuk
employee_number: 09095
roles:
- App Admins
- Domain Users
uri: https://els-admin.corp.aol.com:443/opensso/identity
cookie: iPlanetDirectoryPro
cert: /path/to/certs
Do not include the faker object in your production configuration :)
only the uri option is required if you are not worried about cookies and do not plan on using them. If you want to include a certificate for interacting with the ELS server then you can specify a file or directory to find the cert. By default Certificate validiation is off!
47 48 49 50 51 52 |
# File 'lib/els_token.rb', line 47 def els_config( = {}) unless ["uri"] raise "I need a uri to authenticate against" unless ["faker"] end .merge!() end |