@geolonia/geonicdb-cli 0.6.0 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -121,7 +121,47 @@ geonic help [<command>] [<subcommand>]
121
121
  | `auth nonce` | Get a nonce and PoW challenge for API key authentication |
122
122
  | `auth token-exchange` | Exchange API key for a session JWT via nonce + PoW |
123
123
 
124
- The `auth login` command reads `GDB_EMAIL` and `GDB_PASSWORD` environment variables. It also supports OAuth Client Credentials flow with `--client-id` and `--client-secret`.
124
+ #### Email/Password Login
125
+
126
+ `auth login` uses interactive prompts for email and password. A TTY is required — credentials are never accepted via environment variables or command-line arguments to prevent leaking secrets in shell history.
127
+
128
+ ```bash
129
+ geonic auth login
130
+ ```
131
+
132
+ | Option | Description |
133
+ |---|---|
134
+ | `--tenant-id <id>` | Log in to a specific tenant |
135
+
136
+ **Multi-tenant support**: When you belong to multiple tenants, `auth login` displays the list and lets you select one interactively. Use `--tenant-id` to skip the prompt.
137
+
138
+ ```text
139
+ $ geonic auth login
140
+ Email: user@example.com
141
+ Password: ********
142
+ Login successful. Token saved to config.
143
+
144
+ Available tenants:
145
+ * 1) my_city (tenant_admin) ← current
146
+ 2) another_city (user)
147
+
148
+ Select tenant number (Enter to keep current):
149
+ ```
150
+
151
+ #### OAuth Client Credentials
152
+
153
+ For machine-to-machine authentication (CI/CD, scripts), use the OAuth Client Credentials flow:
154
+
155
+ ```bash
156
+ geonic auth login --client-credentials --client-id MY_ID --client-secret MY_SECRET
157
+ ```
158
+
159
+ | Option | Description |
160
+ |---|---|
161
+ | `--client-credentials` | Use OAuth 2.0 Client Credentials flow |
162
+ | `--client-id <id>` | OAuth client ID (or `GDB_OAUTH_CLIENT_ID` env var) |
163
+ | `--client-secret <secret>` | OAuth client secret (or `GDB_OAUTH_CLIENT_SECRET` env var) |
164
+ | `--scope <scopes>` | OAuth scopes (space-separated) |
125
165
 
126
166
  #### API Key Token Exchange
127
167