@travetto/auth 3.1.0 → 3.1.2
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.
- package/README.md +3 -3
- package/package.json +2 -2
- package/src/util.ts +4 -4
package/README.md
CHANGED
|
@@ -127,11 +127,11 @@ const pbkdf2 = util.promisify(crypto.pbkdf2);
|
|
|
127
127
|
*/
|
|
128
128
|
export class AuthUtil {
|
|
129
129
|
/**
|
|
130
|
-
* Build matcher for
|
|
130
|
+
* Build matcher for permissions in allow/deny fashion
|
|
131
131
|
*
|
|
132
|
-
* @param
|
|
132
|
+
* @param permissions Permissions to build matcher for
|
|
133
133
|
*/
|
|
134
|
-
static
|
|
134
|
+
static permissionMatcher(permissions: string[]): (perms: Set<string>) => boolean;
|
|
135
135
|
/**
|
|
136
136
|
* Generate a hash for a given value
|
|
137
137
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/auth",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.2",
|
|
4
4
|
"description": "Authentication scaffolding for the Travetto framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"authentication",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"directory": "module/auth"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@travetto/base": "^3.1.
|
|
26
|
+
"@travetto/base": "^3.1.1"
|
|
27
27
|
},
|
|
28
28
|
"travetto": {
|
|
29
29
|
"displayName": "Authentication"
|
package/src/util.ts
CHANGED
|
@@ -20,12 +20,12 @@ export class AuthUtil {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
* Build matcher for
|
|
23
|
+
* Build matcher for permissions in allow/deny fashion
|
|
24
24
|
*
|
|
25
|
-
* @param
|
|
25
|
+
* @param permissions Permissions to build matcher for
|
|
26
26
|
*/
|
|
27
|
-
static
|
|
28
|
-
return Util.allowDenyMatcher<string[], [Set<string>]>(
|
|
27
|
+
static permissionMatcher(permissions: string[]): (perms: Set<string>) => boolean {
|
|
28
|
+
return Util.allowDenyMatcher<string[], [Set<string>]>(permissions,
|
|
29
29
|
x => x.split('|'),
|
|
30
30
|
this.#matchPermissionSet.bind(this),
|
|
31
31
|
);
|