feat: encapsulate identity with better-auth
This commit is contained in:
17
platform/cerbos/cerbos.ts
Normal file
17
platform/cerbos/cerbos.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { HTTP } from "@cerbos/http";
|
||||
import { getEnvironmentVariable } from "@platform/config/environment.ts";
|
||||
import z from "zod";
|
||||
|
||||
export const cerbos = new HTTP(
|
||||
getEnvironmentVariable({
|
||||
key: "CERBOS_URL",
|
||||
type: z.string(),
|
||||
fallback: "http://localhost:3592",
|
||||
}),
|
||||
{
|
||||
adminCredentials: {
|
||||
username: "cerbos",
|
||||
password: "cerbosAdmin",
|
||||
},
|
||||
},
|
||||
);
|
||||
1
platform/cerbos/mod.ts
Normal file
1
platform/cerbos/mod.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from "./cerbos.ts";
|
||||
15
platform/cerbos/package.json
Normal file
15
platform/cerbos/package.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "@platform/auth",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "./mod.ts",
|
||||
"exports": {
|
||||
".": "./mod.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@cerbos/http": "0.23.1",
|
||||
"@platform/logger": "workspace:*",
|
||||
"zod": "4.1.11"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user