Class: HammerCLIForeman::Api::InteractiveBasicAuthExternal

Inherits:
ApipieBindings::Authenticators::BasicAuthExternal
  • Object
show all
Includes:
BasicAuth
Defined in:
lib/hammer_cli_foreman/api/interactive_basic_auth_external.rb

Instance Method Summary collapse

Methods included from BasicAuth

#authenticate, #clear, #error, #password, #set_credentials, #status, #user

Constructor Details

#initialize(user, password, foreman_url) ⇒ InteractiveBasicAuthExternal

Returns a new instance of InteractiveBasicAuthExternal.



8
9
10
# File 'lib/hammer_cli_foreman/api/interactive_basic_auth_external.rb', line 8

def initialize(user, password, foreman_url)
  super(user, password, "#{foreman_url}/api/users/extlogin", HammerCLI::SSLOptions.new.get_options(foreman_url))
end

Instance Method Details

#session_idObject



12
13
14
# File 'lib/hammer_cli_foreman/api/interactive_basic_auth_external.rb', line 12

def session_id
  auth_cookie&.delete_prefix('_session_id=')
end