@cubejs-backend/native
Advanced tools
Comparing version 0.35.78 to 0.35.79
@@ -93,3 +93,5 @@ export interface BaseMeta { | ||
logger?: (msg: string, params: Record<string, any>) => void; | ||
checkAuth?: (req: unknown, authorization: string) => Promise<void>; | ||
checkAuth?: (req: unknown, authorization: string) => Promise<{ | ||
'security_context'?: unknown; | ||
}>; | ||
queryRewrite?: (query: unknown, ctx: unknown) => Promise<unknown>; | ||
@@ -96,0 +98,0 @@ contextToApiScopes?: () => Promise<string[]>; |
@@ -250,3 +250,9 @@ "use strict"; | ||
const nativeCheckAuth = config.checkAuth; | ||
config.checkAuth = async (req, authorization) => nativeCheckAuth(simplifyExpressRequest(req), authorization); | ||
config.checkAuth = async (req, authorization) => { | ||
const nativeResult = await nativeCheckAuth(simplifyExpressRequest(req), authorization); | ||
const securityContext = nativeResult?.security_context; | ||
return { | ||
...(securityContext ? { security_context: securityContext } : {}) | ||
}; | ||
}; | ||
} | ||
@@ -253,0 +259,0 @@ if (config.extendContext) { |
{ | ||
"name": "@cubejs-backend/native", | ||
"version": "0.35.78", | ||
"version": "0.35.79", | ||
"author": "Cube Dev, Inc.", | ||
@@ -46,3 +46,3 @@ "description": "Native module for Cube.js (binding to Rust codebase)", | ||
"dependencies": { | ||
"@cubejs-backend/cubesql": "^0.35.78", | ||
"@cubejs-backend/cubesql": "^0.35.79", | ||
"@cubejs-backend/shared": "^0.35.67", | ||
@@ -98,3 +98,3 @@ "@cubejs-infra/post-installer": "^0.0.7" | ||
}, | ||
"gitHead": "0959f7d720fde0e95f24eea0ccaec6ed9ff6d845" | ||
"gitHead": "33b138321d8bc65b303a7692dfb07dc8bcb105f0" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
46193
425