Skip to content

Commit

Permalink
remove jquery/reqwest httpRequesters
Browse files Browse the repository at this point in the history
  • Loading branch information
aarongranick-okta committed Jan 13, 2020
1 parent 00944d6 commit d716810
Show file tree
Hide file tree
Showing 15 changed files with 7 additions and 198 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

### Breaking Changes

- [#308](https://github.com/okta/okta-auth-js/pull/308) - Removed `jquery` and `reqwest` httpRequesters

### Other

## 2.11.2
Expand Down
40 changes: 1 addition & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,6 @@ var OktaAuth = require('@okta/okta-auth-js');
var authClient = new OktaAuth(/* configOptions */);
```

If you're using a bundler like webpack or browserify, we have implementations for jquery and reqwest included. To use them, import the SDK like this:

```javascript
// reqwest
var OktaAuth = require('@okta/okta-auth-js/reqwest');

// jquery
var OktaAuth = require('@okta/okta-auth-js/jquery');
```

## Usage guide

For an overview of the client's features and authentication flows, check out [our developer docs](https://developer.okta.com/code/javascript/okta_auth_sdk). There, you will learn how to use the Auth SDK on a simple static page to:
Expand Down Expand Up @@ -274,7 +264,7 @@ If the user's browser does not support PKCE, an exception will be thrown. You ca

### `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:
The http request implementation. By default, this is implemented using [cross-fetch](https://github.com/lquixada/cross-fetch). To provide your own request library, implement the following interface:

1. Must accept:
* method (http method)
Expand All @@ -299,34 +289,6 @@ var config = {
}
```

#### `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:

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}',
ajaxRequest: function(method, url, args) {
// args is in the form:
// {
// headers: {
// headerName: headerValue
// },
// data: postBodyData
// }
return Promise.resolve(/* a raw XMLHttpRequest response */);
}
}
```

## API Reference

* [signIn](#signinoptions)
Expand Down
27 changes: 0 additions & 27 deletions THIRD-PARTY-NOTICES
Original file line number Diff line number Diff line change
Expand Up @@ -250,33 +250,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


reqwest
Version (if any): 2.0.5
Brief Description: It's AJAX All over again. Includes support for
xmlHttpRequest, JSONP, CORS, and CommonJS Promises A.
License MIT

Copyright 2015 Dustin Diaz. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Disclaimer and Limitation of Liability

Disclaimer. OKTA AND ITS SUPPLIERS HEREBY DISCLAIM ALL (AND HAVE NOT AUTHORIZED
Expand Down
17 changes: 0 additions & 17 deletions packages/okta-auth-js/jquery/index.js

This file was deleted.

37 changes: 0 additions & 37 deletions packages/okta-auth-js/jquery/jqueryRequest.js

This file was deleted.

2 changes: 1 addition & 1 deletion packages/okta-auth-js/lib/browser/browserIndex.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*
*/

var fetchRequest = require('../../fetch/fetchRequest');
var fetchRequest = require('../fetch/fetchRequest');
var storageUtil = require('./browserStorage');

module.exports = require('./browser')(storageUtil, fetchRequest);
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/okta-auth-js/lib/server/serverIndex.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*
*/

var fetchRequest = require('../../fetch/fetchRequest');
var fetchRequest = require('../fetch/fetchRequest');
var storageUtil = require('./serverStorage');

module.exports = require('./server')(storageUtil, fetchRequest);
15 changes: 0 additions & 15 deletions packages/okta-auth-js/none/index.js

This file was deleted.

2 changes: 0 additions & 2 deletions packages/okta-auth-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"js-cookie": "2.2.0",
"node-cache": "^4.2.0",
"q": "1.4.1",
"reqwest": "2.0.5",
"tiny-emitter": "1.1.0",
"xhr2": "0.1.3"
},
Expand All @@ -49,7 +48,6 @@
"jasmine-ajax": "^4.0.0",
"jest": "^24.9.0",
"jest-junit": "^9.0.0",
"jquery": "3.3.1",
"json-loader": "0.5.4",
"karma": "^4.1.0",
"karma-chrome-launcher": "^2.2.0",
Expand Down
17 changes: 0 additions & 17 deletions packages/okta-auth-js/reqwest/index.js

This file was deleted.

30 changes: 0 additions & 30 deletions packages/okta-auth-js/reqwest/reqwestRequest.js

This file was deleted.

2 changes: 1 addition & 1 deletion packages/okta-auth-js/test/spec/fetch-request.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('fetchRequest', function () {
return mockFetchObj.fetch.apply(null, arguments);
});

var fetchRequest = require('../../fetch/fetchRequest');
var fetchRequest = require('../../lib/fetch/fetchRequest');

beforeEach(function() {
/* global Map */
Expand Down
2 changes: 1 addition & 1 deletion packages/okta-auth-js/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This config builds a minified version that can be imported
* anywhere without any dependencies. It packages the SDK
* with reqwest and Q. It also preserves license comments.
* with cross-fetch and Q. It also preserves license comments.
*/
/* global __dirname */
var path = require('path');
Expand Down
10 changes: 0 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6419,11 +6419,6 @@ jest@24.9.0, jest@^24.9.0:
import-local "^2.0.0"
jest-cli "^24.9.0"

jquery@3.3.1:
version "3.3.1"
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.3.1.tgz#958ce29e81c9790f31be7792df5d4d95fc57fbca"
integrity sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg==

js-cookie@2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/js-cookie/-/js-cookie-2.2.0.tgz#1b2c279a6eece380a12168b92485265b35b1effb"
Expand Down Expand Up @@ -8972,11 +8967,6 @@ requires-port@^1.0.0:
resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff"
integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=

reqwest@2.0.5:
version "2.0.5"
resolved "https://registry.yarnpkg.com/reqwest/-/reqwest-2.0.5.tgz#00fb15ac4918c419ca82b43f24c78882e66039a1"
integrity sha1-APsVrEkYxBnKgrQ/JMeIguZgOaE=

resolve-cwd@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a"
Expand Down

0 comments on commit d716810

Please sign in to comment.