Comment on page
The CLI supports two different methods to authenticate with the Akamas server:
- direct login: performs the authentication using the username and password provided directly to the CLI
- oauth2: performs the authentication redirecting the user to Akamas' login page
By default, the CLI authenticates using the direct login unless the user provides the argument
--method direct|oauth2or sets it in the local configuration with the
akamas set config --method direct|oauth2command.
Local users (not linked to any external identity provider) can authenticate by providing the credentials as arguments to Akamas CLI:
akamas login -u <user> -p <password> -w <workspace>
- When the user or password are not provided as arguments, the CLI will prompt for their value. Be aware that passing the password as an argument may store it in the terminal history, so is advised to provide it through the secure prompt.
- If the workspace is specified and the user has access to it, it will be set as the default workspace for the session.
- If the login is successful, a message like the following will be printed: <username> logged in. Welcome."
- If the login fails because the credentials are wrong or the user is not authorized to access, the error message "Login failed: Invalid user credentials" will be printed.
All Akamas users can authenticate through the login page provided by the UI by running the following command:
akamas login -m oauth2
This command is available since version 2.8.0 of the cli
The CLI will provide you with a link to the login page of the configured Akamas instance, similar to the following:
Please authenticate using the link below:
Insert the code provided at the end of the authentication process:
Open the browser on the provided link and authenticate using your local user or any configured identity provider. Once successfully authenticated, the UI will provide you with a code: paste it into the CLI prompt to complete the login process.
The full reference for the Akamas login command is.
akamas login [-m|--method direct|] [-u|--user USERNAME] [-p|--password PASSWORD] [-w|--workspace WORKSPACE]
If one of the environmental variables is specified, the corresponding parameter will not be asked to the user. Workspace is not needed for login.
When logged in, this command will log out the current user
On success the message "Logout successful." will be printed.