openshift-rest-client
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -5,2 +5,9 @@ # Changelog | ||
### [3.0.1](https://github.com/nodeshift/openshift-rest-client/compare/v3.0.0...v3.0.1) (2019-11-19) | ||
### Bug Fixes | ||
* **auth:** Throw some reasonable error message in basic authentication when we can't obtain an access token. ([#174](https://github.com/nodeshift/openshift-rest-client/issues/174)) ([53614e2](https://github.com/nodeshift/openshift-rest-client/commit/53614e2)) | ||
## [3.0.0](https://github.com/nodeshift/openshift-rest-client/compare/v2.3.0...v3.0.0) (2019-10-30) | ||
@@ -7,0 +14,0 @@ |
@@ -34,7 +34,10 @@ 'use strict'; | ||
const hash = resp.request.uri.hash; | ||
const startIndex = hash.indexOf('=') + 1; | ||
const stopIndex = hash.indexOf('&'); | ||
const accessToken = hash.slice(startIndex, stopIndex); | ||
return resolve(accessToken); | ||
if (hash) { | ||
const startIndex = hash.indexOf('=') + 1; | ||
const stopIndex = hash.indexOf('&'); | ||
const accessToken = hash.slice(startIndex, stopIndex); | ||
return resolve(accessToken); | ||
} else { | ||
return reject(new Error(`Unable to authenticate user ${settings.user} to ${resp.request.uri.host}. Cannot obtain access token from response.`)); | ||
} | ||
}); | ||
@@ -41,0 +44,0 @@ }); |
{ | ||
"name": "openshift-rest-client", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "Node.js client for developing with OpenShift", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
261056
206