Sha256: 8f7152b5224dd8a70a18b30cc384920ccc11536f66be53e068d596e5facca81d

Contents?: true

Size: 468 Bytes

Versions: 5

Compression:

Stored size: 468 Bytes

Contents

module SSO
  class Apache < Base
    CAS_USERNAME = 'REMOTE_USER'
    def available?
      return false unless Setting['authorize_login_delegation']
      return false if controller.api_request? and not Setting['authorize_login_delegation_api']
      true
    end

    # If REMOTE_USER is provided by the web server then
    # authenticate the user without using password.
    def authenticated?
      (self.user = request.env[CAS_USERNAME]).present?
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
foreman_discovery-1.0.0 test/foreman_app/lib/sso/apache.rb
foreman_discovery-1.0.0.rc4 test/foreman_app/lib/sso/apache.rb
foreman_discovery-1.0.0.rc3 test/foreman_app/lib/sso/apache.rb
foreman_discovery-1.0.0.rc2 test/foreman_app/lib/sso/apache.rb
foreman_discovery-1.0.0.rc1 test/foreman_app/lib/sso/apache.rb