@travetto/auth 3.1.1 → 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 CHANGED
@@ -127,11 +127,11 @@ const pbkdf2 = util.promisify(crypto.pbkdf2);
127
127
  */
128
128
  export class AuthUtil {
129
129
  /**
130
- * Build matcher for role permissions in allow/deny fashion
130
+ * Build matcher for permissions in allow/deny fashion
131
131
  *
132
- * @param roles Roles to build matcher for
132
+ * @param permissions Permissions to build matcher for
133
133
  */
134
- static roleMatcher(roles: string[]): (perms: Set<string>) => boolean;
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.1",
3
+ "version": "3.1.2",
4
4
  "description": "Authentication scaffolding for the Travetto framework",
5
5
  "keywords": [
6
6
  "authentication",
package/src/util.ts CHANGED
@@ -20,12 +20,12 @@ export class AuthUtil {
20
20
  }
21
21
 
22
22
  /**
23
- * Build matcher for role permissions in allow/deny fashion
23
+ * Build matcher for permissions in allow/deny fashion
24
24
  *
25
- * @param roles Roles to build matcher for
25
+ * @param permissions Permissions to build matcher for
26
26
  */
27
- static roleMatcher(roles: string[]): (perms: Set<string>) => boolean {
28
- return Util.allowDenyMatcher<string[], [Set<string>]>(roles,
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
  );