@evervault/sdk
Advanced tools
Comparing version 0.4.1 to 0.4.2
@@ -74,3 +74,3 @@ /** @format */ | ||
auth: 'https://auth.evervault.com', | ||
api: 'https://api.evervault.com', | ||
api: 'https://dashboard.evervault.com', | ||
}, | ||
@@ -77,0 +77,0 @@ |
{ | ||
"name": "@evervault/sdk", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"description": "evervault Browser SDK", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -283,3 +283,3 @@ /** @format */ | ||
describe('Test the SDK functions that make HTTP requests', function () { | ||
const apiUrl = 'https://api.evervault.com'; | ||
const apiUrl = 'https://dashboard.evervault.com'; | ||
const refreshTokenUrl = `${apiUrl}/token/refresh`; | ||
@@ -286,0 +286,0 @@ |
@@ -31,3 +31,3 @@ /** @format */ | ||
while (padLength--) { | ||
buffer.write("=", position++); | ||
buffer.write('=', position++); | ||
} | ||
@@ -40,4 +40,4 @@ | ||
const reEncodedString = this.padString(b64String) | ||
.replace(/\-/g, "+") | ||
.replace(/_/g, "/"); | ||
.replace(/\-/g, '+') | ||
.replace(/_/g, '/'); | ||
const decodedStr = window.atob(reEncodedString); | ||
@@ -182,3 +182,3 @@ var buf = new ArrayBuffer(decodedStr.length); | ||
static areHashValuesFromAuth(urlValues) { | ||
const authRegex = /^([A-Za-z0-9-_])+:((eyJ){1}[A-Za-z0-9-_]+\.(eyJ){1}[A-Za-z0-9-_]+\.[A-Za-z0-9-_.+\/=]*){1}:([a-z]+-[a-z]+-[0-9]{6,8}.[a-f0-9]{8}-[a-f0-9]{3,4}-[a-f0-9]{3,4}-[a-f0-9]{3,4}-[a-f0-9]{12}){1}$/; | ||
const authRegex = /^[A-Za-z0-9-_]+:((eyJ){1}[A-Za-z0-9-_]+\.(eyJ){1}[A-Za-z0-9-_]+\.[A-Za-z0-9-_.+\/=]*){1}:[a-z]+-[a-z]+-[0-9]{6,8}(@mail.evervault.com)?\.[a-f0-9]{8}-[a-f0-9]{3,4}-[a-f0-9]{3,4}-[a-f0-9]{3,4}-[a-f0-9]{12}$/; | ||
return authRegex.test(urlValues); | ||
@@ -185,0 +185,0 @@ } |
62826