(auth: UnauthorizedAuth, protectedResourceMetadataUrl: string)
| 37 | jsonRpcErrorBody(status, code, message); |
| 38 | |
| 39 | export const unauthorized = (auth: UnauthorizedAuth, protectedResourceMetadataUrl: string) => |
| 40 | HttpServerResponse.jsonUnsafe( |
| 41 | { error: "unauthorized" }, |
| 42 | { |
| 43 | status: 401, |
| 44 | headers: { |
| 45 | ...CORS_ALLOW_ORIGIN, |
| 46 | "www-authenticate": bearerChallenge(auth, protectedResourceMetadataUrl), |
| 47 | }, |
| 48 | }, |
| 49 | ); |
no test coverage detected