Skip to content

Commit c0fcbfe

Browse files
committed
Fix minor doc issues
1 parent d10ef2b commit c0fcbfe

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

docs/gateway/policies/apikey-authentication.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ curl -X POST "http://localhost:9090/apis/weather-api-v1.0/api-keys" \
236236
```bash
237237
curl -X POST "http://localhost:9090/apis/weather-api-v1.0/api-keys" \
238238
-H "Content-Type: application/json" \
239-
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
239+
-H "Authorization: Bearer <JWT_TOKEN>" \
240240
-d '{"name": "production-key"}'
241241
```
242242

@@ -294,7 +294,7 @@ curl -X POST "http://localhost:9090/apis/weather-api-v1.0/api-keys" \
294294
```bash
295295
curl -X POST "http://localhost:9090/apis/weather-api-v1.0/api-keys" \
296296
-H "Content-Type: application/json" \
297-
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
297+
-H "Authorization: Bearer <JWT_TOKEN>" \
298298
-d '{
299299
"name": "production-key",
300300
"expires_in": {
@@ -313,7 +313,7 @@ curl -X POST "http://localhost:9090/apis/weather-api-v1.0/api-keys" \
313313
"remaining_api_key_quota": 9,
314314
"api_key": {
315315
"name": "production-key",
316-
"api_key": "apip_3521f31335d98868f1526ef_dbehwy3e8d8xcub238dx2",
316+
"api_key": "apip_<64_hex>_<22_chars>",
317317
"apiId": "weather-api-v1.0",
318318
"operations": "[\"*\"]",
319319
"status": "active",
@@ -364,7 +364,7 @@ curl -X GET "http://localhost:9090/apis/weather-api-v1.0/api-keys" \
364364
**Using JWT Authentication:**
365365
```bash
366366
curl -X GET "http://localhost:9090/apis/weather-api-v1.0/api-keys" \
367-
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
367+
-H "Authorization: Bearer <JWT_TOKEN>"
368368
```
369369

370370
#### Successful Response (200 OK)
@@ -454,7 +454,7 @@ curl -X POST "http://localhost:9090/apis/weather-api-v1.0/api-keys/production-ke
454454
```bash
455455
curl -X POST "http://localhost:9090/apis/weather-api-v1.0/api-keys/production-key/regenerate" \
456456
-H "Content-Type: application/json" \
457-
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
457+
-H "Authorization: Bearer <JWT_TOKEN>" \
458458
-d '{
459459
"expires_in": {
460460
"duration": 60,
@@ -510,7 +510,7 @@ curl -X DELETE "http://localhost:9090/apis/weather-api-v1.0/api-keys/production-
510510
**Using JWT Authentication:**
511511
```bash
512512
curl -X DELETE "http://localhost:9090/apis/weather-api-v1.0/api-keys/production-key" \
513-
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
513+
-H "Authorization: Bearer <JWT_TOKEN>"
514514
```
515515

516516
#### Successful Response (200 OK)

gateway/gateway-controller/pkg/storage/apikey_store.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func (s *APIKeyStore) GetAll() []*models.APIKey {
9797
return result
9898
}
9999

100-
// Revoke marks an API key as revoked by finding it through hash comparison
100+
// Revoke marks an API key as revoked by finding it through API ID and key name lookup
101101
func (s *APIKeyStore) Revoke(apiId, apiKeyName string) bool {
102102
s.mu.Lock()
103103
defer s.mu.Unlock()

0 commit comments

Comments
 (0)