zuplo 6.68.24 → 6.68.26
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.
|
@@ -21,10 +21,11 @@ the default API key, your legacy developer portal will IMMEDIATELY stop working.
|
|
|
21
21
|
|
|
22
22
|
To delete the default API key, follow these steps:
|
|
23
23
|
|
|
24
|
+
{/* prettier-ignore */}
|
|
24
25
|
<Stepper>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
1. Navigate to your Zuplo account settings.
|
|
27
|
+
2. Click on the **API Keys** section.
|
|
28
|
+
3. Locate the default API key in the list. It will be labeled "Default consumer for account-name" and have a "default" tag.
|
|
29
|
+
4. Click the **Delete** button next to the default API key.
|
|
30
|
+
5. Confirm the deletion when prompted.
|
|
30
31
|
</Stepper>
|
|
@@ -58,17 +58,18 @@ This workflow:
|
|
|
58
58
|
Place test files in the `tests` folder with the `.test.ts` extension:
|
|
59
59
|
|
|
60
60
|
```typescript title="tests/api.test.ts"
|
|
61
|
-
import { describe, it
|
|
61
|
+
import { describe, it } from "@zuplo/test";
|
|
62
|
+
import { expect } from "chai";
|
|
62
63
|
|
|
63
64
|
describe("API", () => {
|
|
64
65
|
it("returns 200 for health check", async () => {
|
|
65
66
|
const response = await fetch(`${ZUPLO_TEST_URL}/health`);
|
|
66
|
-
expect(response.status).
|
|
67
|
+
expect(response.status).to.equal(200);
|
|
67
68
|
});
|
|
68
69
|
|
|
69
70
|
it("requires authentication", async () => {
|
|
70
71
|
const response = await fetch(`${ZUPLO_TEST_URL}/protected`);
|
|
71
|
-
expect(response.status).
|
|
72
|
+
expect(response.status).to.equal(401);
|
|
72
73
|
});
|
|
73
74
|
});
|
|
74
75
|
```
|
|
@@ -134,12 +134,12 @@ export async function getJwt(request: ZuploRequest, context: ZuploContext) {
|
|
|
134
134
|
When the JWT Service Plugin is enabled, your Zuplo API acts as an identity
|
|
135
135
|
provider with the following endpoints:
|
|
136
136
|
|
|
137
|
-
- **Issuer URL**: `https://{deploymentName}.zuplo.
|
|
137
|
+
- **Issuer URL**: `https://{deploymentName}.zuplo.app/__zuplo/issuer` (or your
|
|
138
138
|
custom domain if configured)
|
|
139
139
|
- **OIDC Configuration**:
|
|
140
|
-
`https://{deploymentName}.zuplo.
|
|
140
|
+
`https://{deploymentName}.zuplo.app/__zuplo/issuer/.well-known/openid-configuration`
|
|
141
141
|
- **JWKS Endpoint**:
|
|
142
|
-
`https://{deploymentName}.zuplo.
|
|
142
|
+
`https://{deploymentName}.zuplo.app/__zuplo/issuer/.well-known/jwks.json`
|
|
143
143
|
|
|
144
144
|
The OIDC configuration endpoint returns a standard OpenID Connect discovery
|
|
145
145
|
document that includes the JWKS URI for retrieving the public keys used to
|
|
@@ -190,7 +190,7 @@ const jwt = require("jsonwebtoken");
|
|
|
190
190
|
const jwksClient = require("jwks-rsa");
|
|
191
191
|
|
|
192
192
|
// Replace with your actual Zuplo deployment name or custom domain
|
|
193
|
-
const ISSUER = "https://my-api.zuplo.
|
|
193
|
+
const ISSUER = "https://my-api.zuplo.app/__zuplo/issuer";
|
|
194
194
|
|
|
195
195
|
// Create a JWKS client to fetch public keys
|
|
196
196
|
const client = jwksClient({
|
|
@@ -259,7 +259,7 @@ app = FastAPI()
|
|
|
259
259
|
security = HTTPBearer()
|
|
260
260
|
|
|
261
261
|
# Replace with your actual Zuplo deployment name or custom domain
|
|
262
|
-
ISSUER = "https://my-api.zuplo.
|
|
262
|
+
ISSUER = "https://my-api.zuplo.app/__zuplo/issuer"
|
|
263
263
|
JWKS_URL = f"{ISSUER}/.well-known/jwks.json"
|
|
264
264
|
|
|
265
265
|
# Initialize JWKS client
|
|
@@ -314,8 +314,8 @@ ensure you are only allowing tokens from trusted issuers.
|
|
|
314
314
|
import * as oauth from "oauth4webapi";
|
|
315
315
|
|
|
316
316
|
const ALLOWED_ISSUERS = [
|
|
317
|
-
"https://my-api.zuplo.
|
|
318
|
-
"https://another-api.zuplo.
|
|
317
|
+
"https://my-api.zuplo.app/__zuplo/issuer",
|
|
318
|
+
"https://another-api.zuplo.app/__zuplo/issuer",
|
|
319
319
|
// Add more allowed issuers as needed
|
|
320
320
|
];
|
|
321
321
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zuplo",
|
|
3
|
-
"version": "6.68.
|
|
3
|
+
"version": "6.68.26",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The programmable API Gateway",
|
|
6
6
|
"author": "Zuplo, Inc.",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"zuplo": "zuplo.js"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@zuplo/cli": "6.68.
|
|
23
|
-
"@zuplo/core": "6.68.
|
|
24
|
-
"@zuplo/runtime": "6.68.
|
|
22
|
+
"@zuplo/cli": "6.68.26",
|
|
23
|
+
"@zuplo/core": "6.68.26",
|
|
24
|
+
"@zuplo/runtime": "6.68.26",
|
|
25
25
|
"@zuplo/test": "1.4.0"
|
|
26
26
|
}
|
|
27
27
|
}
|