Sha256: e01bcf5e72df2f6674775c6a4c6181f6f63db0d6f441f4ae835c0ea7d8150dc1

Contents?: true

Size: 585 Bytes

Versions: 36

Compression:

Stored size: 585 Bytes

Contents

module HammerCLIForeman
  module Authenticate
    module Login
      def execute_with_params(auth_type, *args)
        connection = HammerCLIForeman.foreman_api_reconnect(auth_type)
        if !(connection.authenticator.is_a?(HammerCLIForeman::Api::SessionAuthenticatorWrapper))
          raise ArgumentError, _("Can't perform login. Make sure sessions are enabled in hammer"\
            " configuration file.")
        end
        connection.authenticator.set_auth_params(*args)
        connection.authenticator.force_user_change
        connection.login
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
hammer_cli_foreman-3.14.0 lib/hammer_cli_foreman/authenticate/login.rb
hammer_cli_foreman-3.13.0 lib/hammer_cli_foreman/authenticate/login.rb
hammer_cli_foreman-3.12.0 lib/hammer_cli_foreman/authenticate/login.rb
hammer_cli_foreman-3.10.0 lib/hammer_cli_foreman/authenticate/login.rb
hammer_cli_foreman-3.9.0 lib/hammer_cli_foreman/authenticate/login.rb
hammer_cli_foreman-3.8.0 lib/hammer_cli_foreman/authenticate/login.rb
hammer_cli_foreman-3.7.0 lib/hammer_cli_foreman/authenticate/login.rb
hammer_cli_foreman-3.5.1 lib/hammer_cli_foreman/authenticate/login.rb
hammer_cli_foreman-3.6.0 lib/hammer_cli_foreman/authenticate/login.rb
hammer_cli_foreman-3.5.0 lib/hammer_cli_foreman/authenticate/login.rb
hammer_cli_foreman-3.4.0 lib/hammer_cli_foreman/authenticate/login.rb
hammer_cli_foreman-3.3.0 lib/hammer_cli_foreman/authenticate/login.rb
hammer_cli_foreman-3.2.0 lib/hammer_cli_foreman/authenticate/login.rb
hammer_cli_foreman-2.5.2 lib/hammer_cli_foreman/authenticate/login.rb
hammer_cli_foreman-3.1.0 lib/hammer_cli_foreman/authenticate/login.rb
hammer_cli_foreman-3.0.0 lib/hammer_cli_foreman/authenticate/login.rb
hammer_cli_foreman-2.5.1 lib/hammer_cli_foreman/authenticate/login.rb
hammer_cli_foreman-2.5.0 lib/hammer_cli_foreman/authenticate/login.rb
hammer_cli_foreman-2.3.2 lib/hammer_cli_foreman/authenticate/login.rb
hammer_cli_foreman-2.4.0 lib/hammer_cli_foreman/authenticate/login.rb