login

Login methods to use with torero

Synopsis

Login

Login allows a configured user to log in to the torero server from a client to begin making calls to the system. It is important to understand that you should treat passwords and api keys with the utmost caution. You should never share them with anyone.

Once logged in, the api key will be written to your torero working directory as the file api.key. The torero client will automatically read from this file for subsequent api calls to the torero server.

Login also provides functionality to change a user's password via the --change-password flag. When a password is changed, all previously created API keys for that user will be removed.

If the credentials to the admin account are lost, a user on the server can run torero server --recover-admin-user to begin the reset process.

Initial Login The first time the server is started up there will be a temporary password for the admin user displayed in the logs. Once you log in with the admin user for the first time, you will be required to change your password. Once authenticated, the torero server will return an API keys with a default expiration time of 24 hours. The API keys' expiration timeout can be changed on the server using the configuration variable TORERO_SERVER_API_KEY_EXPIRATION.

torero login <username> [flags]

Examples

Login From CLI

>_ torero login jared
Enter password for user:
Successfully logged in!

View the API Key

If you would like to see the entire API key printed to the terminal, you can use the --raw flag

Outputting the key can be useful when leveraging torero commands in outside applications

>_ torero login jared --raw
Enter password for user:
{
    "api_key": "AaJH5mic-BjShSjgqlSMj05DdJERcrLpudP-yJqEDvgwAOG"
}

Changing Password

When changing your password, the client will log you in, set the new API key, and invalidate all active API keys for that user.

>_ torero login jared --change-password
Enter password for user:
Enter your NEW password to login:
Re-enter your NEW password for verification:
Password verified successfully!



Password was successfully reset!
Please login with the new password you just set.

Enter the NEW password for user:
Successfully logged in!

Options

      --change-password   Changes password for the user.
  -h, --help              help for login

Options inherited from parent commands

      --config string   Path to the configuration file
      --raw             Displays the result of the command in its raw format
      --verbose         Enable verbose output

SEE ALSO