@websanova/vue-auth
Advanced tools
Comparing version 1.0.5-dev to 1.0.7-dev
@@ -17,3 +17,3 @@ { | ||
"version": "1.0.5-dev", | ||
"version": "1.0.7-dev", | ||
@@ -46,3 +46,3 @@ "repository": { | ||
"replace-webpack-plugin": "0.1.2", | ||
"@websanova/vue-auth": "1.0.5-dev" | ||
"@websanova/vue-auth": "1.0.7-dev" | ||
}, | ||
@@ -49,0 +49,0 @@ |
@@ -22,4 +22,4 @@ # Vue Auth | ||
* vue 1.0.25 | ||
* vue-resource 0.9.1 | ||
* vue 1.0.26 | ||
* vue-resource 1.0.2 | ||
* vue-router 0.7.13 | ||
@@ -26,0 +26,0 @@ |
@@ -289,4 +289,2 @@ var __utils = require('./lib/utils.js'), | ||
query = {}; | ||
// console.log(data); | ||
@@ -313,4 +311,2 @@ if (data.code === true) { | ||
// console.log(data); | ||
data.redirect = data.redirect.call(this); | ||
@@ -415,4 +411,3 @@ | ||
response: function (res, token) { | ||
var token = token.split('Bearer '); | ||
token = token.split('Bearer '); | ||
__token.set.call(this, null, token[token.length > 1 ? 1 : 0]); | ||
@@ -419,0 +414,0 @@ } |
@@ -27,3 +27,3 @@ module.exports = { | ||
return { | ||
authorization: res.headers[this.options.tokenHeader] | ||
authorization: res.headers.get(this.options.tokenHeader) | ||
}; | ||
@@ -34,3 +34,3 @@ }, | ||
if (headers.authorization) { | ||
req.headers[this.options.tokenHeader] = headers.authorization; | ||
req.headers.set(this.options.tokenHeader, headers.authorization); | ||
} | ||
@@ -78,3 +78,3 @@ }, | ||
_invalidToken: function (res) { | ||
if (this.check() && res.status === 401) { | ||
if (res.status === 401) { | ||
this.logout(); | ||
@@ -93,3 +93,3 @@ } | ||
_httpData: function (res) { | ||
return res.json() || {}; | ||
return res.data || {}; | ||
}, | ||
@@ -96,0 +96,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
212896
31
2089