Hawiyat

Authentication

The Hawiyat CLI uses a token-based authentication system to securely verify your identity and grant access to your Hawiyat resources.
Instead of repeatedly entering a username and password, you generate a unique access token from your dashboard and use it for all CLI operations.

This method is secure, script-friendly, and ideal for automation pipelines such as CI/CD.


How Authentication Works

The authentication process follows these steps:

  1. Generate an access token from your Hawiyat account dashboard.
  2. Store the token securely — the CLI saves it locally in a configuration file.
  3. Every time you run a CLI command, the token is sent to the Hawiyat API.
  4. The API verifies the token:
    • If valid → Command executes successfully.
    • If invalid → CLI displays an authentication error.
  5. Tokens remain valid until revoked from the dashboard.

Creating an Access Token

Permissions Note:

  • Admins can generate tokens without restrictions.
  • Non-admin users must have explicit permission to generate tokens.

Steps to create a token:

  1. Log in to the Hawiyat Dashboard.
  2. Go to Settings → Profile.
  3. Scroll down to the Access Tokens section.
  4. Click the Generate button.
  5. Copy the generated token immediately — it will only be shown once.
    By default, Hawiyat access tokens do not expire unless you revoke them.
Access token generation screen

Storing the Access Token

When you authenticate through the CLI, Hawiyat automatically stores the token in a config.json file along with your server’s URL.

Default storage locations:

  • macOS / Linux: ~/.hawiyat/config.json
  • Windows: %USERPROFILE%\.hawiyat\config.json

Example config.json file:

{
  "server": "https://api.hawiyat.com",
  "token": "your-access-token"
}

On this page