@digipair/skill-oauth2 0.52.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./src/index";
package/index.cjs.js ADDED
@@ -0,0 +1,82 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var simpleOauth2 = require('simple-oauth2');
6
+
7
+ let OAuth2Service = class OAuth2Service {
8
+ async authorizationCodeUrl(params, _pinsSettingsList, _context) {
9
+ const { config } = params;
10
+ const clent = new simpleOauth2.AuthorizationCode(config);
11
+ return clent.authorizeURL(config);
12
+ }
13
+ async authorizationCodeAccessToken(params, _pinsSettingsList, _context) {
14
+ const { config, tokenParams } = params;
15
+ const clent = new simpleOauth2.AuthorizationCode(config);
16
+ return clent.getToken(tokenParams);
17
+ }
18
+ async authorizationCodeCreateToken(params, _pinsSettingsList, _context) {
19
+ const { config, accessToken } = params;
20
+ const clent = new simpleOauth2.AuthorizationCode(config);
21
+ return clent.createToken(accessToken);
22
+ }
23
+ async resourceOwnerPasswordAccessToken(params, _pinsSettingsList, _context) {
24
+ const { config, tokenParams } = params;
25
+ const clent = new simpleOauth2.ResourceOwnerPassword(config);
26
+ return clent.getToken(tokenParams);
27
+ }
28
+ async resourceOwnerPasswordCreateToken(params, _pinsSettingsList, _context) {
29
+ const { config, accessToken } = params;
30
+ const clent = new simpleOauth2.ResourceOwnerPassword(config);
31
+ return clent.createToken(accessToken);
32
+ }
33
+ async clientCredentialsAccessToken(params, _pinsSettingsList, _context) {
34
+ const { config, tokenParams } = params;
35
+ const clent = new simpleOauth2.ClientCredentials(config);
36
+ return clent.getToken(tokenParams);
37
+ }
38
+ async clientCredentialsCreateToken(params, _pinsSettingsList, _context) {
39
+ const { config, accessToken } = params;
40
+ const clent = new simpleOauth2.ClientCredentials(config);
41
+ return clent.createToken(accessToken);
42
+ }
43
+ async tokenExpired(params, _pinsSettingsList, _context) {
44
+ const { token } = params;
45
+ return token.expired();
46
+ }
47
+ async tokenRefresh(params, _pinsSettingsList, _context) {
48
+ const { token } = params;
49
+ return token.refresh();
50
+ }
51
+ async tokenRevoke(params, _pinsSettingsList, _context) {
52
+ const { token, type } = params;
53
+ return token.revoke(type);
54
+ }
55
+ async tokenRevokeAll(params, _pinsSettingsList, _context) {
56
+ const { token } = params;
57
+ return token.revokeAll();
58
+ }
59
+ };
60
+ const authorizationCodeUrl = (params, pinsSettingsList, context)=>new OAuth2Service().authorizationCodeUrl(params, pinsSettingsList, context);
61
+ const authorizationCodeAccessTocken = (params, pinsSettingsList, context)=>new OAuth2Service().authorizationCodeAccessToken(params, pinsSettingsList, context);
62
+ const authorizationCodeCreateToken = (params, pinsSettingsList, context)=>new OAuth2Service().authorizationCodeCreateToken(params, pinsSettingsList, context);
63
+ const resourceOwnerPasswordAccessToken = (params, pinsSettingsList, context)=>new OAuth2Service().resourceOwnerPasswordAccessToken(params, pinsSettingsList, context);
64
+ const resourceOwnerPasswordCreateToken = (params, pinsSettingsList, context)=>new OAuth2Service().resourceOwnerPasswordCreateToken(params, pinsSettingsList, context);
65
+ const clientCredentialsAccessToken = (params, pinsSettingsList, context)=>new OAuth2Service().clientCredentialsAccessToken(params, pinsSettingsList, context);
66
+ const clientCredentialsCreateToken = (params, pinsSettingsList, context)=>new OAuth2Service().clientCredentialsCreateToken(params, pinsSettingsList, context);
67
+ const tokenExpired = (params, pinsSettingsList, context)=>new OAuth2Service().tokenExpired(params, pinsSettingsList, context);
68
+ const tokenRefresh = (params, pinsSettingsList, context)=>new OAuth2Service().tokenRefresh(params, pinsSettingsList, context);
69
+ const tokenRevoke = (params, pinsSettingsList, context)=>new OAuth2Service().tokenRevoke(params, pinsSettingsList, context);
70
+ const tokenRevokeAll = (params, pinsSettingsList, context)=>new OAuth2Service().tokenRevokeAll(params, pinsSettingsList, context);
71
+
72
+ exports.authorizationCodeAccessTocken = authorizationCodeAccessTocken;
73
+ exports.authorizationCodeCreateToken = authorizationCodeCreateToken;
74
+ exports.authorizationCodeUrl = authorizationCodeUrl;
75
+ exports.clientCredentialsAccessToken = clientCredentialsAccessToken;
76
+ exports.clientCredentialsCreateToken = clientCredentialsCreateToken;
77
+ exports.resourceOwnerPasswordAccessToken = resourceOwnerPasswordAccessToken;
78
+ exports.resourceOwnerPasswordCreateToken = resourceOwnerPasswordCreateToken;
79
+ exports.tokenExpired = tokenExpired;
80
+ exports.tokenRefresh = tokenRefresh;
81
+ exports.tokenRevoke = tokenRevoke;
82
+ exports.tokenRevokeAll = tokenRevokeAll;
package/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './libs/skill-oauth2/src/index';
package/index.esm.js ADDED
@@ -0,0 +1,68 @@
1
+ import { AuthorizationCode, ResourceOwnerPassword, ClientCredentials } from 'simple-oauth2';
2
+
3
+ let OAuth2Service = class OAuth2Service {
4
+ async authorizationCodeUrl(params, _pinsSettingsList, _context) {
5
+ const { config } = params;
6
+ const clent = new AuthorizationCode(config);
7
+ return clent.authorizeURL(config);
8
+ }
9
+ async authorizationCodeAccessToken(params, _pinsSettingsList, _context) {
10
+ const { config, tokenParams } = params;
11
+ const clent = new AuthorizationCode(config);
12
+ return clent.getToken(tokenParams);
13
+ }
14
+ async authorizationCodeCreateToken(params, _pinsSettingsList, _context) {
15
+ const { config, accessToken } = params;
16
+ const clent = new AuthorizationCode(config);
17
+ return clent.createToken(accessToken);
18
+ }
19
+ async resourceOwnerPasswordAccessToken(params, _pinsSettingsList, _context) {
20
+ const { config, tokenParams } = params;
21
+ const clent = new ResourceOwnerPassword(config);
22
+ return clent.getToken(tokenParams);
23
+ }
24
+ async resourceOwnerPasswordCreateToken(params, _pinsSettingsList, _context) {
25
+ const { config, accessToken } = params;
26
+ const clent = new ResourceOwnerPassword(config);
27
+ return clent.createToken(accessToken);
28
+ }
29
+ async clientCredentialsAccessToken(params, _pinsSettingsList, _context) {
30
+ const { config, tokenParams } = params;
31
+ const clent = new ClientCredentials(config);
32
+ return clent.getToken(tokenParams);
33
+ }
34
+ async clientCredentialsCreateToken(params, _pinsSettingsList, _context) {
35
+ const { config, accessToken } = params;
36
+ const clent = new ClientCredentials(config);
37
+ return clent.createToken(accessToken);
38
+ }
39
+ async tokenExpired(params, _pinsSettingsList, _context) {
40
+ const { token } = params;
41
+ return token.expired();
42
+ }
43
+ async tokenRefresh(params, _pinsSettingsList, _context) {
44
+ const { token } = params;
45
+ return token.refresh();
46
+ }
47
+ async tokenRevoke(params, _pinsSettingsList, _context) {
48
+ const { token, type } = params;
49
+ return token.revoke(type);
50
+ }
51
+ async tokenRevokeAll(params, _pinsSettingsList, _context) {
52
+ const { token } = params;
53
+ return token.revokeAll();
54
+ }
55
+ };
56
+ const authorizationCodeUrl = (params, pinsSettingsList, context)=>new OAuth2Service().authorizationCodeUrl(params, pinsSettingsList, context);
57
+ const authorizationCodeAccessTocken = (params, pinsSettingsList, context)=>new OAuth2Service().authorizationCodeAccessToken(params, pinsSettingsList, context);
58
+ const authorizationCodeCreateToken = (params, pinsSettingsList, context)=>new OAuth2Service().authorizationCodeCreateToken(params, pinsSettingsList, context);
59
+ const resourceOwnerPasswordAccessToken = (params, pinsSettingsList, context)=>new OAuth2Service().resourceOwnerPasswordAccessToken(params, pinsSettingsList, context);
60
+ const resourceOwnerPasswordCreateToken = (params, pinsSettingsList, context)=>new OAuth2Service().resourceOwnerPasswordCreateToken(params, pinsSettingsList, context);
61
+ const clientCredentialsAccessToken = (params, pinsSettingsList, context)=>new OAuth2Service().clientCredentialsAccessToken(params, pinsSettingsList, context);
62
+ const clientCredentialsCreateToken = (params, pinsSettingsList, context)=>new OAuth2Service().clientCredentialsCreateToken(params, pinsSettingsList, context);
63
+ const tokenExpired = (params, pinsSettingsList, context)=>new OAuth2Service().tokenExpired(params, pinsSettingsList, context);
64
+ const tokenRefresh = (params, pinsSettingsList, context)=>new OAuth2Service().tokenRefresh(params, pinsSettingsList, context);
65
+ const tokenRevoke = (params, pinsSettingsList, context)=>new OAuth2Service().tokenRevoke(params, pinsSettingsList, context);
66
+ const tokenRevokeAll = (params, pinsSettingsList, context)=>new OAuth2Service().tokenRevokeAll(params, pinsSettingsList, context);
67
+
68
+ export { authorizationCodeAccessTocken, authorizationCodeCreateToken, authorizationCodeUrl, clientCredentialsAccessToken, clientCredentialsCreateToken, resourceOwnerPasswordAccessToken, resourceOwnerPasswordCreateToken, tokenExpired, tokenRefresh, tokenRevoke, tokenRevokeAll };
package/package.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "@digipair/skill-oauth2",
3
+ "version": "0.52.0",
4
+ "dependencies": {
5
+ "simple-oauth2": "^5.1.0"
6
+ },
7
+ "main": "./index.cjs.js",
8
+ "module": "./index.esm.js"
9
+ }
package/schema.fr.json ADDED
@@ -0,0 +1,277 @@
1
+ {
2
+ "openapi": "3.0.0",
3
+ "info": {
4
+ "title": "@digipair/skill-oauth2",
5
+ "summary": "Gestion des autorisations OAuth2",
6
+ "description": "Cette compétence permet de gérer les autorisations OAuth2",
7
+ "version": "0.1.0",
8
+ "x-icon": "🔐"
9
+ },
10
+ "paths": {
11
+ "/authorizationCodeUrl": {
12
+ "post": {
13
+ "tags": ["service"],
14
+ "summary": "Récupère l'URL OAuth2 Authorization Code",
15
+ "parameters": [
16
+ {
17
+ "name": "config",
18
+ "summary": "Configuration",
19
+ "required": true,
20
+ "description": "Configuration OAuth2",
21
+ "schema": {
22
+ "type": "object"
23
+ }
24
+ }
25
+ ],
26
+ "x-events": []
27
+ }
28
+ },
29
+ "/authorizationCodeAccessToken": {
30
+ "post": {
31
+ "tags": ["service"],
32
+ "summary": "Récupère le token OAuth2 Authorization Code",
33
+ "parameters": [
34
+ {
35
+ "name": "config",
36
+ "summary": "Configuration",
37
+ "required": true,
38
+ "description": "Configuration OAuth2",
39
+ "schema": {
40
+ "type": "object"
41
+ }
42
+ },
43
+ {
44
+ "name": "tokenParams",
45
+ "summary": "Paramètres du token",
46
+ "required": true,
47
+ "description": "Paramètres du token",
48
+ "schema": {
49
+ "type": "object"
50
+ }
51
+ }
52
+ ],
53
+ "x-events": []
54
+ }
55
+ },
56
+ "/authorizationCodeCreateToken": {
57
+ "post": {
58
+ "tags": ["service"],
59
+ "summary": "Crée un token OAuth2 Authorization Code",
60
+ "parameters": [
61
+ {
62
+ "name": "config",
63
+ "summary": "Configuration",
64
+ "required": true,
65
+ "description": "Configuration OAuth2",
66
+ "schema": {
67
+ "type": "object"
68
+ }
69
+ },
70
+ {
71
+ "name": "accessToken",
72
+ "summary": "Token d'accès",
73
+ "required": true,
74
+ "description": "Token d'accès",
75
+ "schema": {
76
+ "type": "object"
77
+ }
78
+ }
79
+ ],
80
+ "x-events": []
81
+ }
82
+ },
83
+ "/resourceOwnerPasswordAccessToken": {
84
+ "post": {
85
+ "tags": ["service"],
86
+ "summary": "Récupère le token OAuth2 Resource Owner Password",
87
+ "parameters": [
88
+ {
89
+ "name": "config",
90
+ "summary": "Configuration",
91
+ "required": true,
92
+ "description": "Configuration OAuth2",
93
+ "schema": {
94
+ "type": "object"
95
+ }
96
+ },
97
+ {
98
+ "name": "tokenParams",
99
+ "summary": "Paramètres du token",
100
+ "required": true,
101
+ "description": "Paramètres du token",
102
+ "schema": {
103
+ "type": "object"
104
+ }
105
+ }
106
+ ],
107
+ "x-events": []
108
+ }
109
+ },
110
+ "/resourceOwnerPasswordCreateToken": {
111
+ "post": {
112
+ "tags": ["service"],
113
+ "summary": "Crée un token OAuth2 Resource Owner Password",
114
+ "parameters": [
115
+ {
116
+ "name": "config",
117
+ "summary": "Configuration",
118
+ "required": true,
119
+ "description": "Configuration OAuth2",
120
+ "schema": {
121
+ "type": "object"
122
+ }
123
+ },
124
+ {
125
+ "name": "accessToken",
126
+ "summary": "Token d'accès",
127
+ "required": true,
128
+ "description": "Token d'accès",
129
+ "schema": {
130
+ "type": "object"
131
+ }
132
+ }
133
+ ],
134
+ "x-events": []
135
+ }
136
+ },
137
+ "/clientCredentialsAccessToken": {
138
+ "post": {
139
+ "tags": ["service"],
140
+ "summary": "Récupère le token OAuth2 Client Credentials",
141
+ "parameters": [
142
+ {
143
+ "name": "config",
144
+ "summary": "Configuration",
145
+ "required": true,
146
+ "description": "Configuration OAuth2",
147
+ "schema": {
148
+ "type": "object"
149
+ }
150
+ },
151
+ {
152
+ "name": "tokenParams",
153
+ "summary": "Paramètres du token",
154
+ "required": true,
155
+ "description": "Paramètres du token",
156
+ "schema": {
157
+ "type": "object"
158
+ }
159
+ }
160
+ ],
161
+ "x-events": []
162
+ }
163
+ },
164
+ "/clientCredentialsCreateToken": {
165
+ "post": {
166
+ "tags": ["service"],
167
+ "summary": "Crée un token OAuth2 Client Credentials",
168
+ "parameters": [
169
+ {
170
+ "name": "config",
171
+ "summary": "Configuration",
172
+ "required": true,
173
+ "description": "Configuration OAuth2",
174
+ "schema": {
175
+ "type": "object"
176
+ }
177
+ },
178
+ {
179
+ "name": "accessToken",
180
+ "summary": "Token d'accès",
181
+ "required": true,
182
+ "description": "Token d'accès",
183
+ "schema": {
184
+ "type": "object"
185
+ }
186
+ }
187
+ ],
188
+ "x-events": []
189
+ }
190
+ },
191
+ "/tokenExpired": {
192
+ "post": {
193
+ "tags": ["service"],
194
+ "summary": "Vérifie si le token est expiré",
195
+ "parameters": [
196
+ {
197
+ "name": "token",
198
+ "summary": "Token",
199
+ "required": true,
200
+ "description": "Token",
201
+ "schema": {
202
+ "type": "object"
203
+ }
204
+ }
205
+ ],
206
+ "x-events": []
207
+ }
208
+ },
209
+ "/tokenRefresh": {
210
+ "post": {
211
+ "tags": ["service"],
212
+ "summary": "Rafraîchit le token",
213
+ "parameters": [
214
+ {
215
+ "name": "token",
216
+ "summary": "Token",
217
+ "required": true,
218
+ "description": "Token",
219
+ "schema": {
220
+ "type": "object"
221
+ }
222
+ }
223
+ ],
224
+ "x-events": []
225
+ }
226
+ },
227
+ "/tokenRevoke": {
228
+ "post": {
229
+ "tags": ["service"],
230
+ "summary": "Révoque le token",
231
+ "parameters": [
232
+ {
233
+ "name": "token",
234
+ "summary": "Token",
235
+ "required": true,
236
+ "description": "Token",
237
+ "schema": {
238
+ "type": "object"
239
+ }
240
+ },
241
+ {
242
+ "name": "type",
243
+ "summary": "Type",
244
+ "required": true,
245
+ "description": "Type de révocation",
246
+ "schema": {
247
+ "type": "string"
248
+ }
249
+ }
250
+ ],
251
+ "x-events": []
252
+ }
253
+ },
254
+ "/tokenRevokeAll": {
255
+ "post": {
256
+ "tags": ["service"],
257
+ "summary": "Révoque tous les tokens",
258
+ "parameters": [
259
+ {
260
+ "name": "token",
261
+ "summary": "Token",
262
+ "required": true,
263
+ "description": "Token",
264
+ "schema": {
265
+ "type": "object"
266
+ }
267
+ }
268
+ ],
269
+ "x-events": []
270
+ }
271
+ }
272
+ },
273
+ "components": {
274
+ "schemas": {}
275
+ },
276
+ "x-scene-blocks": {}
277
+ }
package/schema.json ADDED
@@ -0,0 +1,277 @@
1
+ {
2
+ "openapi": "3.0.0",
3
+ "info": {
4
+ "title": "@digipair/skill-oauth2",
5
+ "summary": "OAuth2 Authorization Management",
6
+ "description": "This skill allows managing OAuth2 authorizations",
7
+ "version": "0.1.0",
8
+ "x-icon": "🔐"
9
+ },
10
+ "paths": {
11
+ "/authorizationCodeUrl": {
12
+ "post": {
13
+ "tags": ["service"],
14
+ "summary": "Retrieve OAuth2 Authorization Code URL",
15
+ "parameters": [
16
+ {
17
+ "name": "config",
18
+ "summary": "Configuration",
19
+ "required": true,
20
+ "description": "OAuth2 Configuration",
21
+ "schema": {
22
+ "type": "object"
23
+ }
24
+ }
25
+ ],
26
+ "x-events": []
27
+ }
28
+ },
29
+ "/authorizationCodeAccessToken": {
30
+ "post": {
31
+ "tags": ["service"],
32
+ "summary": "Retrieve OAuth2 Authorization Code Token",
33
+ "parameters": [
34
+ {
35
+ "name": "config",
36
+ "summary": "Configuration",
37
+ "required": true,
38
+ "description": "OAuth2 Configuration",
39
+ "schema": {
40
+ "type": "object"
41
+ }
42
+ },
43
+ {
44
+ "name": "tokenParams",
45
+ "summary": "Token Parameters",
46
+ "required": true,
47
+ "description": "Token Parameters",
48
+ "schema": {
49
+ "type": "object"
50
+ }
51
+ }
52
+ ],
53
+ "x-events": []
54
+ }
55
+ },
56
+ "/authorizationCodeCreateToken": {
57
+ "post": {
58
+ "tags": ["service"],
59
+ "summary": "Create OAuth2 Authorization Code Token",
60
+ "parameters": [
61
+ {
62
+ "name": "config",
63
+ "summary": "Configuration",
64
+ "required": true,
65
+ "description": "OAuth2 Configuration",
66
+ "schema": {
67
+ "type": "object"
68
+ }
69
+ },
70
+ {
71
+ "name": "accessToken",
72
+ "summary": "Access Token",
73
+ "required": true,
74
+ "description": "Access Token",
75
+ "schema": {
76
+ "type": "object"
77
+ }
78
+ }
79
+ ],
80
+ "x-events": []
81
+ }
82
+ },
83
+ "/resourceOwnerPasswordAccessToken": {
84
+ "post": {
85
+ "tags": ["service"],
86
+ "summary": "Retrieve OAuth2 Resource Owner Password Token",
87
+ "parameters": [
88
+ {
89
+ "name": "config",
90
+ "summary": "Configuration",
91
+ "required": true,
92
+ "description": "OAuth2 Configuration",
93
+ "schema": {
94
+ "type": "object"
95
+ }
96
+ },
97
+ {
98
+ "name": "tokenParams",
99
+ "summary": "Token Parameters",
100
+ "required": true,
101
+ "description": "Token Parameters",
102
+ "schema": {
103
+ "type": "object"
104
+ }
105
+ }
106
+ ],
107
+ "x-events": []
108
+ }
109
+ },
110
+ "/resourceOwnerPasswordCreateToken": {
111
+ "post": {
112
+ "tags": ["service"],
113
+ "summary": "Create OAuth2 Resource Owner Password Token",
114
+ "parameters": [
115
+ {
116
+ "name": "config",
117
+ "summary": "Configuration",
118
+ "required": true,
119
+ "description": "OAuth2 Configuration",
120
+ "schema": {
121
+ "type": "object"
122
+ }
123
+ },
124
+ {
125
+ "name": "accessToken",
126
+ "summary": "Access Token",
127
+ "required": true,
128
+ "description": "Access Token",
129
+ "schema": {
130
+ "type": "object"
131
+ }
132
+ }
133
+ ],
134
+ "x-events": []
135
+ }
136
+ },
137
+ "/clientCredentialsAccessToken": {
138
+ "post": {
139
+ "tags": ["service"],
140
+ "summary": "Retrieve OAuth2 Client Credentials Token",
141
+ "parameters": [
142
+ {
143
+ "name": "config",
144
+ "summary": "Configuration",
145
+ "required": true,
146
+ "description": "OAuth2 Configuration",
147
+ "schema": {
148
+ "type": "object"
149
+ }
150
+ },
151
+ {
152
+ "name": "tokenParams",
153
+ "summary": "Token Parameters",
154
+ "required": true,
155
+ "description": "Token Parameters",
156
+ "schema": {
157
+ "type": "object"
158
+ }
159
+ }
160
+ ],
161
+ "x-events": []
162
+ }
163
+ },
164
+ "/clientCredentialsCreateToken": {
165
+ "post": {
166
+ "tags": ["service"],
167
+ "summary": "Create OAuth2 Client Credentials Token",
168
+ "parameters": [
169
+ {
170
+ "name": "config",
171
+ "summary": "Configuration",
172
+ "required": true,
173
+ "description": "OAuth2 Configuration",
174
+ "schema": {
175
+ "type": "object"
176
+ }
177
+ },
178
+ {
179
+ "name": "accessToken",
180
+ "summary": "Access Token",
181
+ "required": true,
182
+ "description": "Access Token",
183
+ "schema": {
184
+ "type": "object"
185
+ }
186
+ }
187
+ ],
188
+ "x-events": []
189
+ }
190
+ },
191
+ "/tokenExpired": {
192
+ "post": {
193
+ "tags": ["service"],
194
+ "summary": "Check if the token is expired",
195
+ "parameters": [
196
+ {
197
+ "name": "token",
198
+ "summary": "Token",
199
+ "required": true,
200
+ "description": "Token",
201
+ "schema": {
202
+ "type": "object"
203
+ }
204
+ }
205
+ ],
206
+ "x-events": []
207
+ }
208
+ },
209
+ "/tokenRefresh": {
210
+ "post": {
211
+ "tags": ["service"],
212
+ "summary": "Refresh the token",
213
+ "parameters": [
214
+ {
215
+ "name": "token",
216
+ "summary": "Token",
217
+ "required": true,
218
+ "description": "Token",
219
+ "schema": {
220
+ "type": "object"
221
+ }
222
+ }
223
+ ],
224
+ "x-events": []
225
+ }
226
+ },
227
+ "/tokenRevoke": {
228
+ "post": {
229
+ "tags": ["service"],
230
+ "summary": "Revoke the token",
231
+ "parameters": [
232
+ {
233
+ "name": "token",
234
+ "summary": "Token",
235
+ "required": true,
236
+ "description": "Token",
237
+ "schema": {
238
+ "type": "object"
239
+ }
240
+ },
241
+ {
242
+ "name": "type",
243
+ "summary": "Type",
244
+ "required": true,
245
+ "description": "Revocation Type",
246
+ "schema": {
247
+ "type": "string"
248
+ }
249
+ }
250
+ ],
251
+ "x-events": []
252
+ }
253
+ },
254
+ "/tokenRevokeAll": {
255
+ "post": {
256
+ "tags": ["service"],
257
+ "summary": "Revoke all tokens",
258
+ "parameters": [
259
+ {
260
+ "name": "token",
261
+ "summary": "Token",
262
+ "required": true,
263
+ "description": "Token",
264
+ "schema": {
265
+ "type": "object"
266
+ }
267
+ }
268
+ ],
269
+ "x-events": []
270
+ }
271
+ }
272
+ },
273
+ "components": {
274
+ "schemas": {}
275
+ },
276
+ "x-scene-blocks": {}
277
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './lib/skill-oauth2';
@@ -0,0 +1,12 @@
1
+ import { PinsSettings } from '@digipair/engine';
2
+ export declare const authorizationCodeUrl: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
3
+ export declare const authorizationCodeAccessTocken: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
4
+ export declare const authorizationCodeCreateToken: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
5
+ export declare const resourceOwnerPasswordAccessToken: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
6
+ export declare const resourceOwnerPasswordCreateToken: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
7
+ export declare const clientCredentialsAccessToken: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
8
+ export declare const clientCredentialsCreateToken: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
9
+ export declare const tokenExpired: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
10
+ export declare const tokenRefresh: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
11
+ export declare const tokenRevoke: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
12
+ export declare const tokenRevokeAll: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;