Class: HammerCLIForeman::Auth::LoginCommand::Basic
- Inherits:
-
HammerCLI::AbstractCommand
- Object
- HammerCLI::AbstractCommand
- HammerCLIForeman::Auth::LoginCommand::Basic
- Extended by:
- HammerCLIForeman::Authenticate::Login
- Defined in:
- lib/hammer_cli_foreman/auth.rb
Instance Method Summary collapse
Methods included from HammerCLIForeman::Authenticate::Login
Instance Method Details
#execute ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/hammer_cli_foreman/auth.rb', line 19 def execute Basic.execute_with_params( AUTH_TYPES[:basic_auth], option_username || HammerCLI::Settings.get('_params', 'username'), option_password || HammerCLI::Settings.get('_params', 'password') ) logged_user = HammerCLIForeman.foreman_api_connection.authenticator.user (_("Successfully logged in as '%s'.") % logged_user) HammerCLI::EX_OK end |