Skip to content

Commit 960e67c

Browse files
committed
Fix auth scheme names
1 parent 168c273 commit 960e67c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/api/components/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,9 @@ export function withRoles<T extends FastifyZodOpenApiSchema>(
195195
schema: T,
196196
{ disableApiKeyAuth }: RolesConfig = { disableApiKeyAuth: false },
197197
): T & RoleSchema {
198-
const security = [{ bearerAuth: [] }] as any;
198+
const security = [{ httpBearer: [] }] as any;
199199
if (!disableApiKeyAuth) {
200-
security.push({ apiKeyAuth: [] });
200+
security.push({ apiKeyHeader: [] });
201201
}
202202
const responses = {
203203
401: notAuthorizedError,

src/api/docs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,14 @@ export const docsHtml = `
138138
`;
139139

140140
export const securitySchemes = {
141-
bearerAuth: {
141+
httpBearer: {
142142
type: "http",
143143
scheme: "bearer",
144144
bearerFormat: "JWT",
145145
description:
146146
"Authorization: Bearer {token}\n\nThis API uses JWT tokens issued by Entra ID (Azure AD) with the Core API audience. Tokens must be included in the Authorization header as a Bearer token for all protected endpoints.",
147147
},
148-
apiKeyAuth: {
148+
apiKeyHeader: {
149149
type: "apiKey",
150150
in: "header",
151151
name: "X-Api-Key",

0 commit comments

Comments
 (0)