actionhero-oauth2-client
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -46,7 +46,12 @@ var OAuth2 = require('simple-oauth2'); | ||
OAuth2Client.prototype.redirectToLogin = function(connection){ | ||
OAuth2Client.prototype.redirectToLogin = function(connection, username, password){ | ||
var req = connection.rawConnection.req; | ||
var res = connection.rawConnection.res; | ||
var credentials = ''; | ||
if(username && password){ | ||
credentials = '&username=' + username + '&password=' + password; | ||
} | ||
if(!this.redirect_url){ | ||
@@ -57,3 +62,3 @@ this.redirect_url = this.protocol + "://" + req.headers.host + '/api/' + this.action; | ||
//redirect to oauth2 server | ||
res.writeHead(303, {Location: this.getAuthorizationUrl()}); | ||
res.writeHead(307, {Location: this.getAuthorizationUrl() + credentials}); | ||
res.end(); | ||
@@ -60,0 +65,0 @@ }; |
{ | ||
"name": "actionhero-oauth2-client", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "ActionHero OAuth2 Client", | ||
@@ -5,0 +5,0 @@ "keywords": ["actionhero", "oauth2", "client"], |
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
22423
80