@nakedcreativity/membrs-angular-helper 0.0.12 → 0.0.16

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.
Files changed (32) hide show
  1. package/README.md +1 -1
  2. package/bundles/nakedcreativity-membrs-angular-helper.umd.js +85 -258
  3. package/bundles/nakedcreativity-membrs-angular-helper.umd.js.map +1 -1
  4. package/bundles/nakedcreativity-membrs-angular-helper.umd.min.js +1 -15
  5. package/bundles/nakedcreativity-membrs-angular-helper.umd.min.js.map +1 -1
  6. package/esm2015/lib/auth.interceptor.js +22 -0
  7. package/esm2015/lib/config.interface.js +1 -1
  8. package/esm2015/lib/config.service.js +1 -1
  9. package/esm2015/lib/membrs.module.js +39 -24
  10. package/esm2015/lib/membrs.service.js +14 -20
  11. package/esm2015/lib/router.config.js +1 -1
  12. package/esm2015/lib/token.js +2 -1
  13. package/esm2015/nakedcreativity-membrs-angular-helper.js +1 -1
  14. package/esm2015/public-api.js +2 -4
  15. package/fesm2015/nakedcreativity-membrs-angular-helper.js +71 -42
  16. package/fesm2015/nakedcreativity-membrs-angular-helper.js.map +1 -1
  17. package/lib/auth.interceptor.d.ts +6 -0
  18. package/lib/membrs.module.d.ts +4 -0
  19. package/lib/membrs.service.d.ts +1 -3
  20. package/nakedcreativity-membrs-angular-helper.metadata.json +1 -1
  21. package/package.json +8 -8
  22. package/public-api.d.ts +1 -0
  23. package/esm5/lib/config.interface.js +0 -1
  24. package/esm5/lib/config.service.js +0 -7
  25. package/esm5/lib/membrs.module.js +0 -103
  26. package/esm5/lib/membrs.service.js +0 -116
  27. package/esm5/lib/router.config.js +0 -15
  28. package/esm5/lib/token.js +0 -4
  29. package/esm5/nakedcreativity-membrs-angular-helper.js +0 -6
  30. package/esm5/public-api.js +0 -7
  31. package/fesm5/nakedcreativity-membrs-angular-helper.js +0 -239
  32. package/fesm5/nakedcreativity-membrs-angular-helper.js.map +0 -1
@@ -1,239 +0,0 @@
1
- import { __decorate, __param, __metadata } from 'tslib';
2
- import { InjectionToken, Inject, ɵɵdefineInjectable, ɵɵinject, Injectable, NgModule } from '@angular/core';
3
- import { JwtHelperService, JwtModule } from '@auth0/angular-jwt';
4
- import { HttpClient, HttpClientModule } from '@angular/common/http';
5
- import { JwtHelperService as JwtHelperService$1 } from '@auth0/angular-jwt/src/jwthelper.service';
6
- import { CommonModule } from '@angular/common';
7
- import { Transition, UIRouter, UIRouterModule } from '@uirouter/angular';
8
-
9
- /**
10
- * This is not a real service, but it looks like it from the outside.
11
- * It's just an InjectionTToken used to import the config object, provided from the outside
12
- */
13
- var MembrsConfigService = new InjectionToken("MembrsConfig");
14
-
15
- var MembrsService = /** @class */ (function () {
16
- function MembrsService(jwtService, http, config) {
17
- this.jwtService = jwtService;
18
- this.http = http;
19
- this.config = config;
20
- this._lsKey = 'membrs';
21
- console.log('membrs constructor');
22
- // if the token exists in local storage, retrieve it back to the service
23
- if (localStorage.getItem(this._lsKey)) {
24
- this.token = localStorage.getItem(this._lsKey);
25
- }
26
- }
27
- MembrsService.prototype.reissue = function (token) {
28
- var _this = this;
29
- return new Promise(function (resolve, reject) {
30
- if (!token && !_this._token) {
31
- console.log('reject, not logged in');
32
- reject('NOT_LOGGED_IN');
33
- }
34
- if (token)
35
- _this.token = token;
36
- // check stored token has not expired, or needs to be reissued soon
37
- var reissueIn = _this._decoded.exp - Math.floor(Date.now() / 1000);
38
- // token has expired
39
- if (reissueIn < 0) {
40
- reject('NOT_LOGGED_IN');
41
- }
42
- // token expiring soon
43
- if (reissueIn < 300) {
44
- console.log('expires less than 300');
45
- console.log(_this.config);
46
- _this.http.post(_this.config.apiProtocol + _this.config.api + '/token/' + _this._token, {}).subscribe(function (response) {
47
- console.log('reissue response');
48
- console.log(response);
49
- if (response.token) {
50
- _this.token = response.token;
51
- resolve(_this._token);
52
- }
53
- else {
54
- console.log('error');
55
- console.log(response);
56
- reject('NOT_LOGGED_IN');
57
- }
58
- }, function (error) {
59
- console.log(error);
60
- reject('NOT_LOGGED_IN');
61
- });
62
- }
63
- else {
64
- console.log('token ok');
65
- resolve(_this._token);
66
- }
67
- });
68
- };
69
- Object.defineProperty(MembrsService.prototype, "token", {
70
- set: function (token) {
71
- this._token = token;
72
- localStorage.setItem(this._lsKey, token);
73
- this._decoded = this.jwtService.decodeToken(this._token);
74
- },
75
- enumerable: true,
76
- configurable: true
77
- });
78
- Object.defineProperty(MembrsService.prototype, "profile", {
79
- get: function () {
80
- return this._decoded;
81
- },
82
- enumerable: true,
83
- configurable: true
84
- });
85
- Object.defineProperty(MembrsService.prototype, "admin", {
86
- get: function () {
87
- return this.profile.permission == 1;
88
- },
89
- enumerable: true,
90
- configurable: true
91
- });
92
- MembrsService.prototype.logout = function () {
93
- var _this = this;
94
- return new Promise(function (resolve, reject) {
95
- _this.http.get(_this.config.apiProtocol + _this.config.api + '/token/' + _this._token + '/delete', { responseType: 'text' }).subscribe(function (response) {
96
- _this._token = null;
97
- localStorage.removeItem(_this._lsKey);
98
- resolve(_this.config.login);
99
- //this.router.stateService.go('dashboard')
100
- }, function (error) {
101
- reject(_this.config.login);
102
- });
103
- });
104
- };
105
- MembrsService.ctorParameters = function () { return [
106
- { type: JwtHelperService },
107
- { type: HttpClient },
108
- { type: undefined, decorators: [{ type: Inject, args: [MembrsConfigService,] }] }
109
- ]; };
110
- MembrsService.ɵprov = ɵɵdefineInjectable({ factory: function MembrsService_Factory() { return new MembrsService(ɵɵinject(JwtHelperService$1), ɵɵinject(HttpClient), ɵɵinject(MembrsConfigService)); }, token: MembrsService, providedIn: "root" });
111
- MembrsService = __decorate([
112
- Injectable({
113
- providedIn: 'root'
114
- }),
115
- __param(2, Inject(MembrsConfigService)),
116
- __metadata("design:paramtypes", [JwtHelperService, HttpClient, Object])
117
- ], MembrsService);
118
- return MembrsService;
119
- }());
120
-
121
- function routerConfigFn(router, injector) {
122
- var transitionService = router.transitionService;
123
- var stateService = router.stateService;
124
- var config = injector.get(MembrsConfigService);
125
- stateService.defaultErrorHandler(function (error) {
126
- console.log('Default error handler - Membrs Angular Helper');
127
- console.log(error);
128
- if (error.detail == 'NOT_LOGGED_IN')
129
- window.location.href = config.login;
130
- if (error.detail == 'INSUFFICIENT_PERMISSIONS')
131
- stateService.go(config.defaultState);
132
- });
133
- }
134
-
135
- function retrieveToken() {
136
- return localStorage.getItem('membrs');
137
- }
138
-
139
- var validateResolve = {
140
- token: 'reissue',
141
- deps: [Transition, UIRouter, MembrsService, MembrsConfigService],
142
- resolveFn: validateResolveFn
143
- };
144
- var reissueResolve = {
145
- token: 'reissue',
146
- deps: [Transition, UIRouter, MembrsService, MembrsConfigService],
147
- resolveFn: reissueResolveFn
148
- };
149
- var reissueState = {
150
- name: 'reissue',
151
- url: '/reissue?token',
152
- views: {},
153
- resolve: [
154
- reissueResolve
155
- ]
156
- };
157
- function reissueResolveFn(transition, router, membrsService, membrsConfig) {
158
- //console.log(membrsService)
159
- return new Promise(function (resolve, reject) {
160
- console.log('reissue promise resolve');
161
- console.log(transition.params().token);
162
- membrsService.reissue(transition.params().token).then(function (response) {
163
- console.log('redirect to default state');
164
- router.stateService.go(membrsConfig.defaultState, {}, { inherit: false });
165
- reject();
166
- }).catch(function (error) {
167
- console.log('error in reissue resolve');
168
- console.log(error);
169
- //window.location.href = environment.login
170
- reject(error);
171
- });
172
- });
173
- }
174
- function validateResolveFn(transition, router, membrsService, membrsConfig) {
175
- //console.log(membrsService)
176
- return new Promise(function (resolve, reject) {
177
- console.log('validate promise resolve');
178
- membrsService.reissue().then(function (response) {
179
- resolve();
180
- }).catch(function (error) {
181
- window.location.href = membrsConfig.login;
182
- //reject(error)
183
- });
184
- });
185
- }
186
- /** The top level state(s) */
187
- var STATES = [
188
- reissueState
189
- ];
190
- var MembrsModule = /** @class */ (function () {
191
- function MembrsModule() {
192
- }
193
- MembrsModule_1 = MembrsModule;
194
- MembrsModule.forRoot = function (config) {
195
- var moduleProviders = UIRouterModule.forChild({
196
- states: STATES,
197
- config: routerConfigFn
198
- }).providers;
199
- moduleProviders.push(JwtModule.forRoot({
200
- config: {
201
- tokenGetter: retrieveToken,
202
- whitelistedDomains: []
203
- }
204
- }).providers);
205
- moduleProviders.push(MembrsService);
206
- moduleProviders.push({ provide: MembrsConfigService, useValue: config });
207
- return {
208
- ngModule: MembrsModule_1,
209
- providers: [{ provide: MembrsConfigService, useValue: config }]
210
- };
211
- };
212
- var MembrsModule_1;
213
- MembrsModule = MembrsModule_1 = __decorate([
214
- NgModule({
215
- imports: [
216
- CommonModule,
217
- HttpClientModule,
218
- JwtModule
219
- // UIRouterModule.forChild({
220
- // states: STATES,
221
- // config: routerConfigFn,
222
- // }),
223
- // JwtModule.forRoot({})
224
- ]
225
- })
226
- ], MembrsModule);
227
- return MembrsModule;
228
- }());
229
-
230
- /*
231
- * Public API Surface of membrs
232
- */
233
-
234
- /**
235
- * Generated bundle index. Do not edit.
236
- */
237
-
238
- export { MembrsModule, MembrsService, STATES, reissueResolve, reissueResolveFn, reissueState, retrieveToken, validateResolve, validateResolveFn, MembrsConfigService as ɵa };
239
- //# sourceMappingURL=nakedcreativity-membrs-angular-helper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"nakedcreativity-membrs-angular-helper.js","sources":["ng://@nakedcreativity/membrs-angular-helper/lib/config.service.ts","ng://@nakedcreativity/membrs-angular-helper/lib/membrs.service.ts","ng://@nakedcreativity/membrs-angular-helper/lib/router.config.ts","ng://@nakedcreativity/membrs-angular-helper/lib/token.ts","ng://@nakedcreativity/membrs-angular-helper/lib/membrs.module.ts","ng://@nakedcreativity/membrs-angular-helper/public-api.ts","ng://@nakedcreativity/membrs-angular-helper/nakedcreativity-membrs-angular-helper.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { MembrsConfig } from './config.interface';\n\n/**\n * This is not a real service, but it looks like it from the outside.\n * It's just an InjectionTToken used to import the config object, provided from the outside\n */\nexport const MembrsConfigService = new InjectionToken<MembrsConfig>(\"MembrsConfig\");\n","import { Injectable, Inject } from '@angular/core';\nimport { JwtHelperService } from '@auth0/angular-jwt';\nimport { HttpClient } from '@angular/common/http'\nimport { MembrsConfigService } from './config.service'\nimport { MembrsConfig } from './config.interface';\n\n@Injectable({\n providedIn: 'root'\n})\n\nexport class MembrsService {\n\n _token: string;\n _decoded: any;\n _lsKey: string = 'membrs';\n\n constructor(private jwtService: JwtHelperService, private http: HttpClient, @Inject(MembrsConfigService) private config: MembrsConfig) {\n\n console.log('membrs constructor')\n // if the token exists in local storage, retrieve it back to the service\n if(localStorage.getItem(this._lsKey)){\n this.token = localStorage.getItem(this._lsKey)\n }\n \n }\n\n reissue(token?:string){\n\n return new Promise((resolve, reject)=>{\n\n if(!token && !this._token){\n console.log('reject, not logged in')\n reject('NOT_LOGGED_IN')\n }\n\n if(token)\n this.token = token\n\n // check stored token has not expired, or needs to be reissued soon\n var reissueIn = this._decoded.exp - Math.floor(Date.now()/1000)\n \n // token has expired\n if(reissueIn < 0){\n reject('NOT_LOGGED_IN')\n }\n \n // token expiring soon\n if(reissueIn < 300){\n \n console.log('expires less than 300')\n \n \n console.log(this.config)\n\n this.http.post(this.config.apiProtocol + this.config.api+'/token/'+this._token, {}).subscribe((response:any)=>{\n console.log('reissue response')\n console.log(response)\n if(response.token){\n this.token = response.token\n resolve(this._token)\n }else {\n console.log('error')\n console.log(response)\n reject('NOT_LOGGED_IN')\n }\n \n }, error=>{\n console.log(error)\n reject('NOT_LOGGED_IN')\n })\n\n }else {\n console.log('token ok')\n resolve(this._token)\n }\n \n })\n \n }\n\n set token(token){\n this._token = token\n localStorage.setItem(this._lsKey, token)\n this._decoded = this.jwtService.decodeToken(this._token)\n }\n\n get profile(){\n return this._decoded\n }\n\n get admin (){\n return this.profile.permission == 1\n }\n\n logout(){\n return new Promise((resolve, reject)=>{\n this.http.get(this.config.apiProtocol+this.config.api+'/token/'+this._token+'/delete', {responseType: 'text'}).subscribe((response:any)=>{\n this._token = null;\n localStorage.removeItem(this._lsKey)\n resolve(this.config.login)\n //this.router.stateService.go('dashboard')\n }, error=>{\n reject(this.config.login)\n })\n })\n \n }\n\n\n}\n","import { UIRouter } from '@uirouter/core';\nimport { MembrsConfigService } from './config.service'\nimport { MembrsConfig } from './config.interface';\nimport { Injector } from '@angular/core';\n\nexport function routerConfigFn(router: UIRouter, injector: Injector) {\n\n const transitionService = router.transitionService;\n const stateService = router.stateService\n const config:MembrsConfig = injector.get(MembrsConfigService)\n\n \tstateService.defaultErrorHandler(function(error) {\n\t\t \n\t\tconsole.log('Default error handler - Membrs Angular Helper')\n\t\tconsole.log(error)\n\t\t\t\n\t\tif(error.detail == 'NOT_LOGGED_IN')\n\t\t\twindow.location.href = config.login;\n\n\t\tif(error.detail == 'INSUFFICIENT_PERMISSIONS')\n\t\t\tstateService.go(config.defaultState)\n\n\t});\n\t\n}","export function retrieveToken() {\n return localStorage.getItem('membrs');\n}","import { NgModule, ModuleWithProviders, Injector } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MembrsService } from './membrs.service';\nimport { JwtModule } from \"@auth0/angular-jwt\";\nimport { HttpClientModule } from \"@angular/common/http\";\nimport { UIRouterModule } from '@uirouter/angular'\n\nimport { Ng2StateDeclaration } from '@uirouter/angular';\nimport { Transition, UIRouter } from '@uirouter/angular'\n\nimport { routerConfigFn } from './router.config';\nimport { MembrsConfig } from './config.interface';\nimport { MembrsConfigService } from './config.service';\nimport { retrieveToken } from './token';\n\nexport const validateResolve = {\n token: 'reissue',\n deps: [ Transition, UIRouter, MembrsService, MembrsConfigService ],\n resolveFn: validateResolveFn\n}\n\nexport const reissueResolve = {\n token: 'reissue',\n deps: [ Transition, UIRouter, MembrsService, MembrsConfigService ],\n resolveFn: reissueResolveFn\n}\n\nexport const reissueState:Ng2StateDeclaration = {\n\tname: 'reissue', \n\turl: '/reissue?token',\n\tviews: { },\n\tresolve: [\n reissueResolve\n\t]\n}\n\nexport function reissueResolveFn(transition, router, membrsService, membrsConfig:MembrsConfig) {\n \n //console.log(membrsService)\n return new Promise((resolve, reject) => {\n console.log('reissue promise resolve')\n console.log(transition.params().token)\n membrsService.reissue(transition.params().token).then((response)=>{\n console.log('redirect to default state')\n router.stateService.go(membrsConfig.defaultState, {}, {inherit:false})\n reject()\n }).catch(error=>{\n console.log('error in reissue resolve')\n console.log(error)\n //window.location.href = environment.login\n reject(error)\n })\n\n\t})\n}\n\nexport function validateResolveFn(transition, router, membrsService, membrsConfig:MembrsConfig) {\n \n //console.log(membrsService)\n return new Promise((resolve, reject) => {\n console.log('validate promise resolve')\n \n membrsService.reissue().then((response)=>{\n resolve()\n }).catch(error=>{\n window.location.href = membrsConfig.login\n //reject(error)\n })\n\n})\n}\n\n\n/** The top level state(s) */\nexport const STATES = [\n reissueState\n]\n\n\n@NgModule({\n imports: [\n CommonModule,\n HttpClientModule,\n JwtModule\n // UIRouterModule.forChild({\n // states: STATES,\n // config: routerConfigFn,\n // }),\n // JwtModule.forRoot({})\n ]\n})\n\n\n\nexport class MembrsModule { \n static forRoot(config: MembrsConfig): ModuleWithProviders<MembrsModule> {\n\n\n const moduleProviders = UIRouterModule.forChild({\n states: STATES,\n config: routerConfigFn\n }).providers\n\n moduleProviders.push(JwtModule.forRoot({\n config: {\n tokenGetter: retrieveToken,\n whitelistedDomains: []\n }\n }).providers)\n \n moduleProviders.push(MembrsService)\n moduleProviders.push({provide: MembrsConfigService,useValue: config});\n return {\n ngModule: MembrsModule, \n providers: [{provide: MembrsConfigService,useValue: config}]\n };\n \n }\n\n}\n","/*\n * Public API Surface of membrs\n */\n\nexport * from './lib/membrs.service';\nexport * from './lib/membrs.module';\nexport * from './lib/token'","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {MembrsConfig as ɵb} from './lib/config.interface';\nexport {MembrsConfigService as ɵa} from './lib/config.service';"],"names":[],"mappings":";;;;;;;;AAGA;;;;IAIa,mBAAmB,GAAG,IAAI,cAAc,CAAe,cAAc;;;ICShF,uBAAoB,UAA4B,EAAU,IAAgB,EAAuC,MAAoB;QAAjH,eAA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