@rxap/authentication 21.0.1-dev.0 → 21.0.1
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/CHANGELOG.md +20 -0
- package/compodoc/changelog.html +18 -0
- package/compodoc/dependencies.html +1 -1
- package/compodoc/directives/SignOutDirective.html +80 -163
- package/compodoc/injectables/AuthenticationRoutingService.html +10 -70
- package/compodoc/injectables/RxapAuthenticationGuard.html +13 -124
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/properties.html +1 -1
- package/docs/documentation.json +330 -525
- package/docs/html/assets/hierarchy.js +1 -1
- package/docs/html/assets/search.js +1 -1
- package/docs/html/classes/AuthenticationRoutingService.html +2 -2
- package/docs/html/classes/DisabledAuthenticationService.html +2 -2
- package/docs/html/classes/RegisterService.html +2 -2
- package/docs/html/classes/RxapAuthenticationGuard.html +2 -2
- package/docs/html/classes/RxapAuthenticationService.html +2 -2
- package/docs/html/classes/SignOutDirective.html +2 -2
- package/docs/html/enums/AuthenticationEventType.html +2 -2
- package/docs/html/functions/BearerTokenInterceptor.html +1 -1
- package/docs/html/functions/provideAuthentication.html +1 -1
- package/docs/html/functions/withDisabledAuthentication.html +1 -1
- package/docs/html/functions/withInitialAuthenticationState.html +1 -1
- package/docs/html/hierarchy.html +1 -1
- package/docs/html/index.html +2 -2
- package/docs/html/interfaces/AuthenticationAccessToken.html +2 -2
- package/docs/html/interfaces/AuthenticationEvent.html +2 -2
- package/docs/html/interfaces/IAuthenticationService.html +2 -2
- package/docs/html/modules.html +1 -1
- package/docs/html/variables/RXAP_AUTHENTICATION_ACCESS_TOKEN.html +1 -1
- package/docs/html/variables/RXAP_AUTHENTICATION_DEACTIVATED.html +1 -1
- package/docs/html/variables/RXAP_INITIAL_AUTHENTICATION_STATE.html +1 -1
- package/docs/markdown/README.md +1 -1
- package/docs/markdown/classes/AuthenticationRoutingService.md +4 -18
- package/docs/markdown/classes/DisabledAuthenticationService.md +6 -6
- package/docs/markdown/classes/RegisterService.md +4 -4
- package/docs/markdown/classes/RxapAuthenticationGuard.md +8 -24
- package/docs/markdown/classes/RxapAuthenticationService.md +7 -7
- package/docs/markdown/classes/SignOutDirective.md +8 -16
- package/docs/markdown/enumerations/AuthenticationEventType.md +5 -5
- package/docs/markdown/functions/BearerTokenInterceptor.md +2 -2
- package/docs/markdown/functions/provideAuthentication.md +2 -2
- package/docs/markdown/functions/withDisabledAuthentication.md +2 -2
- package/docs/markdown/functions/withInitialAuthenticationState.md +2 -2
- package/docs/markdown/globals.md +2 -2
- package/docs/markdown/interfaces/AuthenticationAccessToken.md +4 -4
- package/docs/markdown/interfaces/AuthenticationEvent.md +3 -3
- package/docs/markdown/interfaces/IAuthenticationService.md +6 -6
- package/docs/markdown/variables/RXAP_AUTHENTICATION_ACCESS_TOKEN.md +2 -2
- package/docs/markdown/variables/RXAP_AUTHENTICATION_DEACTIVATED.md +2 -2
- package/docs/markdown/variables/RXAP_INITIAL_AUTHENTICATION_STATE.md +2 -2
- package/docs/wiki/Class.AuthenticationRoutingService.md +3 -17
- package/docs/wiki/Class.DisabledAuthenticationService.md +5 -5
- package/docs/wiki/Class.RegisterService.md +3 -3
- package/docs/wiki/Class.RxapAuthenticationGuard.md +7 -23
- package/docs/wiki/Class.RxapAuthenticationService.md +6 -6
- package/docs/wiki/Class.SignOutDirective.md +7 -15
- package/docs/wiki/Enumeration.AuthenticationEventType.md +4 -4
- package/docs/wiki/Function.BearerTokenInterceptor.md +1 -1
- package/docs/wiki/Function.provideAuthentication.md +1 -1
- package/docs/wiki/Function.withDisabledAuthentication.md +1 -1
- package/docs/wiki/Function.withInitialAuthenticationState.md +1 -1
- package/docs/wiki/Interface.AuthenticationAccessToken.md +3 -3
- package/docs/wiki/Interface.AuthenticationEvent.md +2 -2
- package/docs/wiki/Interface.IAuthenticationService.md +5 -5
- package/docs/wiki/Variable.RXAP_AUTHENTICATION_ACCESS_TOKEN.md +1 -1
- package/docs/wiki/Variable.RXAP_AUTHENTICATION_DEACTIVATED.md +1 -1
- package/docs/wiki/Variable.RXAP_INITIAL_AUTHENTICATION_STATE.md +1 -1
- package/docs/wiki/globals.md +1 -1
- package/fesm2022/rxap-authentication.mjs +23 -49
- package/fesm2022/rxap-authentication.mjs.map +1 -1
- package/package.json +3 -3
- package/types/rxap-authentication.d.ts +14 -16
|
@@ -135,8 +135,6 @@
|
|
|
135
135
|
<td class="col-md-4">
|
|
136
136
|
<ul class="index-list">
|
|
137
137
|
<li>
|
|
138
|
-
<span class="modifier"></span>
|
|
139
|
-
<span class="modifier">Public</span>
|
|
140
138
|
<a href="#authentication" >authentication</a>
|
|
141
139
|
</li>
|
|
142
140
|
<li>
|
|
@@ -144,8 +142,6 @@
|
|
|
144
142
|
<a href="#lastUrl" >lastUrl</a>
|
|
145
143
|
</li>
|
|
146
144
|
<li>
|
|
147
|
-
<span class="modifier"></span>
|
|
148
|
-
<span class="modifier">Public</span>
|
|
149
145
|
<a href="#router" >router</a>
|
|
150
146
|
</li>
|
|
151
147
|
</ul>
|
|
@@ -180,78 +176,6 @@
|
|
|
180
176
|
</table>
|
|
181
177
|
</section>
|
|
182
178
|
|
|
183
|
-
<section data-compodoc="block-constructor">
|
|
184
|
-
<h3 id="constructor">Constructor</h3>
|
|
185
|
-
<table class="table table-sm table-bordered">
|
|
186
|
-
<tbody>
|
|
187
|
-
<tr>
|
|
188
|
-
<td class="col-md-4">
|
|
189
|
-
<code>constructor(authentication: <a href="../injectables/RxapAuthenticationService.html" target="_self">RxapAuthenticationService</a>, router: Router, deactivated: boolean | null)</code>
|
|
190
|
-
</td>
|
|
191
|
-
</tr>
|
|
192
|
-
<tr>
|
|
193
|
-
<td class="col-md-4">
|
|
194
|
-
<div class="io-line">Defined in <a href="" data-line="18" class="link-to-prism">src/lib/authentication.guard.ts:18</a></div>
|
|
195
|
-
</td>
|
|
196
|
-
</tr>
|
|
197
|
-
|
|
198
|
-
<tr>
|
|
199
|
-
<td class="col-md-4">
|
|
200
|
-
<div>
|
|
201
|
-
<b>Parameters :</b>
|
|
202
|
-
<table class="params">
|
|
203
|
-
<thead>
|
|
204
|
-
<tr>
|
|
205
|
-
<td>Name</td>
|
|
206
|
-
<td>Type</td>
|
|
207
|
-
<td>Optional</td>
|
|
208
|
-
</tr>
|
|
209
|
-
</thead>
|
|
210
|
-
<tbody>
|
|
211
|
-
<tr>
|
|
212
|
-
<td>authentication</td>
|
|
213
|
-
|
|
214
|
-
<td>
|
|
215
|
-
<code><a href="../injectables/RxapAuthenticationService.html" target="_self" >RxapAuthenticationService</a></code>
|
|
216
|
-
</td>
|
|
217
|
-
|
|
218
|
-
<td>
|
|
219
|
-
No
|
|
220
|
-
</td>
|
|
221
|
-
|
|
222
|
-
</tr>
|
|
223
|
-
<tr>
|
|
224
|
-
<td>router</td>
|
|
225
|
-
|
|
226
|
-
<td>
|
|
227
|
-
<code>Router</code>
|
|
228
|
-
</td>
|
|
229
|
-
|
|
230
|
-
<td>
|
|
231
|
-
No
|
|
232
|
-
</td>
|
|
233
|
-
|
|
234
|
-
</tr>
|
|
235
|
-
<tr>
|
|
236
|
-
<td>deactivated</td>
|
|
237
|
-
|
|
238
|
-
<td>
|
|
239
|
-
<code>boolean | null</code>
|
|
240
|
-
</td>
|
|
241
|
-
|
|
242
|
-
<td>
|
|
243
|
-
No
|
|
244
|
-
</td>
|
|
245
|
-
|
|
246
|
-
</tr>
|
|
247
|
-
</tbody>
|
|
248
|
-
</table>
|
|
249
|
-
</div>
|
|
250
|
-
</td>
|
|
251
|
-
</tr>
|
|
252
|
-
</tbody>
|
|
253
|
-
</table>
|
|
254
|
-
</section>
|
|
255
179
|
|
|
256
180
|
<section data-compodoc="block-methods">
|
|
257
181
|
|
|
@@ -280,8 +204,8 @@
|
|
|
280
204
|
|
|
281
205
|
<tr>
|
|
282
206
|
<td class="col-md-4">
|
|
283
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
284
|
-
class="link-to-prism">src/lib/authentication.guard.ts:
|
|
207
|
+
<div class="io-line">Defined in <a href="" data-line="20"
|
|
208
|
+
class="link-to-prism">src/lib/authentication.guard.ts:20</a></div>
|
|
285
209
|
</td>
|
|
286
210
|
</tr>
|
|
287
211
|
|
|
@@ -361,8 +285,8 @@
|
|
|
361
285
|
|
|
362
286
|
<tr>
|
|
363
287
|
<td class="col-md-4">
|
|
364
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
365
|
-
class="link-to-prism">src/lib/authentication.guard.ts:
|
|
288
|
+
<div class="io-line">Defined in <a href="" data-line="28"
|
|
289
|
+
class="link-to-prism">src/lib/authentication.guard.ts:28</a></div>
|
|
366
290
|
</td>
|
|
367
291
|
</tr>
|
|
368
292
|
|
|
@@ -432,8 +356,6 @@
|
|
|
432
356
|
<td class="col-md-4">
|
|
433
357
|
<a name="authentication"></a>
|
|
434
358
|
<span class="name">
|
|
435
|
-
<span class="modifier"></span>
|
|
436
|
-
<span class="modifier">Public</span>
|
|
437
359
|
<span ><b>authentication</b></span>
|
|
438
360
|
<a href="#authentication"><span class="icon ion-ios-link"></span></a>
|
|
439
361
|
</span>
|
|
@@ -441,22 +363,12 @@
|
|
|
441
363
|
</tr>
|
|
442
364
|
<tr>
|
|
443
365
|
<td class="col-md-4">
|
|
444
|
-
<i>
|
|
445
|
-
|
|
446
|
-
</td>
|
|
447
|
-
</tr>
|
|
448
|
-
<tr>
|
|
449
|
-
<td class="col-md-4">
|
|
450
|
-
<b>Decorators : </b>
|
|
451
|
-
<br />
|
|
452
|
-
<code>
|
|
453
|
-
@Inject(RxapAuthenticationService)<br />
|
|
454
|
-
</code>
|
|
366
|
+
<i>Default value : </i><code>inject<RxapAuthenticationService>(RxapAuthenticationService)</code>
|
|
455
367
|
</td>
|
|
456
368
|
</tr>
|
|
457
369
|
<tr>
|
|
458
370
|
<td class="col-md-4">
|
|
459
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
371
|
+
<div class="io-line">Defined in <a href="" data-line="13" class="link-to-prism">src/lib/authentication.guard.ts:13</a></div>
|
|
460
372
|
</td>
|
|
461
373
|
</tr>
|
|
462
374
|
|
|
@@ -501,8 +413,6 @@
|
|
|
501
413
|
<td class="col-md-4">
|
|
502
414
|
<a name="router"></a>
|
|
503
415
|
<span class="name">
|
|
504
|
-
<span class="modifier"></span>
|
|
505
|
-
<span class="modifier">Public</span>
|
|
506
416
|
<span ><b>router</b></span>
|
|
507
417
|
<a href="#router"><span class="icon ion-ios-link"></span></a>
|
|
508
418
|
</span>
|
|
@@ -510,22 +420,12 @@
|
|
|
510
420
|
</tr>
|
|
511
421
|
<tr>
|
|
512
422
|
<td class="col-md-4">
|
|
513
|
-
<i>
|
|
514
|
-
|
|
515
|
-
</td>
|
|
516
|
-
</tr>
|
|
517
|
-
<tr>
|
|
518
|
-
<td class="col-md-4">
|
|
519
|
-
<b>Decorators : </b>
|
|
520
|
-
<br />
|
|
521
|
-
<code>
|
|
522
|
-
@Inject(Router)<br />
|
|
523
|
-
</code>
|
|
423
|
+
<i>Default value : </i><code>inject<Router>(Router)</code>
|
|
524
424
|
</td>
|
|
525
425
|
</tr>
|
|
526
426
|
<tr>
|
|
527
427
|
<td class="col-md-4">
|
|
528
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
428
|
+
<div class="io-line">Defined in <a href="" data-line="14" class="link-to-prism">src/lib/authentication.guard.ts:14</a></div>
|
|
529
429
|
</td>
|
|
530
430
|
</tr>
|
|
531
431
|
|
|
@@ -538,11 +438,7 @@
|
|
|
538
438
|
|
|
539
439
|
|
|
540
440
|
<div class="tab-pane fade tab-source-code" id="source">
|
|
541
|
-
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {
|
|
542
|
-
Inject,
|
|
543
|
-
Injectable,
|
|
544
|
-
Optional,
|
|
545
|
-
} from '@angular/core';
|
|
441
|
+
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { Injectable, inject } from '@angular/core';
|
|
546
442
|
import {
|
|
547
443
|
ActivatedRouteSnapshot,
|
|
548
444
|
Router,
|
|
@@ -554,19 +450,12 @@ import { RXAP_AUTHENTICATION_DEACTIVATED } from './tokens';
|
|
|
554
450
|
|
|
555
451
|
@Injectable({ providedIn: 'root' })
|
|
556
452
|
export class RxapAuthenticationGuard {
|
|
453
|
+
authentication = inject<RxapAuthenticationService>(RxapAuthenticationService);
|
|
454
|
+
router = inject<Router>(Router);
|
|
455
|
+
private readonly deactivated = inject(RXAP_AUTHENTICATION_DEACTIVATED, { optional: true }) ?? null;
|
|
557
456
|
|
|
558
|
-
public lastUrl: string | null = null;
|
|
559
457
|
|
|
560
|
-
|
|
561
|
-
@Inject(RxapAuthenticationService)
|
|
562
|
-
public authentication: RxapAuthenticationService,
|
|
563
|
-
@Inject(Router)
|
|
564
|
-
public router: Router,
|
|
565
|
-
@Optional()
|
|
566
|
-
@Inject(RXAP_AUTHENTICATION_DEACTIVATED)
|
|
567
|
-
private readonly deactivated: boolean | null = null,
|
|
568
|
-
) {
|
|
569
|
-
}
|
|
458
|
+
public lastUrl: string | null = null;
|
|
570
459
|
|
|
571
460
|
public canActivate(
|
|
572
461
|
route: ActivatedRouteSnapshot,
|