@ezeep/ezeep-js 1.0.209 → 1.0.210
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/dist/cjs/ezp-auth_14.cjs.entry.js +20 -1
- package/dist/collection/components/ezp-printing/ezp-printing.js +3 -1
- package/dist/collection/services/auth.js +17 -0
- package/dist/custom-elements/index.js +20 -1
- package/dist/esm/ezp-auth_14.entry.js +20 -1
- package/dist/esm-es5/ezp-auth_14.entry.js +2 -2
- package/dist/ezeep/ezeep.esm.js +1 -1
- package/dist/ezeep/p-16c7584d.system.js +1 -1
- package/dist/ezeep/{p-e36b0952.entry.js → p-187ecafb.entry.js} +2 -2
- package/dist/ezeep/{p-874fb948.system.entry.js → p-c11aea98.system.entry.js} +3 -3
- package/dist/types/services/auth.d.ts +1 -0
- package/package.json +1 -1
- package/www/build/ezeep.esm.js +1 -1
- package/www/build/p-16c7584d.system.js +1 -1
- package/www/build/{p-e36b0952.entry.js → p-187ecafb.entry.js} +2 -2
- package/www/build/{p-874fb948.system.entry.js → p-c11aea98.system.entry.js} +3 -3
|
@@ -3146,6 +3146,23 @@ class EzpAuthorizationService {
|
|
|
3146
3146
|
}
|
|
3147
3147
|
});
|
|
3148
3148
|
}
|
|
3149
|
+
revokeRefreshToken() {
|
|
3150
|
+
fetch(`https://${this.oauthUrl}/oauth/revoke/`, {
|
|
3151
|
+
credentials: 'include',
|
|
3152
|
+
headers: {
|
|
3153
|
+
Authorization: 'Basic ' + btoa(this.clientID + ':'),
|
|
3154
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
3155
|
+
},
|
|
3156
|
+
method: 'POST',
|
|
3157
|
+
body: encodeFormData({
|
|
3158
|
+
token: authStore.state.accessToken,
|
|
3159
|
+
}),
|
|
3160
|
+
}).then((response) => {
|
|
3161
|
+
console.log(response);
|
|
3162
|
+
}).catch((error) => {
|
|
3163
|
+
console.log(error);
|
|
3164
|
+
});
|
|
3165
|
+
}
|
|
3149
3166
|
}
|
|
3150
3167
|
const authStore = createStore({
|
|
3151
3168
|
code: '',
|
|
@@ -33209,6 +33226,8 @@ let EzpPrinting = class {
|
|
|
33209
33226
|
}
|
|
33210
33227
|
}
|
|
33211
33228
|
async logOut() {
|
|
33229
|
+
//implement once live
|
|
33230
|
+
//this.auth.revokeRefreshToken()
|
|
33212
33231
|
localStorage.removeItem('properties');
|
|
33213
33232
|
localStorage.removeItem('refreshToken');
|
|
33214
33233
|
localStorage.removeItem('access_token');
|
|
@@ -33229,7 +33248,6 @@ let EzpPrinting = class {
|
|
|
33229
33248
|
}
|
|
33230
33249
|
}
|
|
33231
33250
|
async getAuthUri() {
|
|
33232
|
-
this.auth = new EzpAuthorizationService(this.redirecturi, this.clientid);
|
|
33233
33251
|
this.auth.generateCodeVerifier();
|
|
33234
33252
|
await this.auth.generateCodeChallenge(authStore.state.codeVerifier);
|
|
33235
33253
|
this.auth.buildAuthURI();
|
|
@@ -33289,6 +33307,7 @@ let EzpPrinting = class {
|
|
|
33289
33307
|
else {
|
|
33290
33308
|
printStore.state.printApiHostUrl = config.printingApiHostUrl;
|
|
33291
33309
|
}
|
|
33310
|
+
this.auth = new EzpAuthorizationService(this.redirecturi, this.clientid);
|
|
33292
33311
|
sendCodeToParentWindow();
|
|
33293
33312
|
initi18n(this.language);
|
|
33294
33313
|
this.checkAuth();
|
|
@@ -110,6 +110,8 @@ export class EzpPrinting {
|
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
async logOut() {
|
|
113
|
+
//implement once live
|
|
114
|
+
//this.auth.revokeRefreshToken()
|
|
113
115
|
localStorage.removeItem('properties');
|
|
114
116
|
localStorage.removeItem('refreshToken');
|
|
115
117
|
localStorage.removeItem('access_token');
|
|
@@ -130,7 +132,6 @@ export class EzpPrinting {
|
|
|
130
132
|
}
|
|
131
133
|
}
|
|
132
134
|
async getAuthUri() {
|
|
133
|
-
this.auth = new EzpAuthorizationService(this.redirecturi, this.clientid);
|
|
134
135
|
this.auth.generateCodeVerifier();
|
|
135
136
|
await this.auth.generateCodeChallenge(authStore.state.codeVerifier);
|
|
136
137
|
this.auth.buildAuthURI();
|
|
@@ -190,6 +191,7 @@ export class EzpPrinting {
|
|
|
190
191
|
else {
|
|
191
192
|
printStore.state.printApiHostUrl = config.printingApiHostUrl;
|
|
192
193
|
}
|
|
194
|
+
this.auth = new EzpAuthorizationService(this.redirecturi, this.clientid);
|
|
193
195
|
sendCodeToParentWindow();
|
|
194
196
|
initi18n(this.language);
|
|
195
197
|
this.checkAuth();
|
|
@@ -99,6 +99,23 @@ export class EzpAuthorizationService {
|
|
|
99
99
|
}
|
|
100
100
|
});
|
|
101
101
|
}
|
|
102
|
+
revokeRefreshToken() {
|
|
103
|
+
fetch(`https://${this.oauthUrl}/oauth/revoke/`, {
|
|
104
|
+
credentials: 'include',
|
|
105
|
+
headers: {
|
|
106
|
+
Authorization: 'Basic ' + btoa(this.clientID + ':'),
|
|
107
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
108
|
+
},
|
|
109
|
+
method: 'POST',
|
|
110
|
+
body: encodeFormData({
|
|
111
|
+
token: authStore.state.accessToken,
|
|
112
|
+
}),
|
|
113
|
+
}).then((response) => {
|
|
114
|
+
console.log(response);
|
|
115
|
+
}).catch((error) => {
|
|
116
|
+
console.log(error);
|
|
117
|
+
});
|
|
118
|
+
}
|
|
102
119
|
}
|
|
103
120
|
const authStore = createStore({
|
|
104
121
|
code: '',
|
|
@@ -3155,6 +3155,23 @@ class EzpAuthorizationService {
|
|
|
3155
3155
|
}
|
|
3156
3156
|
});
|
|
3157
3157
|
}
|
|
3158
|
+
revokeRefreshToken() {
|
|
3159
|
+
fetch(`https://${this.oauthUrl}/oauth/revoke/`, {
|
|
3160
|
+
credentials: 'include',
|
|
3161
|
+
headers: {
|
|
3162
|
+
Authorization: 'Basic ' + btoa(this.clientID + ':'),
|
|
3163
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
3164
|
+
},
|
|
3165
|
+
method: 'POST',
|
|
3166
|
+
body: encodeFormData({
|
|
3167
|
+
token: authStore.state.accessToken,
|
|
3168
|
+
}),
|
|
3169
|
+
}).then((response) => {
|
|
3170
|
+
console.log(response);
|
|
3171
|
+
}).catch((error) => {
|
|
3172
|
+
console.log(error);
|
|
3173
|
+
});
|
|
3174
|
+
}
|
|
3158
3175
|
}
|
|
3159
3176
|
const authStore = createStore({
|
|
3160
3177
|
code: '',
|
|
@@ -33234,6 +33251,8 @@ let EzpPrinting$1 = class extends HTMLElement {
|
|
|
33234
33251
|
}
|
|
33235
33252
|
}
|
|
33236
33253
|
async logOut() {
|
|
33254
|
+
//implement once live
|
|
33255
|
+
//this.auth.revokeRefreshToken()
|
|
33237
33256
|
localStorage.removeItem('properties');
|
|
33238
33257
|
localStorage.removeItem('refreshToken');
|
|
33239
33258
|
localStorage.removeItem('access_token');
|
|
@@ -33254,7 +33273,6 @@ let EzpPrinting$1 = class extends HTMLElement {
|
|
|
33254
33273
|
}
|
|
33255
33274
|
}
|
|
33256
33275
|
async getAuthUri() {
|
|
33257
|
-
this.auth = new EzpAuthorizationService(this.redirecturi, this.clientid);
|
|
33258
33276
|
this.auth.generateCodeVerifier();
|
|
33259
33277
|
await this.auth.generateCodeChallenge(authStore.state.codeVerifier);
|
|
33260
33278
|
this.auth.buildAuthURI();
|
|
@@ -33314,6 +33332,7 @@ let EzpPrinting$1 = class extends HTMLElement {
|
|
|
33314
33332
|
else {
|
|
33315
33333
|
printStore.state.printApiHostUrl = config.printingApiHostUrl;
|
|
33316
33334
|
}
|
|
33335
|
+
this.auth = new EzpAuthorizationService(this.redirecturi, this.clientid);
|
|
33317
33336
|
sendCodeToParentWindow();
|
|
33318
33337
|
initi18n(this.language);
|
|
33319
33338
|
this.checkAuth();
|
|
@@ -3142,6 +3142,23 @@ class EzpAuthorizationService {
|
|
|
3142
3142
|
}
|
|
3143
3143
|
});
|
|
3144
3144
|
}
|
|
3145
|
+
revokeRefreshToken() {
|
|
3146
|
+
fetch(`https://${this.oauthUrl}/oauth/revoke/`, {
|
|
3147
|
+
credentials: 'include',
|
|
3148
|
+
headers: {
|
|
3149
|
+
Authorization: 'Basic ' + btoa(this.clientID + ':'),
|
|
3150
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
3151
|
+
},
|
|
3152
|
+
method: 'POST',
|
|
3153
|
+
body: encodeFormData({
|
|
3154
|
+
token: authStore.state.accessToken,
|
|
3155
|
+
}),
|
|
3156
|
+
}).then((response) => {
|
|
3157
|
+
console.log(response);
|
|
3158
|
+
}).catch((error) => {
|
|
3159
|
+
console.log(error);
|
|
3160
|
+
});
|
|
3161
|
+
}
|
|
3145
3162
|
}
|
|
3146
3163
|
const authStore = createStore({
|
|
3147
3164
|
code: '',
|
|
@@ -33205,6 +33222,8 @@ let EzpPrinting = class {
|
|
|
33205
33222
|
}
|
|
33206
33223
|
}
|
|
33207
33224
|
async logOut() {
|
|
33225
|
+
//implement once live
|
|
33226
|
+
//this.auth.revokeRefreshToken()
|
|
33208
33227
|
localStorage.removeItem('properties');
|
|
33209
33228
|
localStorage.removeItem('refreshToken');
|
|
33210
33229
|
localStorage.removeItem('access_token');
|
|
@@ -33225,7 +33244,6 @@ let EzpPrinting = class {
|
|
|
33225
33244
|
}
|
|
33226
33245
|
}
|
|
33227
33246
|
async getAuthUri() {
|
|
33228
|
-
this.auth = new EzpAuthorizationService(this.redirecturi, this.clientid);
|
|
33229
33247
|
this.auth.generateCodeVerifier();
|
|
33230
33248
|
await this.auth.generateCodeChallenge(authStore.state.codeVerifier);
|
|
33231
33249
|
this.auth.buildAuthURI();
|
|
@@ -33285,6 +33303,7 @@ let EzpPrinting = class {
|
|
|
33285
33303
|
else {
|
|
33286
33304
|
printStore.state.printApiHostUrl = config.printingApiHostUrl;
|
|
33287
33305
|
}
|
|
33306
|
+
this.auth = new EzpAuthorizationService(this.redirecturi, this.clientid);
|
|
33288
33307
|
sendCodeToParentWindow();
|
|
33289
33308
|
initi18n(this.language);
|
|
33290
33309
|
this.checkAuth();
|