Module: SoarAuthenticationCas
- Defined in:
- lib/soar_authentication_cas.rb,
lib/soar_authentication_cas/version.rb
Constant Summary collapse
- VERSION =
"0.1.2"
Class Method Summary collapse
Class Method Details
.cas_servers(environment) ⇒ Object
4 5 6 7 |
# File 'lib/soar_authentication_cas.rb', line 4 def self.cas_servers(environment) { 'production' => environment['CAS_SERVER'], 'development' => environment['CAS_SERVER'], } end |
.configure(environment) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/soar_authentication_cas.rb', line 9 def self.configure(environment) return nil if environment.nil? or environment['RACK_ENV'].nil? self.validate(environment) signon_prefix = cas_servers(environment)[environment['RACK_ENV']] are_we_in_development = ( environment['RACK_ENV'] == 'development' ) { :prefix => signon_prefix, :browsers_only => are_we_in_development, :ignore_certificate => are_we_in_development } end |