class RHC::Auth::X509
Attributes
options[R]
Public Class Methods
new(*args)
click to toggle source
# File lib/rhc/auth/x509.rb, line 3 def initialize(*args) @options = args[0] || Commander::Command::Options.new end
Public Instance Methods
can_authenticate?()
click to toggle source
# File lib/rhc/auth/x509.rb, line 27 def can_authenticate? true end
expired_token_message()
click to toggle source
# File lib/rhc/auth/x509.rb, line 31 def expired_token_message "Your authorization token has expired. " + get_token_message end
get_token_message()
click to toggle source
# File lib/rhc/auth/x509.rb, line 35 def get_token_message "Fetching a new token from #{openshift_server}." end
retry_auth?(response, client)
click to toggle source
# File lib/rhc/auth/x509.rb, line 17 def retry_auth?(response, client) # This is really only hit in the case of token auth falling back to x509. # x509 auth doesn't usually get 401s. if response && response.status != 401 false else true end end
to_request(request, client=nil)
click to toggle source
# File lib/rhc/auth/x509.rb, line 7 def to_request(request, client=nil) request[:client_cert] = certificate_file(options.ssl_client_cert_file) request[:client_key] = certificate_key(options.ssl_client_key_file) request end
token_store_user_key()
click to toggle source
# File lib/rhc/auth/x509.rb, line 13 def token_store_user_key certificate_fingerprint(options.ssl_client_cert_file) end