@websanova/vue-auth
Advanced tools
Comparing version 1.1.1-beta to 1.2.0-beta
@@ -17,3 +17,3 @@ { | ||
"version": "1.1.1-beta", | ||
"version": "1.2.0-beta", | ||
@@ -27,3 +27,5 @@ "repository": { | ||
"dependencies": {}, | ||
"dependencies": { | ||
"@websanova/vue-auth": "1.2.0-beta" | ||
}, | ||
@@ -46,9 +48,9 @@ "devDependencies": { | ||
"copy-webpack-plugin": "3.0.1", | ||
"replace-webpack-plugin": "0.1.2", | ||
"@websanova/vue-auth": "1.1.1-beta" | ||
"replace-webpack-plugin": "0.1.2" | ||
}, | ||
"scripts": { | ||
"demo": "webpack-dev-server --host=0.0.0.0 --https --port=8000 --content-base=demo/public/ --config=demo/webpack.config.js" | ||
"1.x.demo": "webpack-dev-server --host=0.0.0.0 --https --port=8001 --content-base=1.x.demo/public/ --config=1.x.demo/webpack.config.js", | ||
"2.x.demo": "webpack-dev-server --host=0.0.0.0 --https --port=8002 --content-base=2.x.demo/public/ --config=2.x.demo/webpack.config.js" | ||
} | ||
} |
@@ -98,6 +98,6 @@ var __utils = require('./lib/utils.js'), | ||
if (tokens[i].foundIn === 'header') { | ||
token = this.options._getHeaders.call(this, res)[tokens[i].name]; | ||
token = this.options._getHeaders.call(this, res)[tokens[i].response]; | ||
} | ||
else if (tokens[i].foundIn === 'response') { | ||
token = this.options._httpData.call(this, res)[tokens[i].name]; | ||
token = this.options._httpData.call(this, res)[tokens[i].response]; | ||
} | ||
@@ -340,7 +340,9 @@ | ||
token: [{ | ||
name: 'Authorization', | ||
request: 'Authorization', | ||
response: 'Authorization', | ||
authType: 'bearer', | ||
foundIn: 'header' | ||
}, { | ||
name: 'token', | ||
request: 'token', | ||
response: 'token', | ||
authType: 'bearer', | ||
@@ -350,6 +352,2 @@ foundIn: 'response' | ||
// tokenVar: 'token', | ||
// tokenHeader: 'Authorization', | ||
// authType: 'bearer', | ||
// Variables | ||
@@ -435,3 +433,3 @@ | ||
data[this.options.token[0].name] = 'Bearer ' + token; | ||
data[this.options.token[0].request] = 'Bearer ' + token; | ||
@@ -450,3 +448,3 @@ this.options._setHeaders.call(this, req, data); | ||
data[this.options.token[0].name] = token; | ||
data[this.options.token[0].request] = token; | ||
@@ -453,0 +451,0 @@ this.options._setHeaders.call(this, req, token); |
@@ -78,3 +78,3 @@ module.exports = { | ||
routerBeforeEach.call(_this, function () { | ||
transitionEach.call(_this, (transition.meta || {}).auth || (transition.to || transition).auth, function () { (next || transition.next)(); }); | ||
transitionEach.call(_this, transition.meta ? transition.meta.auth : (transition.to || {}).auth, function () { (next || transition.next)(); }); | ||
}); | ||
@@ -81,0 +81,0 @@ }) |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
360204
16
49
3161
1
3