├── LICENSE
├── README.md
├── authorization
├── .gitignore
├── authorization_code
│ ├── README.md
│ ├── app.js
│ ├── package-lock.json
│ ├── package.json
│ └── public
│ │ └── index.html
├── authorization_code_pkce
│ ├── README.md
│ ├── package-lock.json
│ ├── package.json
│ └── public
│ │ ├── app.js
│ │ ├── index.html
│ │ └── style.css
├── catalog-info.yaml
├── client_credentials
│ ├── README.md
│ └── app.js
└── implicit_grant
│ ├── README.md
│ ├── app.js
│ ├── package-lock.json
│ ├── package.json
│ └── public
│ └── index.html
├── catalog-info.yaml
└── get_user_profile
├── .gitignore
├── README.md
├── index.html
├── package-lock.json
├── package.json
├── src
├── authCodeWithPkce.ts
├── script.ts
└── types.d.ts
└── tsconfig.json
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright 2012-2016 Spotify AB
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Spotify Web API Examples
2 |
3 | ## Contents
4 |
5 | - Authorization examples
6 | - [Authorization Code]( /authorization/authorization_code/)
7 | - [Authorization Code with PKCE extension]( /authorization/authorization_code_pkce/)
8 | - [Client Credentials](/authorization/client_credentials)
9 | - [Implicit Grant](/authorization/implicit_grant/)
10 | - [Get User Profile example](/get_user_profile/)
11 |
--------------------------------------------------------------------------------
/authorization/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 |
--------------------------------------------------------------------------------
/authorization/authorization_code/README.md:
--------------------------------------------------------------------------------
1 | # Spotify Authorization Code example
2 |
3 | This app displays your Spotify profile information using [Authorization Code](https://developer.spotify.com/documentation/web-api/tutorials/code-flow)
4 | to grant permissions to the app.
5 |
6 | ## Installation
7 |
8 | This example runs on Node.js. On [its website](http://www.nodejs.org/download/) you can find instructions on how to install it.
9 |
10 | Install the app dependencies running:
11 |
12 | $ npm install
13 |
14 | ## Using your own credentials
15 |
16 | You will need to register your app and get your own credentials from the [Spotify for Developers Dashboard](https://developer.spotify.com/dashboard).
17 |
18 | - Create a new app in the dashboard and add `http://localhost:8888/callback` to the app's redirect URL list.
19 | - Once you have created your app, update the `client_id`, `redirect_uri`, and `client_secret` in the `app.js` file with the credentials obtained from the app settings in the dashboard.
20 |
21 | ## Running the example
22 |
23 | From a console shell:
24 |
25 | $ npm start
26 |
27 | Then, open `http://localhost:8888` in a browser.
28 |
--------------------------------------------------------------------------------
/authorization/authorization_code/app.js:
--------------------------------------------------------------------------------
1 | /**
2 | * This is an example of a basic node.js script that performs
3 | * the Authorization Code oAuth2 flow to authenticate against
4 | * the Spotify Accounts.
5 | *
6 | * For more information, read
7 | * https://developer.spotify.com/documentation/web-api/tutorials/code-flow
8 | */
9 |
10 | var express = require('express');
11 | var request = require('request');
12 | var crypto = require('crypto');
13 | var cors = require('cors');
14 | var querystring = require('querystring');
15 | var cookieParser = require('cookie-parser');
16 |
17 | var client_id = 'yourClientIDGoesHere'; // your clientId
18 | var client_secret = 'YourSecretIDGoesHere'; // Your secret
19 | var redirect_uri = 'http://localhost:8888/callback'; // Your redirect uri
20 |
21 |
22 | const generateRandomString = (length) => {
23 | return crypto
24 | .randomBytes(60)
25 | .toString('hex')
26 | .slice(0, length);
27 | }
28 |
29 | var stateKey = 'spotify_auth_state';
30 |
31 | var app = express();
32 |
33 | app.use(express.static(__dirname + '/public'))
34 | .use(cors())
35 | .use(cookieParser());
36 |
37 | app.get('/login', function(req, res) {
38 |
39 | var state = generateRandomString(16);
40 | res.cookie(stateKey, state);
41 |
42 | // your application requests authorization
43 | var scope = 'user-read-private user-read-email';
44 | res.redirect('https://accounts.spotify.com/authorize?' +
45 | querystring.stringify({
46 | response_type: 'code',
47 | client_id: client_id,
48 | scope: scope,
49 | redirect_uri: redirect_uri,
50 | state: state
51 | }));
52 | });
53 |
54 | app.get('/callback', function(req, res) {
55 |
56 | // your application requests refresh and access tokens
57 | // after checking the state parameter
58 |
59 | var code = req.query.code || null;
60 | var state = req.query.state || null;
61 | var storedState = req.cookies ? req.cookies[stateKey] : null;
62 |
63 | if (state === null || state !== storedState) {
64 | res.redirect('/#' +
65 | querystring.stringify({
66 | error: 'state_mismatch'
67 | }));
68 | } else {
69 | res.clearCookie(stateKey);
70 | var authOptions = {
71 | url: 'https://accounts.spotify.com/api/token',
72 | form: {
73 | code: code,
74 | redirect_uri: redirect_uri,
75 | grant_type: 'authorization_code'
76 | },
77 | headers: {
78 | 'content-type': 'application/x-www-form-urlencoded',
79 | Authorization: 'Basic ' + (new Buffer.from(client_id + ':' + client_secret).toString('base64'))
80 | },
81 | json: true
82 | };
83 |
84 | request.post(authOptions, function(error, response, body) {
85 | if (!error && response.statusCode === 200) {
86 |
87 | var access_token = body.access_token,
88 | refresh_token = body.refresh_token;
89 |
90 | var options = {
91 | url: 'https://api.spotify.com/v1/me',
92 | headers: { 'Authorization': 'Bearer ' + access_token },
93 | json: true
94 | };
95 |
96 | // use the access token to access the Spotify Web API
97 | request.get(options, function(error, response, body) {
98 | console.log(body);
99 | });
100 |
101 | // we can also pass the token to the browser to make requests from there
102 | res.redirect('/#' +
103 | querystring.stringify({
104 | access_token: access_token,
105 | refresh_token: refresh_token
106 | }));
107 | } else {
108 | res.redirect('/#' +
109 | querystring.stringify({
110 | error: 'invalid_token'
111 | }));
112 | }
113 | });
114 | }
115 | });
116 |
117 | app.get('/refresh_token', function(req, res) {
118 |
119 | var refresh_token = req.query.refresh_token;
120 | var authOptions = {
121 | url: 'https://accounts.spotify.com/api/token',
122 | headers: {
123 | 'content-type': 'application/x-www-form-urlencoded',
124 | 'Authorization': 'Basic ' + (new Buffer.from(client_id + ':' + client_secret).toString('base64'))
125 | },
126 | form: {
127 | grant_type: 'refresh_token',
128 | refresh_token: refresh_token
129 | },
130 | json: true
131 | };
132 |
133 | request.post(authOptions, function(error, response, body) {
134 | if (!error && response.statusCode === 200) {
135 | var access_token = body.access_token,
136 | refresh_token = body.refresh_token;
137 | res.send({
138 | 'access_token': access_token,
139 | 'refresh_token': refresh_token
140 | });
141 | }
142 | });
143 | });
144 |
145 | console.log('Listening on 8888');
146 | app.listen(8888);
147 |
--------------------------------------------------------------------------------
/authorization/authorization_code/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "spotify-authorization-code-example",
3 | "version": "0.0.2",
4 | "lockfileVersion": 3,
5 | "requires": true,
6 | "packages": {
7 | "": {
8 | "name": "spotify-authorization-code-example",
9 | "version": "0.0.2",
10 | "dependencies": {
11 | "cookie-parser": "1.4.6",
12 | "cors": "2.8.5",
13 | "express": "4.18.2",
14 | "querystring": "~0.2.0",
15 | "request": "2.88.2"
16 | }
17 | },
18 | "node_modules/accepts": {
19 | "version": "1.3.8",
20 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
21 | "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
22 | "dependencies": {
23 | "mime-types": "~2.1.34",
24 | "negotiator": "0.6.3"
25 | },
26 | "engines": {
27 | "node": ">= 0.6"
28 | }
29 | },
30 | "node_modules/ajv": {
31 | "version": "6.12.6",
32 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
33 | "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
34 | "dependencies": {
35 | "fast-deep-equal": "^3.1.1",
36 | "fast-json-stable-stringify": "^2.0.0",
37 | "json-schema-traverse": "^0.4.1",
38 | "uri-js": "^4.2.2"
39 | },
40 | "funding": {
41 | "type": "github",
42 | "url": "https://github.com/sponsors/epoberezkin"
43 | }
44 | },
45 | "node_modules/array-flatten": {
46 | "version": "1.1.1",
47 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
48 | "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg=="
49 | },
50 | "node_modules/asn1": {
51 | "version": "0.2.6",
52 | "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz",
53 | "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==",
54 | "dependencies": {
55 | "safer-buffer": "~2.1.0"
56 | }
57 | },
58 | "node_modules/assert-plus": {
59 | "version": "1.0.0",
60 | "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
61 | "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==",
62 | "engines": {
63 | "node": ">=0.8"
64 | }
65 | },
66 | "node_modules/asynckit": {
67 | "version": "0.4.0",
68 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
69 | "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
70 | },
71 | "node_modules/aws-sign2": {
72 | "version": "0.7.0",
73 | "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
74 | "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==",
75 | "engines": {
76 | "node": "*"
77 | }
78 | },
79 | "node_modules/aws4": {
80 | "version": "1.12.0",
81 | "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz",
82 | "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg=="
83 | },
84 | "node_modules/bcrypt-pbkdf": {
85 | "version": "1.0.2",
86 | "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
87 | "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==",
88 | "dependencies": {
89 | "tweetnacl": "^0.14.3"
90 | }
91 | },
92 | "node_modules/body-parser": {
93 | "version": "1.20.1",
94 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz",
95 | "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==",
96 | "dependencies": {
97 | "bytes": "3.1.2",
98 | "content-type": "~1.0.4",
99 | "debug": "2.6.9",
100 | "depd": "2.0.0",
101 | "destroy": "1.2.0",
102 | "http-errors": "2.0.0",
103 | "iconv-lite": "0.4.24",
104 | "on-finished": "2.4.1",
105 | "qs": "6.11.0",
106 | "raw-body": "2.5.1",
107 | "type-is": "~1.6.18",
108 | "unpipe": "1.0.0"
109 | },
110 | "engines": {
111 | "node": ">= 0.8",
112 | "npm": "1.2.8000 || >= 1.4.16"
113 | }
114 | },
115 | "node_modules/body-parser/node_modules/qs": {
116 | "version": "6.11.0",
117 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
118 | "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
119 | "dependencies": {
120 | "side-channel": "^1.0.4"
121 | },
122 | "engines": {
123 | "node": ">=0.6"
124 | },
125 | "funding": {
126 | "url": "https://github.com/sponsors/ljharb"
127 | }
128 | },
129 | "node_modules/bytes": {
130 | "version": "3.1.2",
131 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
132 | "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
133 | "engines": {
134 | "node": ">= 0.8"
135 | }
136 | },
137 | "node_modules/call-bind": {
138 | "version": "1.0.5",
139 | "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz",
140 | "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==",
141 | "dependencies": {
142 | "function-bind": "^1.1.2",
143 | "get-intrinsic": "^1.2.1",
144 | "set-function-length": "^1.1.1"
145 | },
146 | "funding": {
147 | "url": "https://github.com/sponsors/ljharb"
148 | }
149 | },
150 | "node_modules/caseless": {
151 | "version": "0.12.0",
152 | "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
153 | "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw=="
154 | },
155 | "node_modules/combined-stream": {
156 | "version": "1.0.8",
157 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
158 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
159 | "dependencies": {
160 | "delayed-stream": "~1.0.0"
161 | },
162 | "engines": {
163 | "node": ">= 0.8"
164 | }
165 | },
166 | "node_modules/content-disposition": {
167 | "version": "0.5.4",
168 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
169 | "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
170 | "dependencies": {
171 | "safe-buffer": "5.2.1"
172 | },
173 | "engines": {
174 | "node": ">= 0.6"
175 | }
176 | },
177 | "node_modules/content-type": {
178 | "version": "1.0.5",
179 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
180 | "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
181 | "engines": {
182 | "node": ">= 0.6"
183 | }
184 | },
185 | "node_modules/cookie": {
186 | "version": "0.4.1",
187 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz",
188 | "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==",
189 | "engines": {
190 | "node": ">= 0.6"
191 | }
192 | },
193 | "node_modules/cookie-parser": {
194 | "version": "1.4.6",
195 | "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.6.tgz",
196 | "integrity": "sha512-z3IzaNjdwUC2olLIB5/ITd0/setiaFMLYiZJle7xg5Fe9KWAceil7xszYfHHBtDFYLSgJduS2Ty0P1uJdPDJeA==",
197 | "dependencies": {
198 | "cookie": "0.4.1",
199 | "cookie-signature": "1.0.6"
200 | },
201 | "engines": {
202 | "node": ">= 0.8.0"
203 | }
204 | },
205 | "node_modules/cookie-signature": {
206 | "version": "1.0.6",
207 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
208 | "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ=="
209 | },
210 | "node_modules/core-util-is": {
211 | "version": "1.0.2",
212 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
213 | "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ=="
214 | },
215 | "node_modules/cors": {
216 | "version": "2.8.5",
217 | "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
218 | "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
219 | "dependencies": {
220 | "object-assign": "^4",
221 | "vary": "^1"
222 | },
223 | "engines": {
224 | "node": ">= 0.10"
225 | }
226 | },
227 | "node_modules/dashdash": {
228 | "version": "1.14.1",
229 | "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
230 | "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==",
231 | "dependencies": {
232 | "assert-plus": "^1.0.0"
233 | },
234 | "engines": {
235 | "node": ">=0.10"
236 | }
237 | },
238 | "node_modules/debug": {
239 | "version": "2.6.9",
240 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
241 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
242 | "dependencies": {
243 | "ms": "2.0.0"
244 | }
245 | },
246 | "node_modules/define-data-property": {
247 | "version": "1.1.1",
248 | "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz",
249 | "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==",
250 | "dependencies": {
251 | "get-intrinsic": "^1.2.1",
252 | "gopd": "^1.0.1",
253 | "has-property-descriptors": "^1.0.0"
254 | },
255 | "engines": {
256 | "node": ">= 0.4"
257 | }
258 | },
259 | "node_modules/delayed-stream": {
260 | "version": "1.0.0",
261 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
262 | "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
263 | "engines": {
264 | "node": ">=0.4.0"
265 | }
266 | },
267 | "node_modules/depd": {
268 | "version": "2.0.0",
269 | "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
270 | "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
271 | "engines": {
272 | "node": ">= 0.8"
273 | }
274 | },
275 | "node_modules/destroy": {
276 | "version": "1.2.0",
277 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
278 | "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
279 | "engines": {
280 | "node": ">= 0.8",
281 | "npm": "1.2.8000 || >= 1.4.16"
282 | }
283 | },
284 | "node_modules/ecc-jsbn": {
285 | "version": "0.1.2",
286 | "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
287 | "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==",
288 | "dependencies": {
289 | "jsbn": "~0.1.0",
290 | "safer-buffer": "^2.1.0"
291 | }
292 | },
293 | "node_modules/ee-first": {
294 | "version": "1.1.1",
295 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
296 | "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
297 | },
298 | "node_modules/encodeurl": {
299 | "version": "1.0.2",
300 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
301 | "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
302 | "engines": {
303 | "node": ">= 0.8"
304 | }
305 | },
306 | "node_modules/escape-html": {
307 | "version": "1.0.3",
308 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
309 | "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
310 | },
311 | "node_modules/etag": {
312 | "version": "1.8.1",
313 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
314 | "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
315 | "engines": {
316 | "node": ">= 0.6"
317 | }
318 | },
319 | "node_modules/express": {
320 | "version": "4.18.2",
321 | "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz",
322 | "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==",
323 | "dependencies": {
324 | "accepts": "~1.3.8",
325 | "array-flatten": "1.1.1",
326 | "body-parser": "1.20.1",
327 | "content-disposition": "0.5.4",
328 | "content-type": "~1.0.4",
329 | "cookie": "0.5.0",
330 | "cookie-signature": "1.0.6",
331 | "debug": "2.6.9",
332 | "depd": "2.0.0",
333 | "encodeurl": "~1.0.2",
334 | "escape-html": "~1.0.3",
335 | "etag": "~1.8.1",
336 | "finalhandler": "1.2.0",
337 | "fresh": "0.5.2",
338 | "http-errors": "2.0.0",
339 | "merge-descriptors": "1.0.1",
340 | "methods": "~1.1.2",
341 | "on-finished": "2.4.1",
342 | "parseurl": "~1.3.3",
343 | "path-to-regexp": "0.1.7",
344 | "proxy-addr": "~2.0.7",
345 | "qs": "6.11.0",
346 | "range-parser": "~1.2.1",
347 | "safe-buffer": "5.2.1",
348 | "send": "0.18.0",
349 | "serve-static": "1.15.0",
350 | "setprototypeof": "1.2.0",
351 | "statuses": "2.0.1",
352 | "type-is": "~1.6.18",
353 | "utils-merge": "1.0.1",
354 | "vary": "~1.1.2"
355 | },
356 | "engines": {
357 | "node": ">= 0.10.0"
358 | }
359 | },
360 | "node_modules/express/node_modules/cookie": {
361 | "version": "0.5.0",
362 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz",
363 | "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==",
364 | "engines": {
365 | "node": ">= 0.6"
366 | }
367 | },
368 | "node_modules/express/node_modules/qs": {
369 | "version": "6.11.0",
370 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
371 | "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
372 | "dependencies": {
373 | "side-channel": "^1.0.4"
374 | },
375 | "engines": {
376 | "node": ">=0.6"
377 | },
378 | "funding": {
379 | "url": "https://github.com/sponsors/ljharb"
380 | }
381 | },
382 | "node_modules/extend": {
383 | "version": "3.0.2",
384 | "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
385 | "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
386 | },
387 | "node_modules/extsprintf": {
388 | "version": "1.3.0",
389 | "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
390 | "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==",
391 | "engines": [
392 | "node >=0.6.0"
393 | ]
394 | },
395 | "node_modules/fast-deep-equal": {
396 | "version": "3.1.3",
397 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
398 | "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
399 | },
400 | "node_modules/fast-json-stable-stringify": {
401 | "version": "2.1.0",
402 | "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
403 | "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="
404 | },
405 | "node_modules/finalhandler": {
406 | "version": "1.2.0",
407 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz",
408 | "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==",
409 | "dependencies": {
410 | "debug": "2.6.9",
411 | "encodeurl": "~1.0.2",
412 | "escape-html": "~1.0.3",
413 | "on-finished": "2.4.1",
414 | "parseurl": "~1.3.3",
415 | "statuses": "2.0.1",
416 | "unpipe": "~1.0.0"
417 | },
418 | "engines": {
419 | "node": ">= 0.8"
420 | }
421 | },
422 | "node_modules/forever-agent": {
423 | "version": "0.6.1",
424 | "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
425 | "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==",
426 | "engines": {
427 | "node": "*"
428 | }
429 | },
430 | "node_modules/form-data": {
431 | "version": "2.3.3",
432 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
433 | "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
434 | "dependencies": {
435 | "asynckit": "^0.4.0",
436 | "combined-stream": "^1.0.6",
437 | "mime-types": "^2.1.12"
438 | },
439 | "engines": {
440 | "node": ">= 0.12"
441 | }
442 | },
443 | "node_modules/forwarded": {
444 | "version": "0.2.0",
445 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
446 | "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
447 | "engines": {
448 | "node": ">= 0.6"
449 | }
450 | },
451 | "node_modules/fresh": {
452 | "version": "0.5.2",
453 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
454 | "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
455 | "engines": {
456 | "node": ">= 0.6"
457 | }
458 | },
459 | "node_modules/function-bind": {
460 | "version": "1.1.2",
461 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
462 | "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
463 | "funding": {
464 | "url": "https://github.com/sponsors/ljharb"
465 | }
466 | },
467 | "node_modules/get-intrinsic": {
468 | "version": "1.2.1",
469 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz",
470 | "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==",
471 | "dependencies": {
472 | "function-bind": "^1.1.1",
473 | "has": "^1.0.3",
474 | "has-proto": "^1.0.1",
475 | "has-symbols": "^1.0.3"
476 | },
477 | "funding": {
478 | "url": "https://github.com/sponsors/ljharb"
479 | }
480 | },
481 | "node_modules/getpass": {
482 | "version": "0.1.7",
483 | "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
484 | "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==",
485 | "dependencies": {
486 | "assert-plus": "^1.0.0"
487 | }
488 | },
489 | "node_modules/gopd": {
490 | "version": "1.0.1",
491 | "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
492 | "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",
493 | "dependencies": {
494 | "get-intrinsic": "^1.1.3"
495 | },
496 | "funding": {
497 | "url": "https://github.com/sponsors/ljharb"
498 | }
499 | },
500 | "node_modules/har-schema": {
501 | "version": "2.0.0",
502 | "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
503 | "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==",
504 | "engines": {
505 | "node": ">=4"
506 | }
507 | },
508 | "node_modules/har-validator": {
509 | "version": "5.1.5",
510 | "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz",
511 | "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==",
512 | "deprecated": "this library is no longer supported",
513 | "dependencies": {
514 | "ajv": "^6.12.3",
515 | "har-schema": "^2.0.0"
516 | },
517 | "engines": {
518 | "node": ">=6"
519 | }
520 | },
521 | "node_modules/has": {
522 | "version": "1.0.4",
523 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz",
524 | "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==",
525 | "engines": {
526 | "node": ">= 0.4.0"
527 | }
528 | },
529 | "node_modules/has-property-descriptors": {
530 | "version": "1.0.0",
531 | "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz",
532 | "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==",
533 | "dependencies": {
534 | "get-intrinsic": "^1.1.1"
535 | },
536 | "funding": {
537 | "url": "https://github.com/sponsors/ljharb"
538 | }
539 | },
540 | "node_modules/has-proto": {
541 | "version": "1.0.1",
542 | "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz",
543 | "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==",
544 | "engines": {
545 | "node": ">= 0.4"
546 | },
547 | "funding": {
548 | "url": "https://github.com/sponsors/ljharb"
549 | }
550 | },
551 | "node_modules/has-symbols": {
552 | "version": "1.0.3",
553 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
554 | "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
555 | "engines": {
556 | "node": ">= 0.4"
557 | },
558 | "funding": {
559 | "url": "https://github.com/sponsors/ljharb"
560 | }
561 | },
562 | "node_modules/http-errors": {
563 | "version": "2.0.0",
564 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
565 | "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
566 | "dependencies": {
567 | "depd": "2.0.0",
568 | "inherits": "2.0.4",
569 | "setprototypeof": "1.2.0",
570 | "statuses": "2.0.1",
571 | "toidentifier": "1.0.1"
572 | },
573 | "engines": {
574 | "node": ">= 0.8"
575 | }
576 | },
577 | "node_modules/http-signature": {
578 | "version": "1.2.0",
579 | "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
580 | "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==",
581 | "dependencies": {
582 | "assert-plus": "^1.0.0",
583 | "jsprim": "^1.2.2",
584 | "sshpk": "^1.7.0"
585 | },
586 | "engines": {
587 | "node": ">=0.8",
588 | "npm": ">=1.3.7"
589 | }
590 | },
591 | "node_modules/iconv-lite": {
592 | "version": "0.4.24",
593 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
594 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
595 | "dependencies": {
596 | "safer-buffer": ">= 2.1.2 < 3"
597 | },
598 | "engines": {
599 | "node": ">=0.10.0"
600 | }
601 | },
602 | "node_modules/inherits": {
603 | "version": "2.0.4",
604 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
605 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
606 | },
607 | "node_modules/ipaddr.js": {
608 | "version": "1.9.1",
609 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
610 | "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
611 | "engines": {
612 | "node": ">= 0.10"
613 | }
614 | },
615 | "node_modules/is-typedarray": {
616 | "version": "1.0.0",
617 | "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
618 | "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA=="
619 | },
620 | "node_modules/isstream": {
621 | "version": "0.1.2",
622 | "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
623 | "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g=="
624 | },
625 | "node_modules/jsbn": {
626 | "version": "0.1.1",
627 | "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
628 | "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg=="
629 | },
630 | "node_modules/json-schema": {
631 | "version": "0.4.0",
632 | "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz",
633 | "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA=="
634 | },
635 | "node_modules/json-schema-traverse": {
636 | "version": "0.4.1",
637 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
638 | "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="
639 | },
640 | "node_modules/json-stringify-safe": {
641 | "version": "5.0.1",
642 | "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
643 | "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA=="
644 | },
645 | "node_modules/jsprim": {
646 | "version": "1.4.2",
647 | "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz",
648 | "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==",
649 | "dependencies": {
650 | "assert-plus": "1.0.0",
651 | "extsprintf": "1.3.0",
652 | "json-schema": "0.4.0",
653 | "verror": "1.10.0"
654 | },
655 | "engines": {
656 | "node": ">=0.6.0"
657 | }
658 | },
659 | "node_modules/media-typer": {
660 | "version": "0.3.0",
661 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
662 | "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
663 | "engines": {
664 | "node": ">= 0.6"
665 | }
666 | },
667 | "node_modules/merge-descriptors": {
668 | "version": "1.0.1",
669 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
670 | "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w=="
671 | },
672 | "node_modules/methods": {
673 | "version": "1.1.2",
674 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
675 | "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
676 | "engines": {
677 | "node": ">= 0.6"
678 | }
679 | },
680 | "node_modules/mime": {
681 | "version": "1.6.0",
682 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
683 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
684 | "bin": {
685 | "mime": "cli.js"
686 | },
687 | "engines": {
688 | "node": ">=4"
689 | }
690 | },
691 | "node_modules/mime-db": {
692 | "version": "1.52.0",
693 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
694 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
695 | "engines": {
696 | "node": ">= 0.6"
697 | }
698 | },
699 | "node_modules/mime-types": {
700 | "version": "2.1.35",
701 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
702 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
703 | "dependencies": {
704 | "mime-db": "1.52.0"
705 | },
706 | "engines": {
707 | "node": ">= 0.6"
708 | }
709 | },
710 | "node_modules/ms": {
711 | "version": "2.0.0",
712 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
713 | "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
714 | },
715 | "node_modules/negotiator": {
716 | "version": "0.6.3",
717 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
718 | "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
719 | "engines": {
720 | "node": ">= 0.6"
721 | }
722 | },
723 | "node_modules/oauth-sign": {
724 | "version": "0.9.0",
725 | "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
726 | "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==",
727 | "engines": {
728 | "node": "*"
729 | }
730 | },
731 | "node_modules/object-assign": {
732 | "version": "4.1.1",
733 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
734 | "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
735 | "engines": {
736 | "node": ">=0.10.0"
737 | }
738 | },
739 | "node_modules/object-inspect": {
740 | "version": "1.13.1",
741 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz",
742 | "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==",
743 | "funding": {
744 | "url": "https://github.com/sponsors/ljharb"
745 | }
746 | },
747 | "node_modules/on-finished": {
748 | "version": "2.4.1",
749 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
750 | "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
751 | "dependencies": {
752 | "ee-first": "1.1.1"
753 | },
754 | "engines": {
755 | "node": ">= 0.8"
756 | }
757 | },
758 | "node_modules/parseurl": {
759 | "version": "1.3.3",
760 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
761 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
762 | "engines": {
763 | "node": ">= 0.8"
764 | }
765 | },
766 | "node_modules/path-to-regexp": {
767 | "version": "0.1.7",
768 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
769 | "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ=="
770 | },
771 | "node_modules/performance-now": {
772 | "version": "2.1.0",
773 | "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
774 | "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow=="
775 | },
776 | "node_modules/proxy-addr": {
777 | "version": "2.0.7",
778 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
779 | "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
780 | "dependencies": {
781 | "forwarded": "0.2.0",
782 | "ipaddr.js": "1.9.1"
783 | },
784 | "engines": {
785 | "node": ">= 0.10"
786 | }
787 | },
788 | "node_modules/psl": {
789 | "version": "1.9.0",
790 | "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz",
791 | "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag=="
792 | },
793 | "node_modules/punycode": {
794 | "version": "2.3.0",
795 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz",
796 | "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==",
797 | "engines": {
798 | "node": ">=6"
799 | }
800 | },
801 | "node_modules/qs": {
802 | "version": "6.5.2",
803 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
804 | "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",
805 | "engines": {
806 | "node": ">=0.6"
807 | }
808 | },
809 | "node_modules/querystring": {
810 | "version": "0.2.1",
811 | "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.1.tgz",
812 | "integrity": "sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg==",
813 | "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.",
814 | "engines": {
815 | "node": ">=0.4.x"
816 | }
817 | },
818 | "node_modules/range-parser": {
819 | "version": "1.2.1",
820 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
821 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
822 | "engines": {
823 | "node": ">= 0.6"
824 | }
825 | },
826 | "node_modules/raw-body": {
827 | "version": "2.5.1",
828 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz",
829 | "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==",
830 | "dependencies": {
831 | "bytes": "3.1.2",
832 | "http-errors": "2.0.0",
833 | "iconv-lite": "0.4.24",
834 | "unpipe": "1.0.0"
835 | },
836 | "engines": {
837 | "node": ">= 0.8"
838 | }
839 | },
840 | "node_modules/request": {
841 | "version": "2.88.2",
842 | "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz",
843 | "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==",
844 | "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142",
845 | "dependencies": {
846 | "aws-sign2": "~0.7.0",
847 | "aws4": "^1.8.0",
848 | "caseless": "~0.12.0",
849 | "combined-stream": "~1.0.6",
850 | "extend": "~3.0.2",
851 | "forever-agent": "~0.6.1",
852 | "form-data": "~2.3.2",
853 | "har-validator": "~5.1.3",
854 | "http-signature": "~1.2.0",
855 | "is-typedarray": "~1.0.0",
856 | "isstream": "~0.1.2",
857 | "json-stringify-safe": "~5.0.1",
858 | "mime-types": "~2.1.19",
859 | "oauth-sign": "~0.9.0",
860 | "performance-now": "^2.1.0",
861 | "qs": "~6.5.2",
862 | "safe-buffer": "^5.1.2",
863 | "tough-cookie": "~2.5.0",
864 | "tunnel-agent": "^0.6.0",
865 | "uuid": "^3.3.2"
866 | },
867 | "engines": {
868 | "node": ">= 6"
869 | }
870 | },
871 | "node_modules/safe-buffer": {
872 | "version": "5.2.1",
873 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
874 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
875 | "funding": [
876 | {
877 | "type": "github",
878 | "url": "https://github.com/sponsors/feross"
879 | },
880 | {
881 | "type": "patreon",
882 | "url": "https://www.patreon.com/feross"
883 | },
884 | {
885 | "type": "consulting",
886 | "url": "https://feross.org/support"
887 | }
888 | ]
889 | },
890 | "node_modules/safer-buffer": {
891 | "version": "2.1.2",
892 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
893 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
894 | },
895 | "node_modules/send": {
896 | "version": "0.18.0",
897 | "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz",
898 | "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==",
899 | "dependencies": {
900 | "debug": "2.6.9",
901 | "depd": "2.0.0",
902 | "destroy": "1.2.0",
903 | "encodeurl": "~1.0.2",
904 | "escape-html": "~1.0.3",
905 | "etag": "~1.8.1",
906 | "fresh": "0.5.2",
907 | "http-errors": "2.0.0",
908 | "mime": "1.6.0",
909 | "ms": "2.1.3",
910 | "on-finished": "2.4.1",
911 | "range-parser": "~1.2.1",
912 | "statuses": "2.0.1"
913 | },
914 | "engines": {
915 | "node": ">= 0.8.0"
916 | }
917 | },
918 | "node_modules/send/node_modules/ms": {
919 | "version": "2.1.3",
920 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
921 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
922 | },
923 | "node_modules/serve-static": {
924 | "version": "1.15.0",
925 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz",
926 | "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==",
927 | "dependencies": {
928 | "encodeurl": "~1.0.2",
929 | "escape-html": "~1.0.3",
930 | "parseurl": "~1.3.3",
931 | "send": "0.18.0"
932 | },
933 | "engines": {
934 | "node": ">= 0.8.0"
935 | }
936 | },
937 | "node_modules/set-function-length": {
938 | "version": "1.1.1",
939 | "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz",
940 | "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==",
941 | "dependencies": {
942 | "define-data-property": "^1.1.1",
943 | "get-intrinsic": "^1.2.1",
944 | "gopd": "^1.0.1",
945 | "has-property-descriptors": "^1.0.0"
946 | },
947 | "engines": {
948 | "node": ">= 0.4"
949 | }
950 | },
951 | "node_modules/setprototypeof": {
952 | "version": "1.2.0",
953 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
954 | "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
955 | },
956 | "node_modules/side-channel": {
957 | "version": "1.0.4",
958 | "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
959 | "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
960 | "dependencies": {
961 | "call-bind": "^1.0.0",
962 | "get-intrinsic": "^1.0.2",
963 | "object-inspect": "^1.9.0"
964 | },
965 | "funding": {
966 | "url": "https://github.com/sponsors/ljharb"
967 | }
968 | },
969 | "node_modules/sshpk": {
970 | "version": "1.17.0",
971 | "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz",
972 | "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==",
973 | "dependencies": {
974 | "asn1": "~0.2.3",
975 | "assert-plus": "^1.0.0",
976 | "bcrypt-pbkdf": "^1.0.0",
977 | "dashdash": "^1.12.0",
978 | "ecc-jsbn": "~0.1.1",
979 | "getpass": "^0.1.1",
980 | "jsbn": "~0.1.0",
981 | "safer-buffer": "^2.0.2",
982 | "tweetnacl": "~0.14.0"
983 | },
984 | "bin": {
985 | "sshpk-conv": "bin/sshpk-conv",
986 | "sshpk-sign": "bin/sshpk-sign",
987 | "sshpk-verify": "bin/sshpk-verify"
988 | },
989 | "engines": {
990 | "node": ">=0.10.0"
991 | }
992 | },
993 | "node_modules/statuses": {
994 | "version": "2.0.1",
995 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
996 | "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
997 | "engines": {
998 | "node": ">= 0.8"
999 | }
1000 | },
1001 | "node_modules/toidentifier": {
1002 | "version": "1.0.1",
1003 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
1004 | "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
1005 | "engines": {
1006 | "node": ">=0.6"
1007 | }
1008 | },
1009 | "node_modules/tough-cookie": {
1010 | "version": "2.5.0",
1011 | "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
1012 | "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==",
1013 | "dependencies": {
1014 | "psl": "^1.1.28",
1015 | "punycode": "^2.1.1"
1016 | },
1017 | "engines": {
1018 | "node": ">=0.8"
1019 | }
1020 | },
1021 | "node_modules/tunnel-agent": {
1022 | "version": "0.6.0",
1023 | "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
1024 | "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==",
1025 | "dependencies": {
1026 | "safe-buffer": "^5.0.1"
1027 | },
1028 | "engines": {
1029 | "node": "*"
1030 | }
1031 | },
1032 | "node_modules/tweetnacl": {
1033 | "version": "0.14.5",
1034 | "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
1035 | "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA=="
1036 | },
1037 | "node_modules/type-is": {
1038 | "version": "1.6.18",
1039 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
1040 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
1041 | "dependencies": {
1042 | "media-typer": "0.3.0",
1043 | "mime-types": "~2.1.24"
1044 | },
1045 | "engines": {
1046 | "node": ">= 0.6"
1047 | }
1048 | },
1049 | "node_modules/unpipe": {
1050 | "version": "1.0.0",
1051 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
1052 | "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
1053 | "engines": {
1054 | "node": ">= 0.8"
1055 | }
1056 | },
1057 | "node_modules/uri-js": {
1058 | "version": "4.4.1",
1059 | "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
1060 | "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
1061 | "dependencies": {
1062 | "punycode": "^2.1.0"
1063 | }
1064 | },
1065 | "node_modules/utils-merge": {
1066 | "version": "1.0.1",
1067 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
1068 | "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
1069 | "engines": {
1070 | "node": ">= 0.4.0"
1071 | }
1072 | },
1073 | "node_modules/uuid": {
1074 | "version": "3.4.0",
1075 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
1076 | "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
1077 | "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.",
1078 | "bin": {
1079 | "uuid": "bin/uuid"
1080 | }
1081 | },
1082 | "node_modules/vary": {
1083 | "version": "1.1.2",
1084 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
1085 | "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
1086 | "engines": {
1087 | "node": ">= 0.8"
1088 | }
1089 | },
1090 | "node_modules/verror": {
1091 | "version": "1.10.0",
1092 | "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
1093 | "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==",
1094 | "engines": [
1095 | "node >=0.6.0"
1096 | ],
1097 | "dependencies": {
1098 | "assert-plus": "^1.0.0",
1099 | "core-util-is": "1.0.2",
1100 | "extsprintf": "^1.2.0"
1101 | }
1102 | }
1103 | }
1104 | }
1105 |
--------------------------------------------------------------------------------
/authorization/authorization_code/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "spotify-authorization-code-example",
3 | "version": "0.0.2",
4 | "description": "Spotify Authorization Code flow example",
5 | "author": "Spotify",
6 | "scripts": {
7 | "start": "node app.js"
8 | },
9 | "dependencies": {
10 | "cookie-parser": "1.4.6",
11 | "cors": "2.8.5",
12 | "express": "4.18.2",
13 | "querystring": "~0.2.0",
14 | "request": "2.88.2"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/authorization/authorization_code/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Example of the Authorization Code flow with Spotify
5 |
6 |
17 |
18 |
19 |
20 |
21 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
53 |
54 |
61 |
62 |
63 |
64 |
140 |
141 |
142 |
143 |
--------------------------------------------------------------------------------
/authorization/authorization_code_pkce/README.md:
--------------------------------------------------------------------------------
1 | # Spotify Authorization Code with PKCE example
2 |
3 | This app displays your Spotify profile information using [Authorization Code with PKCE](https://developer.spotify.com/documentation/web-api/tutorials/code-pkce-flow)
4 | to grant permissions to the app.
5 |
6 | ## Using your own credentials
7 |
8 | You will need to register your app and get your own credentials from the [Spotify for Developers Dashboard](https://developer.spotify.com/dashboard).
9 |
10 | - Create a new app in the dashboard and add `http://localhost:8080` to the app's redirect URL list.
11 | - Once you have created your app, update the `client_id` and `redirect_uri` in the `public/app.js` file with the values obtained from the app settings in the dashboard.
12 |
13 | ## Running the example
14 |
15 | From a console shell:
16 |
17 | $ npm start
18 |
19 | Then, open `http://localhost:8080` in a browser.
20 |
--------------------------------------------------------------------------------
/authorization/authorization_code_pkce/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "spotify-authorization-code-pkce",
3 | "version": "1.0.0",
4 | "lockfileVersion": 3,
5 | "requires": true,
6 | "packages": {
7 | "": {
8 | "name": "spotify-authorization-code-pkce",
9 | "version": "1.0.0",
10 | "license": "ISC",
11 | "dependencies": {
12 | "http-server": "^14.1.1"
13 | }
14 | },
15 | "node_modules/ansi-styles": {
16 | "version": "4.3.0",
17 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
18 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
19 | "dependencies": {
20 | "color-convert": "^2.0.1"
21 | },
22 | "engines": {
23 | "node": ">=8"
24 | },
25 | "funding": {
26 | "url": "https://github.com/chalk/ansi-styles?sponsor=1"
27 | }
28 | },
29 | "node_modules/async": {
30 | "version": "2.6.4",
31 | "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz",
32 | "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==",
33 | "dependencies": {
34 | "lodash": "^4.17.14"
35 | }
36 | },
37 | "node_modules/basic-auth": {
38 | "version": "2.0.1",
39 | "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz",
40 | "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==",
41 | "dependencies": {
42 | "safe-buffer": "5.1.2"
43 | },
44 | "engines": {
45 | "node": ">= 0.8"
46 | }
47 | },
48 | "node_modules/call-bind": {
49 | "version": "1.0.2",
50 | "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
51 | "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
52 | "dependencies": {
53 | "function-bind": "^1.1.1",
54 | "get-intrinsic": "^1.0.2"
55 | },
56 | "funding": {
57 | "url": "https://github.com/sponsors/ljharb"
58 | }
59 | },
60 | "node_modules/chalk": {
61 | "version": "4.1.2",
62 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
63 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
64 | "dependencies": {
65 | "ansi-styles": "^4.1.0",
66 | "supports-color": "^7.1.0"
67 | },
68 | "engines": {
69 | "node": ">=10"
70 | },
71 | "funding": {
72 | "url": "https://github.com/chalk/chalk?sponsor=1"
73 | }
74 | },
75 | "node_modules/color-convert": {
76 | "version": "2.0.1",
77 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
78 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
79 | "dependencies": {
80 | "color-name": "~1.1.4"
81 | },
82 | "engines": {
83 | "node": ">=7.0.0"
84 | }
85 | },
86 | "node_modules/color-name": {
87 | "version": "1.1.4",
88 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
89 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
90 | },
91 | "node_modules/corser": {
92 | "version": "2.0.1",
93 | "resolved": "https://registry.npmjs.org/corser/-/corser-2.0.1.tgz",
94 | "integrity": "sha512-utCYNzRSQIZNPIcGZdQc92UVJYAhtGAteCFg0yRaFm8f0P+CPtyGyHXJcGXnffjCybUCEx3FQ2G7U3/o9eIkVQ==",
95 | "engines": {
96 | "node": ">= 0.4.0"
97 | }
98 | },
99 | "node_modules/debug": {
100 | "version": "3.2.7",
101 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
102 | "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
103 | "dependencies": {
104 | "ms": "^2.1.1"
105 | }
106 | },
107 | "node_modules/eventemitter3": {
108 | "version": "4.0.7",
109 | "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz",
110 | "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw=="
111 | },
112 | "node_modules/follow-redirects": {
113 | "version": "1.15.3",
114 | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz",
115 | "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==",
116 | "funding": [
117 | {
118 | "type": "individual",
119 | "url": "https://github.com/sponsors/RubenVerborgh"
120 | }
121 | ],
122 | "engines": {
123 | "node": ">=4.0"
124 | },
125 | "peerDependenciesMeta": {
126 | "debug": {
127 | "optional": true
128 | }
129 | }
130 | },
131 | "node_modules/function-bind": {
132 | "version": "1.1.2",
133 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
134 | "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
135 | "funding": {
136 | "url": "https://github.com/sponsors/ljharb"
137 | }
138 | },
139 | "node_modules/get-intrinsic": {
140 | "version": "1.2.1",
141 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz",
142 | "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==",
143 | "dependencies": {
144 | "function-bind": "^1.1.1",
145 | "has": "^1.0.3",
146 | "has-proto": "^1.0.1",
147 | "has-symbols": "^1.0.3"
148 | },
149 | "funding": {
150 | "url": "https://github.com/sponsors/ljharb"
151 | }
152 | },
153 | "node_modules/has": {
154 | "version": "1.0.4",
155 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz",
156 | "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==",
157 | "engines": {
158 | "node": ">= 0.4.0"
159 | }
160 | },
161 | "node_modules/has-flag": {
162 | "version": "4.0.0",
163 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
164 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
165 | "engines": {
166 | "node": ">=8"
167 | }
168 | },
169 | "node_modules/has-proto": {
170 | "version": "1.0.1",
171 | "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz",
172 | "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==",
173 | "engines": {
174 | "node": ">= 0.4"
175 | },
176 | "funding": {
177 | "url": "https://github.com/sponsors/ljharb"
178 | }
179 | },
180 | "node_modules/has-symbols": {
181 | "version": "1.0.3",
182 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
183 | "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
184 | "engines": {
185 | "node": ">= 0.4"
186 | },
187 | "funding": {
188 | "url": "https://github.com/sponsors/ljharb"
189 | }
190 | },
191 | "node_modules/he": {
192 | "version": "1.2.0",
193 | "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
194 | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
195 | "bin": {
196 | "he": "bin/he"
197 | }
198 | },
199 | "node_modules/html-encoding-sniffer": {
200 | "version": "3.0.0",
201 | "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz",
202 | "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==",
203 | "dependencies": {
204 | "whatwg-encoding": "^2.0.0"
205 | },
206 | "engines": {
207 | "node": ">=12"
208 | }
209 | },
210 | "node_modules/http-proxy": {
211 | "version": "1.18.1",
212 | "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz",
213 | "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==",
214 | "dependencies": {
215 | "eventemitter3": "^4.0.0",
216 | "follow-redirects": "^1.0.0",
217 | "requires-port": "^1.0.0"
218 | },
219 | "engines": {
220 | "node": ">=8.0.0"
221 | }
222 | },
223 | "node_modules/http-server": {
224 | "version": "14.1.1",
225 | "resolved": "https://registry.npmjs.org/http-server/-/http-server-14.1.1.tgz",
226 | "integrity": "sha512-+cbxadF40UXd9T01zUHgA+rlo2Bg1Srer4+B4NwIHdaGxAGGv59nYRnGGDJ9LBk7alpS0US+J+bLLdQOOkJq4A==",
227 | "dependencies": {
228 | "basic-auth": "^2.0.1",
229 | "chalk": "^4.1.2",
230 | "corser": "^2.0.1",
231 | "he": "^1.2.0",
232 | "html-encoding-sniffer": "^3.0.0",
233 | "http-proxy": "^1.18.1",
234 | "mime": "^1.6.0",
235 | "minimist": "^1.2.6",
236 | "opener": "^1.5.1",
237 | "portfinder": "^1.0.28",
238 | "secure-compare": "3.0.1",
239 | "union": "~0.5.0",
240 | "url-join": "^4.0.1"
241 | },
242 | "bin": {
243 | "http-server": "bin/http-server"
244 | },
245 | "engines": {
246 | "node": ">=12"
247 | }
248 | },
249 | "node_modules/iconv-lite": {
250 | "version": "0.6.3",
251 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
252 | "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
253 | "dependencies": {
254 | "safer-buffer": ">= 2.1.2 < 3.0.0"
255 | },
256 | "engines": {
257 | "node": ">=0.10.0"
258 | }
259 | },
260 | "node_modules/lodash": {
261 | "version": "4.17.21",
262 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
263 | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
264 | },
265 | "node_modules/mime": {
266 | "version": "1.6.0",
267 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
268 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
269 | "bin": {
270 | "mime": "cli.js"
271 | },
272 | "engines": {
273 | "node": ">=4"
274 | }
275 | },
276 | "node_modules/minimist": {
277 | "version": "1.2.8",
278 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
279 | "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
280 | "funding": {
281 | "url": "https://github.com/sponsors/ljharb"
282 | }
283 | },
284 | "node_modules/mkdirp": {
285 | "version": "0.5.6",
286 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
287 | "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
288 | "dependencies": {
289 | "minimist": "^1.2.6"
290 | },
291 | "bin": {
292 | "mkdirp": "bin/cmd.js"
293 | }
294 | },
295 | "node_modules/ms": {
296 | "version": "2.1.3",
297 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
298 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
299 | },
300 | "node_modules/object-inspect": {
301 | "version": "1.13.0",
302 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.0.tgz",
303 | "integrity": "sha512-HQ4J+ic8hKrgIt3mqk6cVOVrW2ozL4KdvHlqpBv9vDYWx9ysAgENAdvy4FoGF+KFdhR7nQTNm5J0ctAeOwn+3g==",
304 | "funding": {
305 | "url": "https://github.com/sponsors/ljharb"
306 | }
307 | },
308 | "node_modules/opener": {
309 | "version": "1.5.2",
310 | "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz",
311 | "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==",
312 | "bin": {
313 | "opener": "bin/opener-bin.js"
314 | }
315 | },
316 | "node_modules/portfinder": {
317 | "version": "1.0.32",
318 | "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.32.tgz",
319 | "integrity": "sha512-on2ZJVVDXRADWE6jnQaX0ioEylzgBpQk8r55NE4wjXW1ZxO+BgDlY6DXwj20i0V8eB4SenDQ00WEaxfiIQPcxg==",
320 | "dependencies": {
321 | "async": "^2.6.4",
322 | "debug": "^3.2.7",
323 | "mkdirp": "^0.5.6"
324 | },
325 | "engines": {
326 | "node": ">= 0.12.0"
327 | }
328 | },
329 | "node_modules/qs": {
330 | "version": "6.11.2",
331 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz",
332 | "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==",
333 | "dependencies": {
334 | "side-channel": "^1.0.4"
335 | },
336 | "engines": {
337 | "node": ">=0.6"
338 | },
339 | "funding": {
340 | "url": "https://github.com/sponsors/ljharb"
341 | }
342 | },
343 | "node_modules/requires-port": {
344 | "version": "1.0.0",
345 | "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
346 | "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ=="
347 | },
348 | "node_modules/safe-buffer": {
349 | "version": "5.1.2",
350 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
351 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
352 | },
353 | "node_modules/safer-buffer": {
354 | "version": "2.1.2",
355 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
356 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
357 | },
358 | "node_modules/secure-compare": {
359 | "version": "3.0.1",
360 | "resolved": "https://registry.npmjs.org/secure-compare/-/secure-compare-3.0.1.tgz",
361 | "integrity": "sha512-AckIIV90rPDcBcglUwXPF3kg0P0qmPsPXAj6BBEENQE1p5yA1xfmDJzfi1Tappj37Pv2mVbKpL3Z1T+Nn7k1Qw=="
362 | },
363 | "node_modules/side-channel": {
364 | "version": "1.0.4",
365 | "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
366 | "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
367 | "dependencies": {
368 | "call-bind": "^1.0.0",
369 | "get-intrinsic": "^1.0.2",
370 | "object-inspect": "^1.9.0"
371 | },
372 | "funding": {
373 | "url": "https://github.com/sponsors/ljharb"
374 | }
375 | },
376 | "node_modules/supports-color": {
377 | "version": "7.2.0",
378 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
379 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
380 | "dependencies": {
381 | "has-flag": "^4.0.0"
382 | },
383 | "engines": {
384 | "node": ">=8"
385 | }
386 | },
387 | "node_modules/union": {
388 | "version": "0.5.0",
389 | "resolved": "https://registry.npmjs.org/union/-/union-0.5.0.tgz",
390 | "integrity": "sha512-N6uOhuW6zO95P3Mel2I2zMsbsanvvtgn6jVqJv4vbVcz/JN0OkL9suomjQGmWtxJQXOCqUJvquc1sMeNz/IwlA==",
391 | "dependencies": {
392 | "qs": "^6.4.0"
393 | },
394 | "engines": {
395 | "node": ">= 0.8.0"
396 | }
397 | },
398 | "node_modules/url-join": {
399 | "version": "4.0.1",
400 | "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz",
401 | "integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA=="
402 | },
403 | "node_modules/whatwg-encoding": {
404 | "version": "2.0.0",
405 | "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz",
406 | "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==",
407 | "dependencies": {
408 | "iconv-lite": "0.6.3"
409 | },
410 | "engines": {
411 | "node": ">=12"
412 | }
413 | }
414 | }
415 | }
416 |
--------------------------------------------------------------------------------
/authorization/authorization_code_pkce/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "spotify-authorization-code-pkce",
3 | "version": "1.0.0",
4 | "description": "Spotify Authorization Code with PKCE flow example",
5 | "scripts": {
6 | "start": "http-server --cors public"
7 | },
8 | "author": "",
9 | "license": "ISC",
10 | "dependencies": {
11 | "http-server": "^14.1.1"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/authorization/authorization_code_pkce/public/app.js:
--------------------------------------------------------------------------------
1 | /**
2 | * This is an example of a basic node.js script that performs
3 | * the Authorization Code with PKCE oAuth2 flow to authenticate
4 | * against the Spotify Accounts.
5 | *
6 | * For more information, read
7 | * https://developer.spotify.com/documentation/web-api/tutorials/code-pkce-flow
8 | */
9 |
10 | const clientId = 'yourClientIDGoesHere'; // your clientId
11 | const redirectUrl = 'eg:http://localhost:8080'; // your redirect URL - must be localhost URL and/or HTTPS
12 |
13 | const authorizationEndpoint = "https://accounts.spotify.com/authorize";
14 | const tokenEndpoint = "https://accounts.spotify.com/api/token";
15 | const scope = 'user-read-private user-read-email';
16 |
17 | // Data structure that manages the current active token, caching it in localStorage
18 | const currentToken = {
19 | get access_token() { return localStorage.getItem('access_token') || null; },
20 | get refresh_token() { return localStorage.getItem('refresh_token') || null; },
21 | get expires_in() { return localStorage.getItem('refresh_in') || null },
22 | get expires() { return localStorage.getItem('expires') || null },
23 |
24 | save: function (response) {
25 | const { access_token, refresh_token, expires_in } = response;
26 | localStorage.setItem('access_token', access_token);
27 | localStorage.setItem('refresh_token', refresh_token);
28 | localStorage.setItem('expires_in', expires_in);
29 |
30 | const now = new Date();
31 | const expiry = new Date(now.getTime() + (expires_in * 1000));
32 | localStorage.setItem('expires', expiry);
33 | }
34 | };
35 |
36 | // On page load, try to fetch auth code from current browser search URL
37 | const args = new URLSearchParams(window.location.search);
38 | const code = args.get('code');
39 |
40 | // If we find a code, we're in a callback, do a token exchange
41 | if (code) {
42 | const token = await getToken(code);
43 | currentToken.save(token);
44 |
45 | // Remove code from URL so we can refresh correctly.
46 | const url = new URL(window.location.href);
47 | url.searchParams.delete("code");
48 |
49 | const updatedUrl = url.search ? url.href : url.href.replace('?', '');
50 | window.history.replaceState({}, document.title, updatedUrl);
51 | }
52 |
53 | // If we have a token, we're logged in, so fetch user data and render logged in template
54 | if (currentToken.access_token) {
55 | const userData = await getUserData();
56 | renderTemplate("main", "logged-in-template", userData);
57 | renderTemplate("oauth", "oauth-template", currentToken);
58 | }
59 |
60 | // Otherwise we're not logged in, so render the login template
61 | if (!currentToken.access_token) {
62 | renderTemplate("main", "login");
63 | }
64 |
65 | async function redirectToSpotifyAuthorize() {
66 | const possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
67 | const randomValues = crypto.getRandomValues(new Uint8Array(64));
68 | const randomString = randomValues.reduce((acc, x) => acc + possible[x % possible.length], "");
69 |
70 | const code_verifier = randomString;
71 | const data = new TextEncoder().encode(code_verifier);
72 | const hashed = await crypto.subtle.digest('SHA-256', data);
73 |
74 | const code_challenge_base64 = btoa(String.fromCharCode(...new Uint8Array(hashed)))
75 | .replace(/=/g, '')
76 | .replace(/\+/g, '-')
77 | .replace(/\//g, '_');
78 |
79 | window.localStorage.setItem('code_verifier', code_verifier);
80 |
81 | const authUrl = new URL(authorizationEndpoint)
82 | const params = {
83 | response_type: 'code',
84 | client_id: clientId,
85 | scope: scope,
86 | code_challenge_method: 'S256',
87 | code_challenge: code_challenge_base64,
88 | redirect_uri: redirectUrl,
89 | };
90 |
91 | authUrl.search = new URLSearchParams(params).toString();
92 | window.location.href = authUrl.toString(); // Redirect the user to the authorization server for login
93 | }
94 |
95 | // Soptify API Calls
96 | async function getToken(code) {
97 | const code_verifier = localStorage.getItem('code_verifier');
98 |
99 | const response = await fetch(tokenEndpoint, {
100 | method: 'POST',
101 | headers: {
102 | 'Content-Type': 'application/x-www-form-urlencoded',
103 | },
104 | body: new URLSearchParams({
105 | client_id: clientId,
106 | grant_type: 'authorization_code',
107 | code: code,
108 | redirect_uri: redirectUrl,
109 | code_verifier: code_verifier,
110 | }),
111 | });
112 |
113 | return await response.json();
114 | }
115 |
116 | async function refreshToken() {
117 | const response = await fetch(tokenEndpoint, {
118 | method: 'POST',
119 | headers: {
120 | 'Content-Type': 'application/x-www-form-urlencoded'
121 | },
122 | body: new URLSearchParams({
123 | client_id: clientId,
124 | grant_type: 'refresh_token',
125 | refresh_token: currentToken.refresh_token
126 | }),
127 | });
128 |
129 | return await response.json();
130 | }
131 |
132 | async function getUserData() {
133 | const response = await fetch("https://api.spotify.com/v1/me", {
134 | method: 'GET',
135 | headers: { 'Authorization': 'Bearer ' + currentToken.access_token },
136 | });
137 |
138 | return await response.json();
139 | }
140 |
141 | // Click handlers
142 | async function loginWithSpotifyClick() {
143 | await redirectToSpotifyAuthorize();
144 | }
145 |
146 | async function logoutClick() {
147 | localStorage.clear();
148 | window.location.href = redirectUrl;
149 | }
150 |
151 | async function refreshTokenClick() {
152 | const token = await refreshToken();
153 | currentToken.save(token);
154 | renderTemplate("oauth", "oauth-template", currentToken);
155 | }
156 |
157 | // HTML Template Rendering with basic data binding - demoware only.
158 | function renderTemplate(targetId, templateId, data = null) {
159 | const template = document.getElementById(templateId);
160 | const clone = template.content.cloneNode(true);
161 |
162 | const elements = clone.querySelectorAll("*");
163 | elements.forEach(ele => {
164 | const bindingAttrs = [...ele.attributes].filter(a => a.name.startsWith("data-bind"));
165 |
166 | bindingAttrs.forEach(attr => {
167 | const target = attr.name.replace(/data-bind-/, "").replace(/data-bind/, "");
168 | const targetType = target.startsWith("onclick") ? "HANDLER" : "PROPERTY";
169 | const targetProp = target === "" ? "innerHTML" : target;
170 |
171 | const prefix = targetType === "PROPERTY" ? "data." : "";
172 | const expression = prefix + attr.value.replace(/;\n\r\n/g, "");
173 |
174 | // Maybe use a framework with more validation here ;)
175 | try {
176 | ele[targetProp] = targetType === "PROPERTY" ? eval(expression) : () => { eval(expression) };
177 | ele.removeAttribute(attr.name);
178 | } catch (ex) {
179 | console.error(`Error binding ${expression} to ${targetProp}`, ex);
180 | }
181 | });
182 | });
183 |
184 | const target = document.getElementById(targetId);
185 | target.innerHTML = "";
186 | target.appendChild(clone);
187 | }
188 |
--------------------------------------------------------------------------------
/authorization/authorization_code_pkce/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Example of the Authorization Code with PKCE flow with Spotify
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | Welcome to the OAuth2 PKCE Example
16 |
17 |
18 |
19 |
20 | Logged in as
21 |
22 |
23 |
24 | Display name |
25 | |
26 |
27 |
28 | Id |
29 | |
30 |
31 |
32 | Email |
33 | |
34 |
35 |
36 | Spotify URI |
37 |
38 |
39 | |
40 |
41 |
42 | Link
43 | |
44 |
45 | |
46 |
47 |
48 | Profile Image |
49 |
50 |
51 | |
52 |
53 |
54 | Country |
55 | |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 | oAuth info
65 |
66 |
67 | Access token |
68 | |
69 |
70 |
71 | Refresh token |
72 | |
73 |
74 |
75 | Expiration at |
76 | ${getExpirationDate(expires_in)} |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
--------------------------------------------------------------------------------
/authorization/authorization_code_pkce/public/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 1rem;
3 | font-family: Arial, Helvetica, sans-serif;
4 | }
5 |
6 | tr:nth-child(even) {
7 | background-color: #eee;
8 | }
9 |
10 | td:first-child {
11 | font-weight: bold;
12 | }
13 |
14 | td {
15 | white-space: nowrap;
16 | padding: 10px;
17 | margin-right: 1rem;
18 | }
19 |
20 | button {
21 | margin: 1rem 1rem 0 0;
22 | border: 0;
23 | border-radius: 20px;
24 | padding: 10px 3rem;
25 | font-size: 0.8rem;
26 | font-family: Arial, Helvetica, sans-serif;
27 | text-transform: uppercase;
28 | font-weight: bold;
29 | background-color:#1ed760;
30 | color: black;
31 | }
32 |
33 | button:hover {
34 | background-color: #1fdf64;
35 | }
36 |
37 | #logged-in {
38 | display: none;
39 | }
40 |
--------------------------------------------------------------------------------
/authorization/catalog-info.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: backstage.io/v1alpha1
2 | kind: Component
3 | metadata:
4 | name: web-api-auth-examples
5 | spec:
6 | type: library
7 | owner: opx-partner-activation
8 |
--------------------------------------------------------------------------------
/authorization/client_credentials/README.md:
--------------------------------------------------------------------------------
1 | # Spotify Client Credentials example
2 |
3 | This app retrieves information from an artist's track using [Client Credentials](https://developer.spotify.com/documentation/web-api/tutorials/code-flow)
4 | to grant permissions to the app.
5 |
6 | ## Installation
7 |
8 | This example runs on Node.js. On [its website](http://www.nodejs.org/download/) you can find instructions on how to install it.
9 |
10 | ### Using your own credentials
11 |
12 | You will need to register your app and get your own credentials from the [Spotify for Developers Dashboard](https://developer.spotify.com/dashboard).
13 |
14 | - Create a new app in the dashboard and add `http://localhost:8888/callback` to the app's redirect URL list.
15 | - Once you have created your app, update the `client_id` and `client_secret` in the `app.js` file with the credentials obtained from the app settings in the dashboard.
16 |
17 | ## Running the example
18 |
19 | From a console shell:
20 |
21 | $ node app.js
22 |
--------------------------------------------------------------------------------
/authorization/client_credentials/app.js:
--------------------------------------------------------------------------------
1 | /**
2 | * This is an example of a basic node.js script that performs
3 | * the Client Credentials oAuth2 flow to authenticate against
4 | * the Spotify Accounts.
5 | *
6 | * For more information, read
7 | * https://developer.spotify.com/documentation/web-api/tutorials/client-credentials-flow
8 | */
9 |
10 | const client_id = 'YourClientId';
11 | const client_secret = 'YourClientSecret';
12 |
13 | async function getToken() {
14 | const response = await fetch('https://accounts.spotify.com/api/token', {
15 | method: 'POST',
16 | body: new URLSearchParams({
17 | 'grant_type': 'client_credentials',
18 | }),
19 | headers: {
20 | 'Content-Type': 'application/x-www-form-urlencoded',
21 | 'Authorization': 'Basic ' + (Buffer.from(client_id + ':' + client_secret).toString('base64')),
22 | },
23 | });
24 |
25 | return await response.json();
26 | }
27 |
28 | async function getTrackInfo(access_token) {
29 | const response = await fetch("https://api.spotify.com/v1/tracks/4cOdK2wGLETKBW3PvgPWqT", {
30 | method: 'GET',
31 | headers: { 'Authorization': 'Bearer ' + access_token },
32 | });
33 |
34 | return await response.json();
35 | }
36 |
37 | getToken().then(response => {
38 | getTrackInfo(response.access_token).then(profile => {
39 | console.log(profile)
40 | })
41 | });
42 |
--------------------------------------------------------------------------------
/authorization/implicit_grant/README.md:
--------------------------------------------------------------------------------
1 | # Spotify Implicit Grant example
2 |
3 | This app displays your Spotify profile information using [Implicit Grant](https://developer.spotify.com/documentation/web-api/tutorials/implicit-flow)
4 | to grant permissions to the app.
5 |
6 | > The implicit grant flow has some significant security flaws, so we strongly advise against using this flow. If you need to implement authorization where storing your client secret is not possible, use Authorization code with PKCE instead.
7 |
8 | ## Installation
9 |
10 | This example runs on Node.js. On [its website](http://www.nodejs.org/download/) you can find instructions on how to install it.
11 |
12 | Install the app dependencies running:
13 |
14 | $ npm install
15 |
16 | ## Using your own credentials
17 |
18 | You will need to register your app and get your own credentials from the [Spotify for Developers Dashboard](https://developer.spotify.com/dashboard).
19 |
20 | - Create a new app in the dashboard and add `http://localhost:8080` to the app's redirect URL list.
21 | - Once you have created your app, update the `client_id` and `redirect_uri` in the `public/index.html` file with the values obtained from the app settings in the dashboard.
22 |
23 | ## Running the example
24 |
25 | From a console shell:
26 |
27 | $ npm start
28 |
29 | Then, open `http://localhost:8080` in a browser.
30 |
--------------------------------------------------------------------------------
/authorization/implicit_grant/app.js:
--------------------------------------------------------------------------------
1 | /**
2 | * This is an example of a basic node.js script that performs
3 | * the Implicit Grant oAuth2 flow to authenticate against
4 | * the Spotify Accounts.
5 | *
6 | * For more information, read
7 | * https://developer.spotify.com/documentation/web-api/tutorials/implicit-flow
8 | */
9 |
10 | var express = require('express'); // Express web server framework
11 | var app = express();
12 | app.use(express.static(__dirname + '/public'));
13 | console.log('Listening on 8888');
14 | app.listen(8888);
15 |
--------------------------------------------------------------------------------
/authorization/implicit_grant/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "spotify-implicit-grant-example",
3 | "version": "0.0.2",
4 | "lockfileVersion": 3,
5 | "requires": true,
6 | "packages": {
7 | "": {
8 | "name": "spotify-implicit-grant-example",
9 | "version": "0.0.2",
10 | "dependencies": {
11 | "express": "4.18.2"
12 | }
13 | },
14 | "node_modules/accepts": {
15 | "version": "1.3.8",
16 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
17 | "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
18 | "dependencies": {
19 | "mime-types": "~2.1.34",
20 | "negotiator": "0.6.3"
21 | },
22 | "engines": {
23 | "node": ">= 0.6"
24 | }
25 | },
26 | "node_modules/array-flatten": {
27 | "version": "1.1.1",
28 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
29 | "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg=="
30 | },
31 | "node_modules/body-parser": {
32 | "version": "1.20.1",
33 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz",
34 | "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==",
35 | "dependencies": {
36 | "bytes": "3.1.2",
37 | "content-type": "~1.0.4",
38 | "debug": "2.6.9",
39 | "depd": "2.0.0",
40 | "destroy": "1.2.0",
41 | "http-errors": "2.0.0",
42 | "iconv-lite": "0.4.24",
43 | "on-finished": "2.4.1",
44 | "qs": "6.11.0",
45 | "raw-body": "2.5.1",
46 | "type-is": "~1.6.18",
47 | "unpipe": "1.0.0"
48 | },
49 | "engines": {
50 | "node": ">= 0.8",
51 | "npm": "1.2.8000 || >= 1.4.16"
52 | }
53 | },
54 | "node_modules/bytes": {
55 | "version": "3.1.2",
56 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
57 | "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
58 | "engines": {
59 | "node": ">= 0.8"
60 | }
61 | },
62 | "node_modules/call-bind": {
63 | "version": "1.0.5",
64 | "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz",
65 | "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==",
66 | "dependencies": {
67 | "function-bind": "^1.1.2",
68 | "get-intrinsic": "^1.2.1",
69 | "set-function-length": "^1.1.1"
70 | },
71 | "funding": {
72 | "url": "https://github.com/sponsors/ljharb"
73 | }
74 | },
75 | "node_modules/content-disposition": {
76 | "version": "0.5.4",
77 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
78 | "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
79 | "dependencies": {
80 | "safe-buffer": "5.2.1"
81 | },
82 | "engines": {
83 | "node": ">= 0.6"
84 | }
85 | },
86 | "node_modules/content-type": {
87 | "version": "1.0.5",
88 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
89 | "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
90 | "engines": {
91 | "node": ">= 0.6"
92 | }
93 | },
94 | "node_modules/cookie": {
95 | "version": "0.5.0",
96 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz",
97 | "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==",
98 | "engines": {
99 | "node": ">= 0.6"
100 | }
101 | },
102 | "node_modules/cookie-signature": {
103 | "version": "1.0.6",
104 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
105 | "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ=="
106 | },
107 | "node_modules/debug": {
108 | "version": "2.6.9",
109 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
110 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
111 | "dependencies": {
112 | "ms": "2.0.0"
113 | }
114 | },
115 | "node_modules/define-data-property": {
116 | "version": "1.1.1",
117 | "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz",
118 | "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==",
119 | "dependencies": {
120 | "get-intrinsic": "^1.2.1",
121 | "gopd": "^1.0.1",
122 | "has-property-descriptors": "^1.0.0"
123 | },
124 | "engines": {
125 | "node": ">= 0.4"
126 | }
127 | },
128 | "node_modules/depd": {
129 | "version": "2.0.0",
130 | "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
131 | "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
132 | "engines": {
133 | "node": ">= 0.8"
134 | }
135 | },
136 | "node_modules/destroy": {
137 | "version": "1.2.0",
138 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
139 | "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
140 | "engines": {
141 | "node": ">= 0.8",
142 | "npm": "1.2.8000 || >= 1.4.16"
143 | }
144 | },
145 | "node_modules/ee-first": {
146 | "version": "1.1.1",
147 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
148 | "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
149 | },
150 | "node_modules/encodeurl": {
151 | "version": "1.0.2",
152 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
153 | "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
154 | "engines": {
155 | "node": ">= 0.8"
156 | }
157 | },
158 | "node_modules/escape-html": {
159 | "version": "1.0.3",
160 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
161 | "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
162 | },
163 | "node_modules/etag": {
164 | "version": "1.8.1",
165 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
166 | "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
167 | "engines": {
168 | "node": ">= 0.6"
169 | }
170 | },
171 | "node_modules/express": {
172 | "version": "4.18.2",
173 | "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz",
174 | "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==",
175 | "dependencies": {
176 | "accepts": "~1.3.8",
177 | "array-flatten": "1.1.1",
178 | "body-parser": "1.20.1",
179 | "content-disposition": "0.5.4",
180 | "content-type": "~1.0.4",
181 | "cookie": "0.5.0",
182 | "cookie-signature": "1.0.6",
183 | "debug": "2.6.9",
184 | "depd": "2.0.0",
185 | "encodeurl": "~1.0.2",
186 | "escape-html": "~1.0.3",
187 | "etag": "~1.8.1",
188 | "finalhandler": "1.2.0",
189 | "fresh": "0.5.2",
190 | "http-errors": "2.0.0",
191 | "merge-descriptors": "1.0.1",
192 | "methods": "~1.1.2",
193 | "on-finished": "2.4.1",
194 | "parseurl": "~1.3.3",
195 | "path-to-regexp": "0.1.7",
196 | "proxy-addr": "~2.0.7",
197 | "qs": "6.11.0",
198 | "range-parser": "~1.2.1",
199 | "safe-buffer": "5.2.1",
200 | "send": "0.18.0",
201 | "serve-static": "1.15.0",
202 | "setprototypeof": "1.2.0",
203 | "statuses": "2.0.1",
204 | "type-is": "~1.6.18",
205 | "utils-merge": "1.0.1",
206 | "vary": "~1.1.2"
207 | },
208 | "engines": {
209 | "node": ">= 0.10.0"
210 | }
211 | },
212 | "node_modules/finalhandler": {
213 | "version": "1.2.0",
214 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz",
215 | "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==",
216 | "dependencies": {
217 | "debug": "2.6.9",
218 | "encodeurl": "~1.0.2",
219 | "escape-html": "~1.0.3",
220 | "on-finished": "2.4.1",
221 | "parseurl": "~1.3.3",
222 | "statuses": "2.0.1",
223 | "unpipe": "~1.0.0"
224 | },
225 | "engines": {
226 | "node": ">= 0.8"
227 | }
228 | },
229 | "node_modules/forwarded": {
230 | "version": "0.2.0",
231 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
232 | "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
233 | "engines": {
234 | "node": ">= 0.6"
235 | }
236 | },
237 | "node_modules/fresh": {
238 | "version": "0.5.2",
239 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
240 | "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
241 | "engines": {
242 | "node": ">= 0.6"
243 | }
244 | },
245 | "node_modules/function-bind": {
246 | "version": "1.1.2",
247 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
248 | "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
249 | "funding": {
250 | "url": "https://github.com/sponsors/ljharb"
251 | }
252 | },
253 | "node_modules/get-intrinsic": {
254 | "version": "1.2.2",
255 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz",
256 | "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==",
257 | "dependencies": {
258 | "function-bind": "^1.1.2",
259 | "has-proto": "^1.0.1",
260 | "has-symbols": "^1.0.3",
261 | "hasown": "^2.0.0"
262 | },
263 | "funding": {
264 | "url": "https://github.com/sponsors/ljharb"
265 | }
266 | },
267 | "node_modules/gopd": {
268 | "version": "1.0.1",
269 | "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
270 | "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",
271 | "dependencies": {
272 | "get-intrinsic": "^1.1.3"
273 | },
274 | "funding": {
275 | "url": "https://github.com/sponsors/ljharb"
276 | }
277 | },
278 | "node_modules/has-property-descriptors": {
279 | "version": "1.0.1",
280 | "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz",
281 | "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==",
282 | "dependencies": {
283 | "get-intrinsic": "^1.2.2"
284 | },
285 | "funding": {
286 | "url": "https://github.com/sponsors/ljharb"
287 | }
288 | },
289 | "node_modules/has-proto": {
290 | "version": "1.0.1",
291 | "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz",
292 | "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==",
293 | "engines": {
294 | "node": ">= 0.4"
295 | },
296 | "funding": {
297 | "url": "https://github.com/sponsors/ljharb"
298 | }
299 | },
300 | "node_modules/has-symbols": {
301 | "version": "1.0.3",
302 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
303 | "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
304 | "engines": {
305 | "node": ">= 0.4"
306 | },
307 | "funding": {
308 | "url": "https://github.com/sponsors/ljharb"
309 | }
310 | },
311 | "node_modules/hasown": {
312 | "version": "2.0.0",
313 | "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz",
314 | "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==",
315 | "dependencies": {
316 | "function-bind": "^1.1.2"
317 | },
318 | "engines": {
319 | "node": ">= 0.4"
320 | }
321 | },
322 | "node_modules/http-errors": {
323 | "version": "2.0.0",
324 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
325 | "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
326 | "dependencies": {
327 | "depd": "2.0.0",
328 | "inherits": "2.0.4",
329 | "setprototypeof": "1.2.0",
330 | "statuses": "2.0.1",
331 | "toidentifier": "1.0.1"
332 | },
333 | "engines": {
334 | "node": ">= 0.8"
335 | }
336 | },
337 | "node_modules/iconv-lite": {
338 | "version": "0.4.24",
339 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
340 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
341 | "dependencies": {
342 | "safer-buffer": ">= 2.1.2 < 3"
343 | },
344 | "engines": {
345 | "node": ">=0.10.0"
346 | }
347 | },
348 | "node_modules/inherits": {
349 | "version": "2.0.4",
350 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
351 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
352 | },
353 | "node_modules/ipaddr.js": {
354 | "version": "1.9.1",
355 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
356 | "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
357 | "engines": {
358 | "node": ">= 0.10"
359 | }
360 | },
361 | "node_modules/media-typer": {
362 | "version": "0.3.0",
363 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
364 | "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
365 | "engines": {
366 | "node": ">= 0.6"
367 | }
368 | },
369 | "node_modules/merge-descriptors": {
370 | "version": "1.0.1",
371 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
372 | "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w=="
373 | },
374 | "node_modules/methods": {
375 | "version": "1.1.2",
376 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
377 | "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
378 | "engines": {
379 | "node": ">= 0.6"
380 | }
381 | },
382 | "node_modules/mime": {
383 | "version": "1.6.0",
384 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
385 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
386 | "bin": {
387 | "mime": "cli.js"
388 | },
389 | "engines": {
390 | "node": ">=4"
391 | }
392 | },
393 | "node_modules/mime-db": {
394 | "version": "1.52.0",
395 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
396 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
397 | "engines": {
398 | "node": ">= 0.6"
399 | }
400 | },
401 | "node_modules/mime-types": {
402 | "version": "2.1.35",
403 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
404 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
405 | "dependencies": {
406 | "mime-db": "1.52.0"
407 | },
408 | "engines": {
409 | "node": ">= 0.6"
410 | }
411 | },
412 | "node_modules/ms": {
413 | "version": "2.0.0",
414 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
415 | "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
416 | },
417 | "node_modules/negotiator": {
418 | "version": "0.6.3",
419 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
420 | "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
421 | "engines": {
422 | "node": ">= 0.6"
423 | }
424 | },
425 | "node_modules/object-inspect": {
426 | "version": "1.13.1",
427 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz",
428 | "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==",
429 | "funding": {
430 | "url": "https://github.com/sponsors/ljharb"
431 | }
432 | },
433 | "node_modules/on-finished": {
434 | "version": "2.4.1",
435 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
436 | "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
437 | "dependencies": {
438 | "ee-first": "1.1.1"
439 | },
440 | "engines": {
441 | "node": ">= 0.8"
442 | }
443 | },
444 | "node_modules/parseurl": {
445 | "version": "1.3.3",
446 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
447 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
448 | "engines": {
449 | "node": ">= 0.8"
450 | }
451 | },
452 | "node_modules/path-to-regexp": {
453 | "version": "0.1.7",
454 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
455 | "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ=="
456 | },
457 | "node_modules/proxy-addr": {
458 | "version": "2.0.7",
459 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
460 | "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
461 | "dependencies": {
462 | "forwarded": "0.2.0",
463 | "ipaddr.js": "1.9.1"
464 | },
465 | "engines": {
466 | "node": ">= 0.10"
467 | }
468 | },
469 | "node_modules/qs": {
470 | "version": "6.11.0",
471 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
472 | "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
473 | "dependencies": {
474 | "side-channel": "^1.0.4"
475 | },
476 | "engines": {
477 | "node": ">=0.6"
478 | },
479 | "funding": {
480 | "url": "https://github.com/sponsors/ljharb"
481 | }
482 | },
483 | "node_modules/range-parser": {
484 | "version": "1.2.1",
485 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
486 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
487 | "engines": {
488 | "node": ">= 0.6"
489 | }
490 | },
491 | "node_modules/raw-body": {
492 | "version": "2.5.1",
493 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz",
494 | "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==",
495 | "dependencies": {
496 | "bytes": "3.1.2",
497 | "http-errors": "2.0.0",
498 | "iconv-lite": "0.4.24",
499 | "unpipe": "1.0.0"
500 | },
501 | "engines": {
502 | "node": ">= 0.8"
503 | }
504 | },
505 | "node_modules/safe-buffer": {
506 | "version": "5.2.1",
507 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
508 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
509 | "funding": [
510 | {
511 | "type": "github",
512 | "url": "https://github.com/sponsors/feross"
513 | },
514 | {
515 | "type": "patreon",
516 | "url": "https://www.patreon.com/feross"
517 | },
518 | {
519 | "type": "consulting",
520 | "url": "https://feross.org/support"
521 | }
522 | ]
523 | },
524 | "node_modules/safer-buffer": {
525 | "version": "2.1.2",
526 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
527 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
528 | },
529 | "node_modules/send": {
530 | "version": "0.18.0",
531 | "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz",
532 | "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==",
533 | "dependencies": {
534 | "debug": "2.6.9",
535 | "depd": "2.0.0",
536 | "destroy": "1.2.0",
537 | "encodeurl": "~1.0.2",
538 | "escape-html": "~1.0.3",
539 | "etag": "~1.8.1",
540 | "fresh": "0.5.2",
541 | "http-errors": "2.0.0",
542 | "mime": "1.6.0",
543 | "ms": "2.1.3",
544 | "on-finished": "2.4.1",
545 | "range-parser": "~1.2.1",
546 | "statuses": "2.0.1"
547 | },
548 | "engines": {
549 | "node": ">= 0.8.0"
550 | }
551 | },
552 | "node_modules/send/node_modules/ms": {
553 | "version": "2.1.3",
554 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
555 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
556 | },
557 | "node_modules/serve-static": {
558 | "version": "1.15.0",
559 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz",
560 | "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==",
561 | "dependencies": {
562 | "encodeurl": "~1.0.2",
563 | "escape-html": "~1.0.3",
564 | "parseurl": "~1.3.3",
565 | "send": "0.18.0"
566 | },
567 | "engines": {
568 | "node": ">= 0.8.0"
569 | }
570 | },
571 | "node_modules/set-function-length": {
572 | "version": "1.1.1",
573 | "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz",
574 | "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==",
575 | "dependencies": {
576 | "define-data-property": "^1.1.1",
577 | "get-intrinsic": "^1.2.1",
578 | "gopd": "^1.0.1",
579 | "has-property-descriptors": "^1.0.0"
580 | },
581 | "engines": {
582 | "node": ">= 0.4"
583 | }
584 | },
585 | "node_modules/setprototypeof": {
586 | "version": "1.2.0",
587 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
588 | "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
589 | },
590 | "node_modules/side-channel": {
591 | "version": "1.0.4",
592 | "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
593 | "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
594 | "dependencies": {
595 | "call-bind": "^1.0.0",
596 | "get-intrinsic": "^1.0.2",
597 | "object-inspect": "^1.9.0"
598 | },
599 | "funding": {
600 | "url": "https://github.com/sponsors/ljharb"
601 | }
602 | },
603 | "node_modules/statuses": {
604 | "version": "2.0.1",
605 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
606 | "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
607 | "engines": {
608 | "node": ">= 0.8"
609 | }
610 | },
611 | "node_modules/toidentifier": {
612 | "version": "1.0.1",
613 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
614 | "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
615 | "engines": {
616 | "node": ">=0.6"
617 | }
618 | },
619 | "node_modules/type-is": {
620 | "version": "1.6.18",
621 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
622 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
623 | "dependencies": {
624 | "media-typer": "0.3.0",
625 | "mime-types": "~2.1.24"
626 | },
627 | "engines": {
628 | "node": ">= 0.6"
629 | }
630 | },
631 | "node_modules/unpipe": {
632 | "version": "1.0.0",
633 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
634 | "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
635 | "engines": {
636 | "node": ">= 0.8"
637 | }
638 | },
639 | "node_modules/utils-merge": {
640 | "version": "1.0.1",
641 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
642 | "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
643 | "engines": {
644 | "node": ">= 0.4.0"
645 | }
646 | },
647 | "node_modules/vary": {
648 | "version": "1.1.2",
649 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
650 | "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
651 | "engines": {
652 | "node": ">= 0.8"
653 | }
654 | }
655 | }
656 | }
657 |
--------------------------------------------------------------------------------
/authorization/implicit_grant/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "spotify-implicit-grant-example",
3 | "version": "0.0.2",
4 | "description": "Spotify Implicit Grant example",
5 | "author": "Spotify",
6 | "scripts": {
7 | "start": "node app.js"
8 | },
9 | "dependencies": {
10 | "express": "4.18.2"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/authorization/implicit_grant/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Example of the Implicit Grant flow with Spotify
5 |
6 |
17 |
18 |
19 |
20 |
21 |
22 |
This is an example of the Implicit Grant flow
23 |
24 |
25 |
31 |
32 |
33 |
52 |
53 |
59 |
60 |
61 |
62 |
154 |
155 |
--------------------------------------------------------------------------------
/catalog-info.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: backstage.io/v1alpha1
2 | kind: Component
3 | metadata:
4 | name: web-api-auth-examples
5 | spec:
6 | type: library
7 | owner: opx-partner-activation
8 |
--------------------------------------------------------------------------------
/get_user_profile/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | pnpm-debug.log*
8 | lerna-debug.log*
9 |
10 | node_modules
11 | dist
12 | dist-ssr
13 | *.local
14 |
15 | # Editor directories and files
16 | .vscode/*
17 | !.vscode/extensions.json
18 | .idea
19 | .DS_Store
20 | *.suo
21 | *.ntvs*
22 | *.njsproj
23 | *.sln
24 | *.sw?
25 |
--------------------------------------------------------------------------------
/get_user_profile/README.md:
--------------------------------------------------------------------------------
1 |
2 | # Display your Spotify Profile Data in a Web App
3 |
4 | This is the final code for the Spotify Web API - How to Display your Profile Data in a Web . You can run this demo directly or [walk through the tutorial](https://developer.spotify.com/documentation/web-api/howtos/web-app-profile).
5 |
6 | ## Pre-requisites
7 |
8 | To run this demo you will need:
9 |
10 | - A [Node.js LTS](https://nodejs.org/en/) environment or later.
11 | - A [Spotify Developer Account](https://developer.spotify.com/)
12 |
13 | ## Usage
14 |
15 | Create an app in your [Spotify Developer Dashboard](https://developer.spotify.com/dashboard/), set the redirect URI to ` http://localhost:5173/callback` and `http://localhost:5173/callback/` and copy your Client ID.
16 |
17 | Clone the repository, ensure that you are in the `get_user_profile` directory and run:
18 |
19 | ```bash
20 | npm install
21 | npm run dev
22 | ```
23 |
24 | Replace the value for clientId in `/src/script.ts` with your own Client ID.
25 |
--------------------------------------------------------------------------------
/get_user_profile/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Example
7 |
8 |
9 |
10 |
11 | Display your Spotify Profile Data
12 |
13 |
14 | Logged in as
15 |
16 |
17 | - User ID:
18 | - Email:
19 | - Spotify URI:
20 | - Link:
21 | - Profile Image:
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/get_user_profile/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vite-project",
3 | "version": "0.0.0",
4 | "lockfileVersion": 3,
5 | "requires": true,
6 | "packages": {
7 | "": {
8 | "name": "vite-project",
9 | "version": "0.0.0",
10 | "devDependencies": {
11 | "typescript": "^4.9.3",
12 | "vite": "^4.0.0"
13 | }
14 | },
15 | "node_modules/@esbuild/android-arm": {
16 | "version": "0.16.17",
17 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/@esbuild/android-arm/-/android-arm-0.16.17.tgz",
18 | "integrity": "sha512-N9x1CMXVhtWEAMS7pNNONyA14f71VPQN9Cnavj1XQh6T7bskqiLLrSca4O0Vr8Wdcga943eThxnVp3JLnBMYtw==",
19 | "dev": true,
20 | "optional": true,
21 | "engines": {
22 | "node": ">=12"
23 | }
24 | },
25 | "node_modules/@esbuild/android-arm64": {
26 | "version": "0.16.17",
27 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/@esbuild/android-arm64/-/android-arm64-0.16.17.tgz",
28 | "integrity": "sha512-MIGl6p5sc3RDTLLkYL1MyL8BMRN4tLMRCn+yRJJmEDvYZ2M7tmAf80hx1kbNEUX2KJ50RRtxZ4JHLvCfuB6kBg==",
29 | "dev": true,
30 | "optional": true,
31 | "engines": {
32 | "node": ">=12"
33 | }
34 | },
35 | "node_modules/@esbuild/android-x64": {
36 | "version": "0.16.17",
37 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/@esbuild/android-x64/-/android-x64-0.16.17.tgz",
38 | "integrity": "sha512-a3kTv3m0Ghh4z1DaFEuEDfz3OLONKuFvI4Xqczqx4BqLyuFaFkuaG4j2MtA6fuWEFeC5x9IvqnX7drmRq/fyAQ==",
39 | "dev": true,
40 | "optional": true,
41 | "engines": {
42 | "node": ">=12"
43 | }
44 | },
45 | "node_modules/@esbuild/darwin-arm64": {
46 | "version": "0.16.17",
47 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/@esbuild/darwin-arm64/-/darwin-arm64-0.16.17.tgz",
48 | "integrity": "sha512-/2agbUEfmxWHi9ARTX6OQ/KgXnOWfsNlTeLcoV7HSuSTv63E4DqtAc+2XqGw1KHxKMHGZgbVCZge7HXWX9Vn+w==",
49 | "dev": true,
50 | "optional": true,
51 | "engines": {
52 | "node": ">=12"
53 | }
54 | },
55 | "node_modules/@esbuild/darwin-x64": {
56 | "version": "0.16.17",
57 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/@esbuild/darwin-x64/-/darwin-x64-0.16.17.tgz",
58 | "integrity": "sha512-2By45OBHulkd9Svy5IOCZt376Aa2oOkiE9QWUK9fe6Tb+WDr8hXL3dpqi+DeLiMed8tVXspzsTAvd0jUl96wmg==",
59 | "dev": true,
60 | "optional": true,
61 | "engines": {
62 | "node": ">=12"
63 | }
64 | },
65 | "node_modules/@esbuild/freebsd-arm64": {
66 | "version": "0.16.17",
67 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.17.tgz",
68 | "integrity": "sha512-mt+cxZe1tVx489VTb4mBAOo2aKSnJ33L9fr25JXpqQqzbUIw/yzIzi+NHwAXK2qYV1lEFp4OoVeThGjUbmWmdw==",
69 | "dev": true,
70 | "optional": true,
71 | "engines": {
72 | "node": ">=12"
73 | }
74 | },
75 | "node_modules/@esbuild/freebsd-x64": {
76 | "version": "0.16.17",
77 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/@esbuild/freebsd-x64/-/freebsd-x64-0.16.17.tgz",
78 | "integrity": "sha512-8ScTdNJl5idAKjH8zGAsN7RuWcyHG3BAvMNpKOBaqqR7EbUhhVHOqXRdL7oZvz8WNHL2pr5+eIT5c65kA6NHug==",
79 | "dev": true,
80 | "optional": true,
81 | "engines": {
82 | "node": ">=12"
83 | }
84 | },
85 | "node_modules/@esbuild/linux-arm": {
86 | "version": "0.16.17",
87 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/@esbuild/linux-arm/-/linux-arm-0.16.17.tgz",
88 | "integrity": "sha512-iihzrWbD4gIT7j3caMzKb/RsFFHCwqqbrbH9SqUSRrdXkXaygSZCZg1FybsZz57Ju7N/SHEgPyaR0LZ8Zbe9gQ==",
89 | "dev": true,
90 | "optional": true,
91 | "engines": {
92 | "node": ">=12"
93 | }
94 | },
95 | "node_modules/@esbuild/linux-arm64": {
96 | "version": "0.16.17",
97 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/@esbuild/linux-arm64/-/linux-arm64-0.16.17.tgz",
98 | "integrity": "sha512-7S8gJnSlqKGVJunnMCrXHU9Q8Q/tQIxk/xL8BqAP64wchPCTzuM6W3Ra8cIa1HIflAvDnNOt2jaL17vaW+1V0g==",
99 | "dev": true,
100 | "optional": true,
101 | "engines": {
102 | "node": ">=12"
103 | }
104 | },
105 | "node_modules/@esbuild/linux-ia32": {
106 | "version": "0.16.17",
107 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/@esbuild/linux-ia32/-/linux-ia32-0.16.17.tgz",
108 | "integrity": "sha512-kiX69+wcPAdgl3Lonh1VI7MBr16nktEvOfViszBSxygRQqSpzv7BffMKRPMFwzeJGPxcio0pdD3kYQGpqQ2SSg==",
109 | "dev": true,
110 | "optional": true,
111 | "engines": {
112 | "node": ">=12"
113 | }
114 | },
115 | "node_modules/@esbuild/linux-loong64": {
116 | "version": "0.16.17",
117 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/@esbuild/linux-loong64/-/linux-loong64-0.16.17.tgz",
118 | "integrity": "sha512-dTzNnQwembNDhd654cA4QhbS9uDdXC3TKqMJjgOWsC0yNCbpzfWoXdZvp0mY7HU6nzk5E0zpRGGx3qoQg8T2DQ==",
119 | "dev": true,
120 | "optional": true,
121 | "engines": {
122 | "node": ">=12"
123 | }
124 | },
125 | "node_modules/@esbuild/linux-mips64el": {
126 | "version": "0.16.17",
127 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/@esbuild/linux-mips64el/-/linux-mips64el-0.16.17.tgz",
128 | "integrity": "sha512-ezbDkp2nDl0PfIUn0CsQ30kxfcLTlcx4Foz2kYv8qdC6ia2oX5Q3E/8m6lq84Dj/6b0FrkgD582fJMIfHhJfSw==",
129 | "dev": true,
130 | "optional": true,
131 | "engines": {
132 | "node": ">=12"
133 | }
134 | },
135 | "node_modules/@esbuild/linux-ppc64": {
136 | "version": "0.16.17",
137 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/@esbuild/linux-ppc64/-/linux-ppc64-0.16.17.tgz",
138 | "integrity": "sha512-dzS678gYD1lJsW73zrFhDApLVdM3cUF2MvAa1D8K8KtcSKdLBPP4zZSLy6LFZ0jYqQdQ29bjAHJDgz0rVbLB3g==",
139 | "dev": true,
140 | "optional": true,
141 | "engines": {
142 | "node": ">=12"
143 | }
144 | },
145 | "node_modules/@esbuild/linux-riscv64": {
146 | "version": "0.16.17",
147 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/@esbuild/linux-riscv64/-/linux-riscv64-0.16.17.tgz",
148 | "integrity": "sha512-ylNlVsxuFjZK8DQtNUwiMskh6nT0vI7kYl/4fZgV1llP5d6+HIeL/vmmm3jpuoo8+NuXjQVZxmKuhDApK0/cKw==",
149 | "dev": true,
150 | "optional": true,
151 | "engines": {
152 | "node": ">=12"
153 | }
154 | },
155 | "node_modules/@esbuild/linux-s390x": {
156 | "version": "0.16.17",
157 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/@esbuild/linux-s390x/-/linux-s390x-0.16.17.tgz",
158 | "integrity": "sha512-gzy7nUTO4UA4oZ2wAMXPNBGTzZFP7mss3aKR2hH+/4UUkCOyqmjXiKpzGrY2TlEUhbbejzXVKKGazYcQTZWA/w==",
159 | "dev": true,
160 | "optional": true,
161 | "engines": {
162 | "node": ">=12"
163 | }
164 | },
165 | "node_modules/@esbuild/linux-x64": {
166 | "version": "0.16.17",
167 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/@esbuild/linux-x64/-/linux-x64-0.16.17.tgz",
168 | "integrity": "sha512-mdPjPxfnmoqhgpiEArqi4egmBAMYvaObgn4poorpUaqmvzzbvqbowRllQ+ZgzGVMGKaPkqUmPDOOFQRUFDmeUw==",
169 | "dev": true,
170 | "optional": true,
171 | "engines": {
172 | "node": ">=12"
173 | }
174 | },
175 | "node_modules/@esbuild/netbsd-x64": {
176 | "version": "0.16.17",
177 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/@esbuild/netbsd-x64/-/netbsd-x64-0.16.17.tgz",
178 | "integrity": "sha512-/PzmzD/zyAeTUsduZa32bn0ORug+Jd1EGGAUJvqfeixoEISYpGnAezN6lnJoskauoai0Jrs+XSyvDhppCPoKOA==",
179 | "dev": true,
180 | "optional": true,
181 | "engines": {
182 | "node": ">=12"
183 | }
184 | },
185 | "node_modules/@esbuild/openbsd-x64": {
186 | "version": "0.16.17",
187 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/@esbuild/openbsd-x64/-/openbsd-x64-0.16.17.tgz",
188 | "integrity": "sha512-2yaWJhvxGEz2RiftSk0UObqJa/b+rIAjnODJgv2GbGGpRwAfpgzyrg1WLK8rqA24mfZa9GvpjLcBBg8JHkoodg==",
189 | "dev": true,
190 | "optional": true,
191 | "engines": {
192 | "node": ">=12"
193 | }
194 | },
195 | "node_modules/@esbuild/sunos-x64": {
196 | "version": "0.16.17",
197 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/@esbuild/sunos-x64/-/sunos-x64-0.16.17.tgz",
198 | "integrity": "sha512-xtVUiev38tN0R3g8VhRfN7Zl42YCJvyBhRKw1RJjwE1d2emWTVToPLNEQj/5Qxc6lVFATDiy6LjVHYhIPrLxzw==",
199 | "dev": true,
200 | "optional": true,
201 | "engines": {
202 | "node": ">=12"
203 | }
204 | },
205 | "node_modules/@esbuild/win32-arm64": {
206 | "version": "0.16.17",
207 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/@esbuild/win32-arm64/-/win32-arm64-0.16.17.tgz",
208 | "integrity": "sha512-ga8+JqBDHY4b6fQAmOgtJJue36scANy4l/rL97W+0wYmijhxKetzZdKOJI7olaBaMhWt8Pac2McJdZLxXWUEQw==",
209 | "dev": true,
210 | "optional": true,
211 | "engines": {
212 | "node": ">=12"
213 | }
214 | },
215 | "node_modules/@esbuild/win32-ia32": {
216 | "version": "0.16.17",
217 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/@esbuild/win32-ia32/-/win32-ia32-0.16.17.tgz",
218 | "integrity": "sha512-WnsKaf46uSSF/sZhwnqE4L/F89AYNMiD4YtEcYekBt9Q7nj0DiId2XH2Ng2PHM54qi5oPrQ8luuzGszqi/veig==",
219 | "dev": true,
220 | "optional": true,
221 | "engines": {
222 | "node": ">=12"
223 | }
224 | },
225 | "node_modules/@esbuild/win32-x64": {
226 | "version": "0.16.17",
227 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/@esbuild/win32-x64/-/win32-x64-0.16.17.tgz",
228 | "integrity": "sha512-y+EHuSchhL7FjHgvQL/0fnnFmO4T1bhvWANX6gcnqTjtnKWbTvUMCpGnv2+t+31d7RzyEAYAd4u2fnIhHL6N/Q==",
229 | "dev": true,
230 | "optional": true,
231 | "engines": {
232 | "node": ">=12"
233 | }
234 | },
235 | "node_modules/esbuild": {
236 | "version": "0.16.17",
237 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/esbuild/-/esbuild-0.16.17.tgz",
238 | "integrity": "sha512-G8LEkV0XzDMNwXKgM0Jwu3nY3lSTwSGY6XbxM9cr9+s0T/qSV1q1JVPBGzm3dcjhCic9+emZDmMffkwgPeOeLg==",
239 | "dev": true,
240 | "hasInstallScript": true,
241 | "bin": {
242 | "esbuild": "bin/esbuild"
243 | },
244 | "engines": {
245 | "node": ">=12"
246 | },
247 | "optionalDependencies": {
248 | "@esbuild/android-arm": "0.16.17",
249 | "@esbuild/android-arm64": "0.16.17",
250 | "@esbuild/android-x64": "0.16.17",
251 | "@esbuild/darwin-arm64": "0.16.17",
252 | "@esbuild/darwin-x64": "0.16.17",
253 | "@esbuild/freebsd-arm64": "0.16.17",
254 | "@esbuild/freebsd-x64": "0.16.17",
255 | "@esbuild/linux-arm": "0.16.17",
256 | "@esbuild/linux-arm64": "0.16.17",
257 | "@esbuild/linux-ia32": "0.16.17",
258 | "@esbuild/linux-loong64": "0.16.17",
259 | "@esbuild/linux-mips64el": "0.16.17",
260 | "@esbuild/linux-ppc64": "0.16.17",
261 | "@esbuild/linux-riscv64": "0.16.17",
262 | "@esbuild/linux-s390x": "0.16.17",
263 | "@esbuild/linux-x64": "0.16.17",
264 | "@esbuild/netbsd-x64": "0.16.17",
265 | "@esbuild/openbsd-x64": "0.16.17",
266 | "@esbuild/sunos-x64": "0.16.17",
267 | "@esbuild/win32-arm64": "0.16.17",
268 | "@esbuild/win32-ia32": "0.16.17",
269 | "@esbuild/win32-x64": "0.16.17"
270 | }
271 | },
272 | "node_modules/fsevents": {
273 | "version": "2.3.2",
274 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/fsevents/-/fsevents-2.3.2.tgz",
275 | "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
276 | "dev": true,
277 | "hasInstallScript": true,
278 | "optional": true,
279 | "engines": {
280 | "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
281 | }
282 | },
283 | "node_modules/function-bind": {
284 | "version": "1.1.1",
285 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/function-bind/-/function-bind-1.1.1.tgz",
286 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
287 | "dev": true
288 | },
289 | "node_modules/has": {
290 | "version": "1.0.3",
291 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/has/-/has-1.0.3.tgz",
292 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
293 | "dev": true,
294 | "dependencies": {
295 | "function-bind": "^1.1.1"
296 | },
297 | "engines": {
298 | "node": ">= 0.4.0"
299 | }
300 | },
301 | "node_modules/is-core-module": {
302 | "version": "2.11.0",
303 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/is-core-module/-/is-core-module-2.11.0.tgz",
304 | "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==",
305 | "dev": true,
306 | "dependencies": {
307 | "has": "^1.0.3"
308 | }
309 | },
310 | "node_modules/nanoid": {
311 | "version": "3.3.4",
312 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/nanoid/-/nanoid-3.3.4.tgz",
313 | "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==",
314 | "dev": true,
315 | "bin": {
316 | "nanoid": "bin/nanoid.cjs"
317 | },
318 | "engines": {
319 | "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
320 | }
321 | },
322 | "node_modules/path-parse": {
323 | "version": "1.0.7",
324 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/path-parse/-/path-parse-1.0.7.tgz",
325 | "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
326 | "dev": true
327 | },
328 | "node_modules/picocolors": {
329 | "version": "1.0.0",
330 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/picocolors/-/picocolors-1.0.0.tgz",
331 | "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==",
332 | "dev": true
333 | },
334 | "node_modules/postcss": {
335 | "version": "8.4.21",
336 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/postcss/-/postcss-8.4.21.tgz",
337 | "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==",
338 | "dev": true,
339 | "dependencies": {
340 | "nanoid": "^3.3.4",
341 | "picocolors": "^1.0.0",
342 | "source-map-js": "^1.0.2"
343 | },
344 | "engines": {
345 | "node": "^10 || ^12 || >=14"
346 | }
347 | },
348 | "node_modules/resolve": {
349 | "version": "1.22.1",
350 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/resolve/-/resolve-1.22.1.tgz",
351 | "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==",
352 | "dev": true,
353 | "dependencies": {
354 | "is-core-module": "^2.9.0",
355 | "path-parse": "^1.0.7",
356 | "supports-preserve-symlinks-flag": "^1.0.0"
357 | },
358 | "bin": {
359 | "resolve": "bin/resolve"
360 | }
361 | },
362 | "node_modules/rollup": {
363 | "version": "3.10.0",
364 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/rollup/-/rollup-3.10.0.tgz",
365 | "integrity": "sha512-JmRYz44NjC1MjVF2VKxc0M1a97vn+cDxeqWmnwyAF4FvpjK8YFdHpaqvQB+3IxCvX05vJxKZkoMDU8TShhmJVA==",
366 | "dev": true,
367 | "bin": {
368 | "rollup": "dist/bin/rollup"
369 | },
370 | "engines": {
371 | "node": ">=14.18.0",
372 | "npm": ">=8.0.0"
373 | },
374 | "optionalDependencies": {
375 | "fsevents": "~2.3.2"
376 | }
377 | },
378 | "node_modules/source-map-js": {
379 | "version": "1.0.2",
380 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/source-map-js/-/source-map-js-1.0.2.tgz",
381 | "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
382 | "dev": true,
383 | "engines": {
384 | "node": ">=0.10.0"
385 | }
386 | },
387 | "node_modules/supports-preserve-symlinks-flag": {
388 | "version": "1.0.0",
389 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
390 | "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
391 | "dev": true,
392 | "engines": {
393 | "node": ">= 0.4"
394 | }
395 | },
396 | "node_modules/typescript": {
397 | "version": "4.9.4",
398 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/typescript/-/typescript-4.9.4.tgz",
399 | "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==",
400 | "dev": true,
401 | "bin": {
402 | "tsc": "bin/tsc",
403 | "tsserver": "bin/tsserver"
404 | },
405 | "engines": {
406 | "node": ">=4.2.0"
407 | }
408 | },
409 | "node_modules/vite": {
410 | "version": "4.0.4",
411 | "resolved": "https://artifactory.spotify.net/artifactory/api/npm/virtual-npm/vite/-/vite-4.0.4.tgz",
412 | "integrity": "sha512-xevPU7M8FU0i/80DMR+YhgrzR5KS2ORy1B4xcX/cXLsvnUWvfHuqMmVU6N0YiJ4JWGRJJsLCgjEzKjG9/GKoSw==",
413 | "dev": true,
414 | "dependencies": {
415 | "esbuild": "^0.16.3",
416 | "postcss": "^8.4.20",
417 | "resolve": "^1.22.1",
418 | "rollup": "^3.7.0"
419 | },
420 | "bin": {
421 | "vite": "bin/vite.js"
422 | },
423 | "engines": {
424 | "node": "^14.18.0 || >=16.0.0"
425 | },
426 | "optionalDependencies": {
427 | "fsevents": "~2.3.2"
428 | },
429 | "peerDependencies": {
430 | "@types/node": ">= 14",
431 | "less": "*",
432 | "sass": "*",
433 | "stylus": "*",
434 | "sugarss": "*",
435 | "terser": "^5.4.0"
436 | },
437 | "peerDependenciesMeta": {
438 | "@types/node": {
439 | "optional": true
440 | },
441 | "less": {
442 | "optional": true
443 | },
444 | "sass": {
445 | "optional": true
446 | },
447 | "stylus": {
448 | "optional": true
449 | },
450 | "sugarss": {
451 | "optional": true
452 | },
453 | "terser": {
454 | "optional": true
455 | }
456 | }
457 | }
458 | }
459 | }
460 |
--------------------------------------------------------------------------------
/get_user_profile/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vite-project",
3 | "private": true,
4 | "version": "0.0.0",
5 | "type": "module",
6 | "scripts": {
7 | "dev": "vite",
8 | "build": "tsc && vite build",
9 | "preview": "vite preview"
10 | },
11 | "devDependencies": {
12 | "typescript": "^4.9.3",
13 | "vite": "^4.0.0"
14 | }
15 | }
--------------------------------------------------------------------------------
/get_user_profile/src/authCodeWithPkce.ts:
--------------------------------------------------------------------------------
1 | export async function redirectToAuthCodeFlow(clientId: string) {
2 | const verifier = generateCodeVerifier(128);
3 | const challenge = await generateCodeChallenge(verifier);
4 |
5 | localStorage.setItem("verifier", verifier);
6 |
7 | const params = new URLSearchParams();
8 | params.append("client_id", clientId);
9 | params.append("response_type", "code");
10 | params.append("redirect_uri", "http://localhost:5173/callback");
11 | params.append("scope", "user-read-private user-read-email");
12 | params.append("code_challenge_method", "S256");
13 | params.append("code_challenge", challenge);
14 |
15 | document.location = `https://accounts.spotify.com/authorize?${params.toString()}`;
16 | }
17 |
18 | export async function getAccessToken(clientId: string, code: string) {
19 | const verifier = localStorage.getItem("verifier");
20 |
21 | const params = new URLSearchParams();
22 | params.append("client_id", clientId);
23 | params.append("grant_type", "authorization_code");
24 | params.append("code", code);
25 | params.append("redirect_uri", "http://localhost:5173/callback");
26 | params.append("code_verifier", verifier!);
27 |
28 | const result = await fetch("https://accounts.spotify.com/api/token", {
29 | method: "POST",
30 | headers: { "Content-Type": "application/x-www-form-urlencoded" },
31 | body: params
32 | });
33 |
34 | const { access_token } = await result.json();
35 | return access_token;
36 | }
37 |
38 | function generateCodeVerifier(length: number) {
39 | let text = '';
40 | let possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
41 |
42 | for (let i = 0; i < length; i++) {
43 | text += possible.charAt(Math.floor(Math.random() * possible.length));
44 | }
45 | return text;
46 | }
47 |
48 | async function generateCodeChallenge(codeVerifier: string) {
49 | const data = new TextEncoder().encode(codeVerifier);
50 | const digest = await window.crypto.subtle.digest('SHA-256', data);
51 | return btoa(String.fromCharCode.apply(null, [...new Uint8Array(digest)]))
52 | .replace(/\+/g, '-')
53 | .replace(/\//g, '_')
54 | .replace(/=+$/, '');
55 | }
56 |
--------------------------------------------------------------------------------
/get_user_profile/src/script.ts:
--------------------------------------------------------------------------------
1 | // Because this is a literal single page application
2 | // we detect a callback from Spotify by checking for the hash fragment
3 | import { redirectToAuthCodeFlow, getAccessToken } from "./authCodeWithPkce";
4 |
5 | const clientId = "your_client_id";
6 | const params = new URLSearchParams(window.location.search);
7 | const code = params.get("code");
8 |
9 | if (!code) {
10 | redirectToAuthCodeFlow(clientId);
11 | } else {
12 | const accessToken = await getAccessToken(clientId, code);
13 | const profile = await fetchProfile(accessToken);
14 | populateUI(profile);
15 | }
16 |
17 | async function fetchProfile(code: string): Promise {
18 | const result = await fetch("https://api.spotify.com/v1/me", {
19 | method: "GET", headers: { Authorization: `Bearer ${code}` }
20 | });
21 |
22 | return await result.json();
23 | }
24 |
25 | function populateUI(profile: UserProfile) {
26 | document.getElementById("displayName")!.innerText = profile.display_name;
27 | document.getElementById("avatar")!.setAttribute("src", profile.images[0].url)
28 | document.getElementById("id")!.innerText = profile.id;
29 | document.getElementById("email")!.innerText = profile.email;
30 | document.getElementById("uri")!.innerText = profile.uri;
31 | document.getElementById("uri")!.setAttribute("href", profile.external_urls.spotify);
32 | document.getElementById("url")!.innerText = profile.href;
33 | document.getElementById("url")!.setAttribute("href", profile.href);
34 | document.getElementById("imgUrl")!.innerText = profile.images[0].url;
35 | }
36 |
--------------------------------------------------------------------------------
/get_user_profile/src/types.d.ts:
--------------------------------------------------------------------------------
1 | interface UserProfile {
2 | country: string;
3 | display_name: string;
4 | email: string;
5 | explicit_content: {
6 | filter_enabled: boolean,
7 | filter_locked: boolean
8 | },
9 | external_urls: { spotify: string; };
10 | followers: { href: string; total: number; };
11 | href: string;
12 | id: string;
13 | images: Image[];
14 | product: string;
15 | type: string;
16 | uri: string;
17 | }
18 |
19 | interface Image {
20 | url: string;
21 | height: number;
22 | width: number;
23 | }
24 |
--------------------------------------------------------------------------------
/get_user_profile/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ESNext",
4 | "useDefineForClassFields": true,
5 | "module": "ESNext",
6 | "lib": ["ESNext", "DOM"],
7 | "moduleResolution": "Node",
8 | "strict": true,
9 | "resolveJsonModule": true,
10 | "isolatedModules": true,
11 | "esModuleInterop": true,
12 | "noEmit": true,
13 | "noUnusedLocals": true,
14 | "noUnusedParameters": true,
15 | "noImplicitReturns": true,
16 | "skipLibCheck": true
17 | },
18 | "include": ["src"]
19 | }
20 |
--------------------------------------------------------------------------------