|
42 | 42 | * [`asyncapi bundle`](#asyncapi-bundle) |
43 | 43 | * [`asyncapi config`](#asyncapi-config) |
44 | 44 | * [`asyncapi config analytics`](#asyncapi-config-analytics) |
| 45 | +* [`asyncapi config auth add PATTERN TOKEN`](#asyncapi-config-auth-add-pattern-token) |
45 | 46 | * [`asyncapi config context`](#asyncapi-config-context) |
46 | 47 | * [`asyncapi config context add CONTEXT-NAME SPEC-FILE-PATH`](#asyncapi-config-context-add-context-name-spec-file-path) |
47 | 48 | * [`asyncapi config context current`](#asyncapi-config-context-current) |
@@ -170,6 +171,37 @@ DESCRIPTION |
170 | 171 |
|
171 | 172 | _See code: [src/commands/config/analytics.ts](https://github.com/asyncapi/cli/blob/v3.2.0/src/commands/config/analytics.ts)_ |
172 | 173 |
|
| 174 | +## `asyncapi config auth add PATTERN TOKEN` |
| 175 | + |
| 176 | +Add an authentication config for resolving $ref files requiring HTTP Authorization. |
| 177 | + |
| 178 | +``` |
| 179 | +USAGE |
| 180 | + $ asyncapi config auth add PATTERN TOKEN [-a <value>] [-h <value>...] |
| 181 | +
|
| 182 | +ARGUMENTS |
| 183 | + PATTERN Glob pattern for matching protected URLs (e.g. github.com/org/repo/**/*.*) |
| 184 | + TOKEN Authentication token or environment variable reference (prefix with $, e.g. $GITHUB_TOKEN) |
| 185 | +
|
| 186 | +FLAGS |
| 187 | + -a, --auth-type=<value> Authentication type (default is "Bearer") |
| 188 | + -h, --header=<value>... Additional headers in key=value format |
| 189 | +
|
| 190 | +DESCRIPTION |
| 191 | + Add an authentication config for resolving $ref files requiring HTTP Authorization. |
| 192 | +
|
| 193 | +EXAMPLES |
| 194 | + $ asyncapi config auth add "https://github.com/org/repo/**/*" "ghp_XuYi7ZWQWjmrJpY2Kz3ET" |
| 195 | +
|
| 196 | + $ asyncapi config auth add "https://api.github.com/repos/org/repo/**/*" "$GITHUB_TOKEN" |
| 197 | +
|
| 198 | + $ asyncapi config auth add "https://private-registry.com/**/*" "my-token" --auth-type="Token" |
| 199 | +
|
| 200 | + $ asyncapi config auth add "https://api.example.com/**/*" "token123" --header="X-API-Key=abc123" --header="User-Agent=MyApp/1.0" |
| 201 | +``` |
| 202 | + |
| 203 | +_See code: [src/commands/config/auth/add.ts](https://github.com/asyncapi/cli/blob/v3.2.0/src/commands/config/auth/add.ts)_ |
| 204 | + |
173 | 205 | ## `asyncapi config context` |
174 | 206 |
|
175 | 207 | Manage short aliases for full paths to AsyncAPI documents |
|
0 commit comments