Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@websanova/vue-auth

Package Overview
Dependencies
Maintainers
1
Versions
151
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@websanova/vue-auth - npm Package Compare versions

Comparing version 1.0.2-dev to 1.0.4-dev

4

package.json

@@ -17,3 +17,3 @@ {

"version": "1.0.2-dev",
"version": "1.0.4-dev",

@@ -46,3 +46,3 @@ "repository": {

"replace-webpack-plugin": "0.1.2",
"@websanova/vue-auth": "1.0.2-dev"
"@websanova/vue-auth": "1.0.4-dev"
},

@@ -49,0 +49,0 @@

@@ -81,12 +81,3 @@ var __utils = require('./lib/utils.js'),

if (token) {
if (this.options.authType === 'bearer') {
this.options._setHeaders.call(this, req, {
authorization: 'Bearer: ' + token
});
}
else if (this.options.authType === 'basic') {
this.options._setHeaders.call(this, req, {
authorization: token
});
}
this.options[this.options.authType + 'Auth'].request.call(this, req, token);
}

@@ -98,20 +89,8 @@

function _responseIntercept(res) {
var token = '';
var token = this.options._getHeaders.call(this, res).authorization || this.options._httpData.call(this, res)[this.options.tokenVar];
token = this.options._getHeaders.call(this, res).authorization;
if (token) {
token = token.split('Bearer ');
__token.set.call(this, null, token[token.length > 1 ? 1 : 0]);
this.options[this.options.authType + 'Auth'].response.call(this, res, token);
}
token = this.options._httpData.call(this, res)[this.options.tokenVar];
if (token) {
token = token.split('Bearer ');
__token.set.call(this, null, token[token.length > 1 ? 1 : 0]);
}
if (this.options._invalidToken) {

@@ -425,3 +404,29 @@ this.options._invalidToken.call(this, res);

oauth2Perform: _oauth2Perform
oauth2Perform: _oauth2Perform,
// Auth drivers
bearerAuth: {
request: function (req, token) {
this.options._setHeaders.call(this, req, {
authorization: 'Bearer ' + token
});
},
response: function (res, token) {
var token = token.split('Bearer ');
__token.set.call(this, null, token[token.length > 1 ? 1 : 0]);
}
},
basicAuth: {
request: function (req, token) {
this.options._setHeaders.call(this, req, {
authorization: token
});
},
response: function (res, token) {
__token.set.call(this, null, token);
}
}
};

@@ -428,0 +433,0 @@

-_invalidToken needs to be completed...
-test as installed module (with mixbloom ?)...
-reply to the dude
* Compatibility with Vue 2.0.
-reply to jeff guy.
-stack overflow question about modules...
-oauth1
---------------------------------------

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc