Skip to content

Commit

Permalink
Clean up #51
Browse files Browse the repository at this point in the history
  • Loading branch information
vlad-ignatov committed Jun 14, 2021
1 parent 101eaca commit 57d4d61
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 134 deletions.
101 changes: 0 additions & 101 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"express": "^4.17.1",
"jsonwebtoken": "^8.5.1",
"jwk-to-pem": "^1.2.6",
"morgan": "^1.10.0",
"node-jose": "^2.0.0",
"pem": "^1.14.4",
"pem-jwk": "^1.5.1",
Expand Down
10 changes: 5 additions & 5 deletions src/ScopeSet.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const config = require("./config");

/**
* This class tries to make it easier and cleaner to work with scopes (mostly by
* using the two major methods - "has" and "matches").
Expand All @@ -24,7 +26,7 @@ class ScopeSet

/**
* Checks if there is a scope that matches by RegExp the given string
* @param {RegExp} scope The pattern to look for
* @param {RegExp} scopeRegExp The pattern to look for
* @returns {Boolean}
*/
matches(scopeRegExp) {
Expand Down Expand Up @@ -90,10 +92,8 @@ class ScopeSet
if (!scopes) {
return config.errors.missing_scope;
}

scopes = scopes.split(/\s+/);

return scopes.find(s => !(

return scopes.split(/\s+/).find(s => !(
/^system\/(\*|[A-Z][a-zA-Z]+)(\.(read|write|\*))?$/.test(s)
)) || "";
}
Expand Down
27 changes: 0 additions & 27 deletions src/smart-auth.js

This file was deleted.

0 comments on commit 57d4d61

Please sign in to comment.