@rimelight/auth 0.0.10 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -16,5 +16,5 @@ import { AuthMiddlewareOptions } from "../types.mjs";
|
|
|
16
16
|
* })
|
|
17
17
|
* )
|
|
18
18
|
*/
|
|
19
|
-
export declare const authMiddleware: (options?: AuthMiddlewareOptions) => (c: any, next: () => Promise<any>
|
|
19
|
+
export declare const authMiddleware: (options?: AuthMiddlewareOptions) => (c: any, next: () => Promise<any>) => Promise<any>;
|
|
20
20
|
//#endregion
|
|
@@ -8,13 +8,13 @@ export declare function evaluateAccess(session: UserSessionContext | null | unde
|
|
|
8
8
|
}): boolean;
|
|
9
9
|
export type StatementMap = Record<string, readonly string[]>;
|
|
10
10
|
export interface AccessRole<TStatements extends StatementMap> {
|
|
11
|
-
statements: Partial<{ [K in keyof TStatements]: TStatements[K][number][]; }>;
|
|
11
|
+
statements: Partial<{ [K in keyof TStatements]: (TStatements[K][number] | "*")[]; }>;
|
|
12
12
|
can(statement: string, action: string): boolean;
|
|
13
13
|
}
|
|
14
14
|
export declare class AccessControl<TStatements extends StatementMap> {
|
|
15
15
|
readonly statements: TStatements;
|
|
16
16
|
constructor(statements: TStatements);
|
|
17
|
-
newRole(permissions: Partial<{ [K in keyof TStatements]: TStatements[K][number][]; }>): AccessRole<TStatements>;
|
|
17
|
+
newRole(permissions: Partial<{ [K in keyof TStatements]: (TStatements[K][number] | "*")[]; }>): AccessRole<TStatements>;
|
|
18
18
|
}
|
|
19
19
|
export declare function createAccessControl<const TStatements extends StatementMap>(statements: TStatements): AccessControl<TStatements>;
|
|
20
20
|
export declare const defaultStatements: {
|
package/dist/types.d.mts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rimelight/auth",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Rimelight Entertainment's Universal Authentication & Identity Package",
|
|
6
6
|
"homepage": "https://rimelight.com/docs",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"jose": "6.2.12"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
|
-
"@rimelight/config": "0.0.
|
|
76
|
+
"@rimelight/config": "0.0.18",
|
|
77
77
|
"@types/node": "26.6.1"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
}
|
|
90
90
|
},
|
|
91
91
|
"engines": {
|
|
92
|
-
"node": ">=26.
|
|
92
|
+
"node": ">=26.9.0"
|
|
93
93
|
},
|
|
94
94
|
"scripts": {
|
|
95
95
|
"build": "vp pack",
|