@sunbird-cb/utils 1.0.16 → 1.0.17
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/bundles/sunbird-cb-utils.umd.js +23 -27
- package/bundles/sunbird-cb-utils.umd.js.map +1 -1
- package/bundles/sunbird-cb-utils.umd.min.js +2 -2
- package/bundles/sunbird-cb-utils.umd.min.js.map +1 -1
- package/esm2015/lib/services/auth-keycloak.service.js +18 -19
- package/esm5/lib/services/auth-keycloak.service.js +23 -29
- package/fesm2015/sunbird-cb-utils.js +15 -14
- package/fesm2015/sunbird-cb-utils.js.map +1 -1
- package/fesm5/sunbird-cb-utils.js +20 -24
- package/fesm5/sunbird-cb-utils.js.map +1 -1
- package/lib/services/auth-keycloak.service.d.ts +1 -3
- package/package.json +1 -1
- package/sunbird-cb-utils.metadata.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/material/dialog'), require('@angular/material/snack-bar'), require('rxjs'), require('@angular/cdk/layout'), require('rxjs/operators'), require('@angular/common'), require('@angular/material'), require('ngx-image-cropper'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@sunbird-cb/utils', ['exports', '@angular/core', '@angular/material/dialog', '@angular/material/snack-bar', 'rxjs', '@angular/cdk/layout', 'rxjs/operators', '@angular/common', '@angular/material', 'ngx-image-cropper', '@angular/common/http', '
|
|
4
|
-
(global = global || self, factory((global['sunbird-cb'] = global['sunbird-cb'] || {}, global['sunbird-cb'].utils = {}), global.ng.core, global.ng.material.dialog, global.ng.material['snack-bar'], global.rxjs, global.ng.cdk.layout, global.rxjs.operators, global.ng.common, global.ng.material, global.ngxImageCropper, global
|
|
5
|
-
}(this, (function (exports, core, dialog, snackBar, rxjs, layout, operators, common, material, ngxImageCropper,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/material/dialog'), require('@angular/material/snack-bar'), require('rxjs'), require('@angular/cdk/layout'), require('rxjs/operators'), require('@angular/common'), require('@angular/material'), require('ngx-image-cropper'), require('keycloak-angular'), require('@angular/common/http'), require('@angular/cdk/platform'), require('@angular/router'), require('moment'), require('lodash'), require('@angular/platform-browser')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@sunbird-cb/utils', ['exports', '@angular/core', '@angular/material/dialog', '@angular/material/snack-bar', 'rxjs', '@angular/cdk/layout', 'rxjs/operators', '@angular/common', '@angular/material', 'ngx-image-cropper', 'keycloak-angular', '@angular/common/http', '@angular/cdk/platform', '@angular/router', 'moment', 'lodash', '@angular/platform-browser'], factory) :
|
|
4
|
+
(global = global || self, factory((global['sunbird-cb'] = global['sunbird-cb'] || {}, global['sunbird-cb'].utils = {}), global.ng.core, global.ng.material.dialog, global.ng.material['snack-bar'], global.rxjs, global.ng.cdk.layout, global.rxjs.operators, global.ng.common, global.ng.material, global.ngxImageCropper, global['keycloak-angular'], global.ng.common.http, global.ng.cdk.platform, global.ng.router, global.moment, global._, global.ng.platformBrowser));
|
|
5
|
+
}(this, (function (exports, core, dialog, snackBar, rxjs, layout, operators, common, material, ngxImageCropper, keycloakAngular, http, platform, router, _moment, lodash, platformBrowser) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/*! *****************************************************************************
|
|
8
8
|
Copyright (c) Microsoft Corporation.
|
|
@@ -2014,9 +2014,8 @@
|
|
|
2014
2014
|
var storage$1 = localStorage;
|
|
2015
2015
|
var storageKey$1 = 'kc';
|
|
2016
2016
|
var AuthKeycloakService = (function () {
|
|
2017
|
-
function AuthKeycloakService(
|
|
2017
|
+
function AuthKeycloakService(configSvc, keycloakSvc, msAuthSvc) {
|
|
2018
2018
|
var _this = this;
|
|
2019
|
-
this.http = http;
|
|
2020
2019
|
this.configSvc = configSvc;
|
|
2021
2020
|
this.keycloakSvc = keycloakSvc;
|
|
2022
2021
|
this.msAuthSvc = msAuthSvc;
|
|
@@ -2159,7 +2158,7 @@
|
|
|
2159
2158
|
if (_redirectUrl === void 0) { _redirectUrl = this.defaultRedirectUrl; }
|
|
2160
2159
|
return __awaiter(this, void 0, void 0, function () {
|
|
2161
2160
|
return __generator(this, function (_a) {
|
|
2162
|
-
window.location.href = _redirectUrl + "
|
|
2161
|
+
window.location.href = _redirectUrl + "public/logout";
|
|
2163
2162
|
return [2];
|
|
2164
2163
|
});
|
|
2165
2164
|
});
|
|
@@ -2167,24 +2166,23 @@
|
|
|
2167
2166
|
AuthKeycloakService.prototype.force_logout = function () {
|
|
2168
2167
|
return __awaiter(this, void 0, void 0, function () {
|
|
2169
2168
|
return __generator(this, function (_a) {
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
window.location.href = '/public/logout';
|
|
2183
|
-
return [4, this.http.get('/apis/reset').toPromise()];
|
|
2184
|
-
case 1:
|
|
2185
|
-
_a.sent();
|
|
2186
|
-
return [2];
|
|
2169
|
+
if (storage$1.getItem('telemetrySessionId')) {
|
|
2170
|
+
storage$1.removeItem('telemetrySessionId');
|
|
2171
|
+
}
|
|
2172
|
+
storage$1.removeItem(storageKey$1);
|
|
2173
|
+
if (localStorage.getItem('login') === 'true') {
|
|
2174
|
+
try {
|
|
2175
|
+
sessionStorage.clear();
|
|
2176
|
+
localStorage.clear();
|
|
2177
|
+
}
|
|
2178
|
+
catch (_b) {
|
|
2179
|
+
}
|
|
2180
|
+
window.location.href = this.defaultRedirectUrl + "apis/reset";
|
|
2187
2181
|
}
|
|
2182
|
+
else {
|
|
2183
|
+
window.location.href = this.defaultRedirectUrl + "public/logout";
|
|
2184
|
+
}
|
|
2185
|
+
return [2];
|
|
2188
2186
|
});
|
|
2189
2187
|
});
|
|
2190
2188
|
};
|
|
@@ -2296,17 +2294,15 @@
|
|
|
2296
2294
|
},] }
|
|
2297
2295
|
];
|
|
2298
2296
|
AuthKeycloakService.ctorParameters = function () { return [
|
|
2299
|
-
{ type: http.HttpClient },
|
|
2300
2297
|
{ type: ConfigurationsService },
|
|
2301
2298
|
{ type: keycloakAngular.KeycloakService },
|
|
2302
2299
|
{ type: AuthMicrosoftService }
|
|
2303
2300
|
]; };
|
|
2304
|
-
/** @nocollapse */ AuthKeycloakService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function AuthKeycloakService_Factory() { return new AuthKeycloakService(core.ɵɵinject(
|
|
2301
|
+
/** @nocollapse */ AuthKeycloakService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function AuthKeycloakService_Factory() { return new AuthKeycloakService(core.ɵɵinject(ConfigurationsService), core.ɵɵinject(keycloakAngular.KeycloakService), core.ɵɵinject(AuthMicrosoftService)); }, token: AuthKeycloakService, providedIn: "root" });
|
|
2305
2302
|
return AuthKeycloakService;
|
|
2306
2303
|
}());
|
|
2307
2304
|
if (false) {
|
|
2308
2305
|
AuthKeycloakService.prototype.loginChangeSubject;
|
|
2309
|
-
AuthKeycloakService.prototype.http;
|
|
2310
2306
|
AuthKeycloakService.prototype.configSvc;
|
|
2311
2307
|
AuthKeycloakService.prototype.keycloakSvc;
|
|
2312
2308
|
AuthKeycloakService.prototype.msAuthSvc;
|