module Nucleus::Adapters::V1::OpenshiftV2::Authentication
Authentication
functionality to support the Openshift V2 API
Public Instance Methods
auth_client()
click to toggle source
@see Stub#auth_client
# 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