mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 20:37:21 +00:00
mcp: added auth tests, updated data tests
This commit is contained in:
@@ -72,6 +72,7 @@ export const authConfigSchema = $object(
|
||||
},
|
||||
s.strictObject({
|
||||
type: s.string(),
|
||||
enabled: s.boolean({ default: true }).optional(),
|
||||
config: s.object({}),
|
||||
}),
|
||||
),
|
||||
|
||||
@@ -385,7 +385,11 @@ export class Authenticator<
|
||||
headers = c.headers;
|
||||
} else {
|
||||
is_context = true;
|
||||
headers = c.req.raw.headers;
|
||||
try {
|
||||
headers = c.req.raw.headers;
|
||||
} catch (e) {
|
||||
throw new Exception("Request/Headers/Context is required to resolve auth", 400);
|
||||
}
|
||||
}
|
||||
|
||||
let token: string | undefined;
|
||||
|
||||
Reference in New Issue
Block a user