@okta/okta-auth-js
Advanced tools
Comparing version 2.3.0 to 2.3.1
# Changelog | ||
## 2.3.1 | ||
### Bug Fixes | ||
- [#187](https://github.com/okta/okta-auth-js/pull/187) - When deprecated `ajaxRequest` was passed to config, the logger for the deprecate message was still using window.console. This fix makes the logger isomorphic. | ||
## 2.3.0 | ||
@@ -4,0 +10,0 @@ |
@@ -12,3 +12,3 @@ module.exports = { | ||
"CACHE_STORAGE_NAME": "okta-cache-storage", | ||
"SDK_VERSION": "2.3.0" | ||
"SDK_VERSION": "2.3.1" | ||
}; |
@@ -202,3 +202,9 @@ /*! | ||
util.getNativeConsole = function() { | ||
return window.console; | ||
if (typeof window !== 'undefined') { | ||
return window.console; | ||
} else if (typeof console !== 'undefined') { | ||
return console; | ||
} else { | ||
return undefined; | ||
} | ||
}; | ||
@@ -205,0 +211,0 @@ |
{ | ||
"name": "@okta/okta-auth-js", | ||
"description": "The Okta Auth SDK", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"homepage": "https://github.com/okta/okta-auth-js", | ||
@@ -68,5 +68,5 @@ "license": "Apache-2.0", | ||
"okta": { | ||
"commitSha": "c31638b905fdc9f77e744ade5bc056dfe6397d8f", | ||
"fullVersion": "2.3.0-20190123214012-c31638b" | ||
"commitSha": "ba985b69f0e3c65d470da65dd1c56bf41313c2f0", | ||
"fullVersion": "2.3.1-20190205005839-ba985b6" | ||
} | ||
} |
@@ -187,4 +187,32 @@ [<img src="https://devforum.okta.com/uploads/oktadev/original/1X/bf54a16b5fda189e4ad2706fb57cbb7a1e5b8deb.png" align="right" width="256px"/>](https://devforum.okta.com/) | ||
### `httpRequestClient` | ||
The http request implementation. By default, this is implemented using [reqwest](https://github.com/ded/reqwest) for browser and [cross-fetch](https://github.com/lquixada/cross-fetch) for server. To provide your own request library, implement the following interface: | ||
1. Must accept: | ||
* method (http method) | ||
* url (target url) | ||
* args (object containing headers and data) | ||
2. Must return a Promise that resolves with a raw XMLHttpRequest response | ||
```javascript | ||
var config = { | ||
url: 'https://{yourOktaDomain}', | ||
httpRequestClient: function(method, url, args) { | ||
// args is in the form: | ||
// { | ||
// headers: { | ||
// headerName: headerValue | ||
// }, | ||
// data: postBodyData | ||
// } | ||
return Promise.resolve(/* a raw XMLHttpRequest response */); | ||
} | ||
} | ||
``` | ||
#### `ajaxRequest` | ||
:warning: This parameter has been *deprecated*, please use [**httpRequestClient**](#httpRequestClient) instead. | ||
The ajax request implementation. By default, this is implemented using [reqwest](https://github.com/ded/reqwest). To provide your own request library, implement the following interface: | ||
@@ -191,0 +219,0 @@ |
Sorry, the diff of this file is too big to display
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
1199399
3066
1725