removed deprecated endpoint

This commit is contained in:
TheCactusBlue 2025-03-25 12:03:27 -07:00
parent 952aa78981
commit f45451a040

View File

@ -1,32 +0,0 @@
import { yupArray, yupNumber, yupObject, yupString } from "@stackframe/stack-shared/dist/schema-fields";
import { getEnvVariable } from "@stackframe/stack-shared/dist/utils/env";
import { getPublicJwkSet } from "@stackframe/stack-shared/dist/utils/jwt";
import { createSmartRouteHandler } from "../../../route-handlers/smart-route-handler";
export const GET = createSmartRouteHandler({
metadata: {
summary: "JWKS Endpoint",
description: "Returns information about the JSON Web Key Set (JWKS) used to sign and verify JWTs.",
tags: [],
hidden: true,
},
request: yupObject({}),
response: yupObject({
statusCode: yupNumber().oneOf([200]).defined(),
bodyType: yupString().oneOf(["json"]).defined(),
body: yupObject({
keys: yupArray().defined(),
message: yupString().optional(),
}).defined(),
}),
async handler() {
return {
statusCode: 200,
bodyType: "json",
body: {
...await getPublicJwkSet(getEnvVariable("STACK_SERVER_SECRET")),
message: "This is deprecated. Please disable the legacy JWT signing in the tenancy setting page, and move to /api/v1/projects/<tenancy-id>/.well-known/jwks.json",
}
};
},
});