Module: Nucleus::Adapters::V1::OpenshiftV2::Authentication
- Included in:
- Nucleus::Adapters::V1::OpenshiftV2
- Defined in:
- lib/nucleus/adapters/v1/openshift_v2/authentication.rb
Overview
Authentication functionality to support the Openshift V2 API
Instance Method Summary collapse
Instance Method Details
#auth_client ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/nucleus/adapters/v1/openshift_v2/authentication.rb', line 8 def auth_client HttpBasicAuthClient.new @check_certificates do |verify_ssl, headers| # auth verification block headers['Accept'] = 'application/json; version=1.7' result = Excon.new("#{@endpoint_url}/user", ssl_verify_peer: verify_ssl).get(headers: headers) # Openshift returns 401 for invalid credentials --> auth failed, return false result.status != 401 end end |