cloud-ide-auth 1.0.20 → 1.0.24
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/fesm2022/cloud-ide-auth.mjs +133 -158
- package/fesm2022/cloud-ide-auth.mjs.map +1 -1
- package/index.d.ts +5 -4
- package/package.json +1 -1
|
@@ -50,6 +50,24 @@ class CloudIdeAuthService {
|
|
|
50
50
|
localStorage.removeItem(this.TOKEN_STORAGE_KEY);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
+
// View-only token for public APIs
|
|
54
|
+
VIEW_ONLY_TOKEN_STORAGE_KEY = 'cloud_ide_view_only_token';
|
|
55
|
+
_view_only_token = '';
|
|
56
|
+
get view_only_token() {
|
|
57
|
+
return this._view_only_token;
|
|
58
|
+
}
|
|
59
|
+
set view_only_token(value) {
|
|
60
|
+
this._view_only_token = value;
|
|
61
|
+
if (!this.isLocalStorageAvailable()) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
if (value) {
|
|
65
|
+
localStorage.setItem(this.VIEW_ONLY_TOKEN_STORAGE_KEY, value);
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
localStorage.removeItem(this.VIEW_ONLY_TOKEN_STORAGE_KEY);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
53
71
|
// Load authentication data from localStorage on service initialization
|
|
54
72
|
loadAuthDataFromStorage() {
|
|
55
73
|
if (!this.isLocalStorageAvailable()) {
|
|
@@ -61,6 +79,11 @@ class CloudIdeAuthService {
|
|
|
61
79
|
if (storedToken) {
|
|
62
80
|
this._auth_token = storedToken;
|
|
63
81
|
}
|
|
82
|
+
// Load view-only token
|
|
83
|
+
const storedViewOnlyToken = localStorage.getItem(this.VIEW_ONLY_TOKEN_STORAGE_KEY);
|
|
84
|
+
if (storedViewOnlyToken) {
|
|
85
|
+
this._view_only_token = storedViewOnlyToken;
|
|
86
|
+
}
|
|
64
87
|
// Load user data
|
|
65
88
|
const storedUserData = localStorage.getItem(this.USER_STORAGE_KEY);
|
|
66
89
|
if (storedUserData) {
|
|
@@ -384,6 +407,7 @@ class ReLoginFloatingService {
|
|
|
384
407
|
id: 're-login-container',
|
|
385
408
|
title: 'Re-Login Required',
|
|
386
409
|
icon: 'lock',
|
|
410
|
+
backdrop: true,
|
|
387
411
|
width: '420px',
|
|
388
412
|
height: 'auto',
|
|
389
413
|
minWidth: '400px',
|
|
@@ -424,49 +448,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
424
448
|
class CideAuthReLoginComponent {
|
|
425
449
|
reLoginService = inject(ReLoginService);
|
|
426
450
|
destroyRef = inject(DestroyRef);
|
|
427
|
-
|
|
451
|
+
// Page code for tracking/configuration
|
|
452
|
+
pageCode = 'auth_relogin_dialog';
|
|
428
453
|
isLoading = this.reLoginService.isLoading;
|
|
429
454
|
error = this.reLoginService.error;
|
|
430
455
|
reLoginForm = new FormGroup({
|
|
431
456
|
custom_login_method: new FormControl('pass', [Validators.required]),
|
|
432
|
-
user_password: new FormControl('')
|
|
433
|
-
mpin_pin: new FormControl('')
|
|
457
|
+
user_password: new FormControl('', [Validators.required])
|
|
434
458
|
});
|
|
435
459
|
ngOnInit() {
|
|
436
|
-
//
|
|
437
|
-
// For now, default to password - this could be configured from settings
|
|
438
|
-
this.loginMethod.set('pass');
|
|
460
|
+
// Set default login method to password
|
|
439
461
|
this.reLoginForm.patchValue({
|
|
440
462
|
custom_login_method: 'pass'
|
|
441
463
|
});
|
|
442
|
-
// Update validators based on login method
|
|
443
|
-
this.updateValidators();
|
|
444
464
|
}
|
|
445
465
|
ngOnDestroy() {
|
|
446
466
|
// Cleanup handled by takeUntilDestroyed
|
|
447
467
|
}
|
|
448
|
-
updateValidators() {
|
|
449
|
-
const method = this.loginMethod();
|
|
450
|
-
if (method === 'pass') {
|
|
451
|
-
this.reLoginForm.get('user_password')?.setValidators([Validators.required]);
|
|
452
|
-
this.reLoginForm.get('mpin_pin')?.clearValidators();
|
|
453
|
-
this.reLoginForm.get('mpin_pin')?.setValue('');
|
|
454
|
-
}
|
|
455
|
-
else {
|
|
456
|
-
this.reLoginForm.get('mpin_pin')?.setValidators([Validators.required, Validators.minLength(4), Validators.maxLength(6)]);
|
|
457
|
-
this.reLoginForm.get('user_password')?.clearValidators();
|
|
458
|
-
this.reLoginForm.get('user_password')?.setValue('');
|
|
459
|
-
}
|
|
460
|
-
this.reLoginForm.get('user_password')?.updateValueAndValidity();
|
|
461
|
-
this.reLoginForm.get('mpin_pin')?.updateValueAndValidity();
|
|
462
|
-
}
|
|
463
468
|
onSubmit() {
|
|
464
469
|
if (this.reLoginForm.valid) {
|
|
465
470
|
const formValue = this.reLoginForm.value;
|
|
471
|
+
const passwordValue = formValue.user_password || '';
|
|
472
|
+
// Auto-detect MPIN vs Password based on length (same as login screen)
|
|
473
|
+
// If length <= 6, treat as MPIN, otherwise as password
|
|
474
|
+
let customLoginMethod = 'pass';
|
|
475
|
+
let userPassword = passwordValue;
|
|
476
|
+
let mpinPin = undefined;
|
|
477
|
+
if (passwordValue && passwordValue.length <= 6) {
|
|
478
|
+
customLoginMethod = 'mpin';
|
|
479
|
+
mpinPin = passwordValue;
|
|
480
|
+
userPassword = undefined;
|
|
481
|
+
}
|
|
466
482
|
const payload = new MReLogin({
|
|
467
|
-
custom_login_method:
|
|
468
|
-
user_password:
|
|
469
|
-
mpin_pin:
|
|
483
|
+
custom_login_method: customLoginMethod,
|
|
484
|
+
user_password: userPassword,
|
|
485
|
+
mpin_pin: mpinPin
|
|
470
486
|
});
|
|
471
487
|
this.reLoginService.reLogin(payload)
|
|
472
488
|
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
@@ -480,72 +496,48 @@ class CideAuthReLoginComponent {
|
|
|
480
496
|
});
|
|
481
497
|
}
|
|
482
498
|
}
|
|
483
|
-
onCancel() {
|
|
484
|
-
this.reLoginService.hideReLogin();
|
|
485
|
-
}
|
|
486
499
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideAuthReLoginComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
487
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: CideAuthReLoginComponent, isStandalone: true, selector: "cide-auth-re-login", ngImport: i0, template: `
|
|
488
|
-
<div class="tw-w-full tw-max-w-md tw-mx-auto tw-p-6">
|
|
489
|
-
<div class="tw-text-center tw-mb-6">
|
|
490
|
-
<h2 class="tw-text-2xl tw-font-semibold tw-text-gray-900 tw-mb-2">Session Expired</h2>
|
|
491
|
-
<p class="tw-text-sm tw-text-gray-600">Please re-authenticate to continue</p>
|
|
492
|
-
</div>
|
|
493
|
-
|
|
494
|
-
@if (error()) {
|
|
495
|
-
<div class="tw-mb-4 tw-p-3 tw-bg-red-50 tw-border tw-border-red-200 tw-rounded-lg">
|
|
496
|
-
<p class="tw-text-sm tw-text-red-600">{{ error() }}</p>
|
|
497
|
-
</div>
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
<form [formGroup]="reLoginForm" (ngSubmit)="onSubmit()" novalidate>
|
|
501
|
-
<div class="tw-space-y-4">
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
</
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
cideEleButton
|
|
529
|
-
variant="primary"
|
|
530
|
-
[loading]="isLoading()"
|
|
531
|
-
[disabled]="!reLoginForm.valid || isLoading()"
|
|
532
|
-
class="tw-flex-1">
|
|
533
|
-
Re-Login
|
|
534
|
-
</button>
|
|
535
|
-
<button
|
|
536
|
-
type="button"
|
|
537
|
-
cideEleButton
|
|
538
|
-
variant="outline"
|
|
539
|
-
[disabled]="isLoading()"
|
|
540
|
-
(click)="onCancel()"
|
|
541
|
-
class="tw-flex-1">
|
|
542
|
-
Cancel
|
|
543
|
-
</button>
|
|
544
|
-
</div>
|
|
545
|
-
</div>
|
|
546
|
-
</form>
|
|
547
|
-
</div>
|
|
548
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: CideInputComponent, selector: "cide-ele-input", inputs: ["fill", "label", "labelHide", "disabled", "clearInput", "labelPlacement", "labelDir", "placeholder", "leadingIcon", "trailingIcon", "helperText", "helperTextCollapse", "hideHelperAndErrorText", "errorText", "maxlength", "minlength", "required", "autocapitalize", "autocomplete", "type", "width", "id", "ngModel", "option", "min", "max", "size"], outputs: ["ngModelChange"] }, { kind: "component", type: CideEleButtonComponent, selector: "button[cideEleButton], a[cideEleButton]", inputs: ["label", "variant", "size", "type", "shape", "elevation", "disabled", "id", "loading", "fullWidth", "leftIcon", "rightIcon", "customClass", "tooltip", "ariaLabel", "testId", "routerLink", "routerExtras", "preventDoubleClick", "animated"], outputs: ["btnClick", "doubleClick"] }] });
|
|
500
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: CideAuthReLoginComponent, isStandalone: true, selector: "cide-auth-re-login", ngImport: i0, template: `
|
|
501
|
+
<div class="tw-w-full tw-max-w-md tw-mx-auto tw-p-6">
|
|
502
|
+
<div class="tw-text-center tw-mb-6">
|
|
503
|
+
<h2 class="tw-text-2xl tw-font-semibold tw-text-gray-900 tw-mb-2">Session Expired</h2>
|
|
504
|
+
<p class="tw-text-sm tw-text-gray-600">Please re-authenticate to continue</p>
|
|
505
|
+
</div>
|
|
506
|
+
|
|
507
|
+
@if (error()) {
|
|
508
|
+
<div class="tw-mb-4 tw-p-3 tw-bg-red-50 tw-border tw-border-red-200 tw-rounded-lg">
|
|
509
|
+
<p class="tw-text-sm tw-text-red-600">{{ error() }}</p>
|
|
510
|
+
</div>
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
<form [formGroup]="reLoginForm" (ngSubmit)="onSubmit()" novalidate>
|
|
514
|
+
<div class="tw-space-y-4">
|
|
515
|
+
<!-- Single input field for both password and MPIN -->
|
|
516
|
+
<div>
|
|
517
|
+
<cide-ele-input
|
|
518
|
+
id="user_password_mpin"
|
|
519
|
+
formControlName="user_password"
|
|
520
|
+
type="password"
|
|
521
|
+
placeholder="Enter your password or MPIN"
|
|
522
|
+
[required]="true">
|
|
523
|
+
</cide-ele-input>
|
|
524
|
+
</div>
|
|
525
|
+
|
|
526
|
+
<div class="tw-flex tw-gap-3 tw-pt-4">
|
|
527
|
+
<button
|
|
528
|
+
type="submit"
|
|
529
|
+
cideEleButton
|
|
530
|
+
variant="primary"
|
|
531
|
+
[loading]="isLoading()"
|
|
532
|
+
[disabled]="!reLoginForm.valid || isLoading()"
|
|
533
|
+
class="tw-flex-1">
|
|
534
|
+
Re-Login
|
|
535
|
+
</button>
|
|
536
|
+
</div>
|
|
537
|
+
</div>
|
|
538
|
+
</form>
|
|
539
|
+
</div>
|
|
540
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: CideInputComponent, selector: "cide-ele-input", inputs: ["fill", "label", "labelHide", "disabled", "clearInput", "labelPlacement", "labelDir", "placeholder", "leadingIcon", "trailingIcon", "helperText", "helperTextCollapse", "hideHelperAndErrorText", "errorText", "maxlength", "minlength", "required", "autocapitalize", "autocomplete", "type", "width", "id", "ngModel", "option", "min", "max", "size"], outputs: ["ngModelChange"] }, { kind: "component", type: CideEleButtonComponent, selector: "button[cideEleButton], a[cideEleButton]", inputs: ["label", "variant", "size", "type", "shape", "elevation", "disabled", "id", "loading", "fullWidth", "leftIcon", "rightIcon", "customClass", "tooltip", "ariaLabel", "testId", "routerLink", "routerExtras", "preventDoubleClick", "animated"], outputs: ["btnClick", "doubleClick"] }] });
|
|
549
541
|
}
|
|
550
542
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideAuthReLoginComponent, decorators: [{
|
|
551
543
|
type: Component,
|
|
@@ -554,67 +546,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
554
546
|
ReactiveFormsModule,
|
|
555
547
|
CideInputComponent,
|
|
556
548
|
CideEleButtonComponent
|
|
557
|
-
], template: `
|
|
558
|
-
<div class="tw-w-full tw-max-w-md tw-mx-auto tw-p-6">
|
|
559
|
-
<div class="tw-text-center tw-mb-6">
|
|
560
|
-
<h2 class="tw-text-2xl tw-font-semibold tw-text-gray-900 tw-mb-2">Session Expired</h2>
|
|
561
|
-
<p class="tw-text-sm tw-text-gray-600">Please re-authenticate to continue</p>
|
|
562
|
-
</div>
|
|
563
|
-
|
|
564
|
-
@if (error()) {
|
|
565
|
-
<div class="tw-mb-4 tw-p-3 tw-bg-red-50 tw-border tw-border-red-200 tw-rounded-lg">
|
|
566
|
-
<p class="tw-text-sm tw-text-red-600">{{ error() }}</p>
|
|
567
|
-
</div>
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
<form [formGroup]="reLoginForm" (ngSubmit)="onSubmit()" novalidate>
|
|
571
|
-
<div class="tw-space-y-4">
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
</
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
type="submit"
|
|
598
|
-
cideEleButton
|
|
599
|
-
variant="primary"
|
|
600
|
-
[loading]="isLoading()"
|
|
601
|
-
[disabled]="!reLoginForm.valid || isLoading()"
|
|
602
|
-
class="tw-flex-1">
|
|
603
|
-
Re-Login
|
|
604
|
-
</button>
|
|
605
|
-
<button
|
|
606
|
-
type="button"
|
|
607
|
-
cideEleButton
|
|
608
|
-
variant="outline"
|
|
609
|
-
[disabled]="isLoading()"
|
|
610
|
-
(click)="onCancel()"
|
|
611
|
-
class="tw-flex-1">
|
|
612
|
-
Cancel
|
|
613
|
-
</button>
|
|
614
|
-
</div>
|
|
615
|
-
</div>
|
|
616
|
-
</form>
|
|
617
|
-
</div>
|
|
549
|
+
], template: `
|
|
550
|
+
<div class="tw-w-full tw-max-w-md tw-mx-auto tw-p-6">
|
|
551
|
+
<div class="tw-text-center tw-mb-6">
|
|
552
|
+
<h2 class="tw-text-2xl tw-font-semibold tw-text-gray-900 tw-mb-2">Session Expired</h2>
|
|
553
|
+
<p class="tw-text-sm tw-text-gray-600">Please re-authenticate to continue</p>
|
|
554
|
+
</div>
|
|
555
|
+
|
|
556
|
+
@if (error()) {
|
|
557
|
+
<div class="tw-mb-4 tw-p-3 tw-bg-red-50 tw-border tw-border-red-200 tw-rounded-lg">
|
|
558
|
+
<p class="tw-text-sm tw-text-red-600">{{ error() }}</p>
|
|
559
|
+
</div>
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
<form [formGroup]="reLoginForm" (ngSubmit)="onSubmit()" novalidate>
|
|
563
|
+
<div class="tw-space-y-4">
|
|
564
|
+
<!-- Single input field for both password and MPIN -->
|
|
565
|
+
<div>
|
|
566
|
+
<cide-ele-input
|
|
567
|
+
id="user_password_mpin"
|
|
568
|
+
formControlName="user_password"
|
|
569
|
+
type="password"
|
|
570
|
+
placeholder="Enter your password or MPIN"
|
|
571
|
+
[required]="true">
|
|
572
|
+
</cide-ele-input>
|
|
573
|
+
</div>
|
|
574
|
+
|
|
575
|
+
<div class="tw-flex tw-gap-3 tw-pt-4">
|
|
576
|
+
<button
|
|
577
|
+
type="submit"
|
|
578
|
+
cideEleButton
|
|
579
|
+
variant="primary"
|
|
580
|
+
[loading]="isLoading()"
|
|
581
|
+
[disabled]="!reLoginForm.valid || isLoading()"
|
|
582
|
+
class="tw-flex-1">
|
|
583
|
+
Re-Login
|
|
584
|
+
</button>
|
|
585
|
+
</div>
|
|
586
|
+
</div>
|
|
587
|
+
</form>
|
|
588
|
+
</div>
|
|
618
589
|
` }]
|
|
619
590
|
}] });
|
|
620
591
|
|
|
@@ -651,12 +622,16 @@ const authGuard = (route, state) => {
|
|
|
651
622
|
const authService = inject(AUTH_SERVICE_TOKEN);
|
|
652
623
|
const appState = inject(APP_STATE_SERVICE_TOKEN);
|
|
653
624
|
const router = inject(Router);
|
|
654
|
-
//
|
|
655
|
-
authService.
|
|
656
|
-
//
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
625
|
+
// Check if user is authenticated using current state (without refreshing first)
|
|
626
|
+
const isAuthenticated = appState.isUserAuthenticated() && !authService.isTokenExpired();
|
|
627
|
+
// Defer state refresh to next change detection cycle to avoid ExpressionChangedAfterItHasBeenCheckedError
|
|
628
|
+
Promise.resolve().then(() => {
|
|
629
|
+
// Refresh auth state to make sure it's current
|
|
630
|
+
authService.refreshAuthState();
|
|
631
|
+
// Refresh app state from localStorage to ensure synchronization
|
|
632
|
+
appState.refreshFromLocalStorage();
|
|
633
|
+
});
|
|
634
|
+
if (isAuthenticated) {
|
|
660
635
|
return true;
|
|
661
636
|
}
|
|
662
637
|
// Redirect to login page with the intended destination
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud-ide-auth.mjs","sources":["../../../projects/cloud-ide-auth/src/lib/cloud-ide-auth.service.ts","../../../projects/cloud-ide-auth/src/lib/cloud-ide-auth.component.ts","../../../projects/cloud-ide-auth/src/lib/auth/forgot-password/forgot-password.component.ts","../../../projects/cloud-ide-auth/src/lib/auth/forgot-password/forgot-password.component.html","../../../projects/cloud-ide-auth/src/lib/auth/re-login/re-login.service.ts","../../../projects/cloud-ide-auth/src/lib/auth/re-login/re-login-floating.service.ts","../../../projects/cloud-ide-auth/src/lib/auth/re-login/re-login.component.ts","../../../projects/cloud-ide-auth/src/lib/cloud-ide-auth.routes.ts","../../../projects/cloud-ide-auth/src/lib/guards/auth.guard.ts","../../../projects/cloud-ide-auth/src/public-api.ts","../../../projects/cloud-ide-auth/src/cloud-ide-auth.ts"],"sourcesContent":["import { HttpClient } from '@angular/common/http';\r\nimport { Injectable, inject } from '@angular/core';\r\nimport {\r\n authRoutesUrl, cidePath, hostManagerRoutesUrl, AuthUserMst,\r\n loginControllerResponse, MLogin, MForgotPassword, ForgotPasswordControllerResponse,\r\n MResetPassword, ResetPasswordControllerResponse\r\n} from 'cloud-ide-lms-model';\r\nimport { BehaviorSubject, Observable } from 'rxjs';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CloudIdeAuthService {\r\n public auth_user_mst: BehaviorSubject<AuthUserMst> = new BehaviorSubject({});\r\n private _auth_token: string = \"\";\r\n\r\n // Storage keys\r\n private readonly TOKEN_STORAGE_KEY = 'cide_auth_token';\r\n private readonly USER_STORAGE_KEY = 'cide_auth_user';\r\n\r\n // Modern Angular v20 dependency injection pattern\r\n private http = inject(HttpClient);\r\n\r\n constructor() {\r\n // Modern Angular v20 pattern: Use constructor for initialization only\r\n this.loadAuthDataFromStorage();\r\n }\r\n\r\n /**\r\n * Check if localStorage is available (browser environment)\r\n */\r\n private isLocalStorageAvailable(): boolean {\r\n try {\r\n return typeof window !== 'undefined' && typeof localStorage !== 'undefined';\r\n } catch {\r\n return false;\r\n }\r\n }\r\n\r\n // Getter and setter for auth_token with localStorage persistence\r\n get auth_token(): string {\r\n return this._auth_token;\r\n }\r\n\r\n set auth_token(value: string) {\r\n this._auth_token = value;\r\n if (!this.isLocalStorageAvailable()) {\r\n return;\r\n }\r\n if (value) {\r\n localStorage.setItem(this.TOKEN_STORAGE_KEY, value);\r\n } else {\r\n localStorage.removeItem(this.TOKEN_STORAGE_KEY);\r\n }\r\n }\r\n\r\n // Load authentication data from localStorage on service initialization\r\n private loadAuthDataFromStorage(): void {\r\n if (!this.isLocalStorageAvailable()) {\r\n return;\r\n }\r\n\r\n try {\r\n // Load token\r\n const storedToken = localStorage.getItem(this.TOKEN_STORAGE_KEY);\r\n if (storedToken) {\r\n this._auth_token = storedToken;\r\n }\r\n\r\n // Load user data\r\n const storedUserData = localStorage.getItem(this.USER_STORAGE_KEY);\r\n if (storedUserData) {\r\n const userData = JSON.parse(storedUserData);\r\n this.auth_user_mst.next(userData);\r\n }\r\n } catch (error) {\r\n // Silent error handling for auth data loading\r\n }\r\n }\r\n\r\n // Store user data in localStorage\r\n public storeUserData(userData: AuthUserMst): void {\r\n if (userData) {\r\n this.auth_user_mst.next(userData);\r\n if (this.isLocalStorageAvailable()) {\r\n localStorage.setItem(this.USER_STORAGE_KEY, JSON.stringify(userData));\r\n }\r\n }\r\n }\r\n\r\n signIn(body: MLogin): Observable<loginControllerResponse> {\r\n if (body?.user_password) {\r\n if (body?.user_password?.length <= 6) {\r\n body.custom_login_method = \"mpin\";\r\n body.mpin_pin = body?.user_password;\r\n body.user_password = \"\";\r\n }\r\n }\r\n return this.http?.post(cidePath?.join([hostManagerRoutesUrl?.cideSuiteHost, authRoutesUrl?.module, authRoutesUrl?.signIn]), body);\r\n }\r\n\r\n forgotPassword(body: MForgotPassword): Observable<ForgotPasswordControllerResponse> {\r\n return this.http?.post(cidePath?.join([hostManagerRoutesUrl?.cideSuiteHost, authRoutesUrl?.module, authRoutesUrl?.forgotPassword]), body);\r\n }\r\n\r\n resetPassword(body: MResetPassword): Observable<ResetPasswordControllerResponse> {\r\n const payload = new MResetPassword(body);\r\n if (payload?.Validate) {\r\n payload?.Validate();\r\n }\r\n return this.http?.post(cidePath?.join([hostManagerRoutesUrl?.cideSuiteHost, authRoutesUrl?.module, authRoutesUrl?.resetPassword]), body);\r\n }\r\n\r\n // Sign out the user and clear all stored auth data\r\n signOut(): void {\r\n // Clear token and user data from memory\r\n this._auth_token = \"\";\r\n this.auth_user_mst.next({});\r\n\r\n // Clear stored data\r\n if (this.isLocalStorageAvailable()) {\r\n localStorage.removeItem(this.TOKEN_STORAGE_KEY);\r\n localStorage.removeItem(this.USER_STORAGE_KEY);\r\n }\r\n }\r\n\r\n // Check if user is authenticated\r\n isAuthenticated(): boolean {\r\n return !!this._auth_token;\r\n }\r\n\r\n // Get current user data \r\n getCurrentUser(): AuthUserMst {\r\n return this.auth_user_mst.getValue();\r\n }\r\n\r\n // Check if token is expired\r\n isTokenExpired(): boolean {\r\n try {\r\n if (!this._auth_token) {\r\n return true;\r\n }\r\n\r\n // Extract the payload from the JWT token\r\n const tokenParts = this._auth_token.split('.');\r\n if (tokenParts.length !== 3) {\r\n return true; // Not a valid JWT token\r\n }\r\n\r\n const payload = JSON.parse(atob(tokenParts[1]));\r\n\r\n // Check expiration time\r\n const expiration = payload.exp * 1000; // Convert seconds to milliseconds\r\n return Date.now() >= expiration;\r\n } catch (error) {\r\n return true; // Assume expired if there's an error\r\n }\r\n }\r\n\r\n // Refresh auth data if needed based on stored data\r\n refreshAuthState(): void {\r\n // If we have a token but no user data, try to load user data\r\n if (this._auth_token && this.auth_user_mst && Object.keys(this.auth_user_mst.getValue()).length === 0 && this.isLocalStorageAvailable()) {\r\n const storedUserData = localStorage.getItem(this.USER_STORAGE_KEY);\r\n if (storedUserData) {\r\n try {\r\n const userData = JSON.parse(storedUserData);\r\n this.auth_user_mst.next(userData);\r\n } catch (error) {\r\n // Silent error handling for parsing user data\r\n }\r\n }\r\n }\r\n\r\n // If token is expired, sign out\r\n if (this.isTokenExpired()) {\r\n this.signOut();\r\n }\r\n }\r\n}\r\n","import { Component } from '@angular/core';\r\nimport { RouterOutlet } from '@angular/router';\r\n\r\n@Component({\r\n selector: 'cide-auth-wrapper',\r\n standalone: true,\r\n imports: [RouterOutlet],\r\n template: `\r\n <router-outlet></router-outlet>\r\n `,\r\n styles: ``\r\n})\r\nexport class CloudIdeAuthComponent {\r\n\r\n}\r\n","import { Component, inject } from '@angular/core';\r\nimport { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';\r\nimport { CommonModule } from '@angular/common';\r\nimport { Router } from '@angular/router';\r\nimport { FormGroupModel } from '../sign-in/sign-in.component';\r\nimport { forgotPasswordMethod, MForgotPassword, validateRequestModal } from 'cloud-ide-lms-model';\r\nimport { CloudIdeAuthService } from '../../cloud-ide-auth.service';\r\nimport { CideEleButtonComponent, CideInputComponent } from 'cloud-ide-element';\r\n\r\n@Component({\r\n selector: 'cide-auth-forgot-password',\r\n standalone: true,\r\n imports: [CideInputComponent, ReactiveFormsModule, CommonModule, CideEleButtonComponent],\r\n templateUrl: './forgot-password.component.html',\r\n styleUrl: './forgot-password.component.css'\r\n})\r\nexport class CideAuthForgotPasswordComponent {\r\n public setup_param = { form_loading: false };\r\n public forgotPassswordForm: FormGroupModel<MForgotPassword>;\r\n public erro_message = \"\";\r\n\r\n private authService = inject(CloudIdeAuthService);\r\n private route = inject(Router);\r\n\r\n constructor() {\r\n\r\n this.forgotPassswordForm = new FormGroup({\r\n custom_forgot_password_method: new FormControl<forgotPasswordMethod>('username'),\r\n user_username: new FormControl(''),\r\n user_emailid: new FormControl(''),\r\n user_mobileno: new FormControl(),\r\n }) as unknown as FormGroupModel<MForgotPassword>;\r\n }\r\n\r\n onForgotPasssword() {\r\n if (this.forgotPassswordForm.valid) {\r\n this.setup_param.form_loading = true;\r\n const validate = validateRequestModal(new MForgotPassword(this.forgotPassswordForm?.value as MForgotPassword));\r\n console.log(validate)\r\n if(validate === true){\r\n this.authService.forgotPassword(this.forgotPassswordForm?.value as MForgotPassword)?.subscribe({\r\n next: (response) => {\r\n if (response?.success === true) {\r\n this.setup_param.form_loading = false;\r\n this.route.navigate(['auth', 'sign-in'])\r\n }\r\n },\r\n error: (error) => {\r\n this.setup_param.form_loading = false;\r\n this.erro_message = error?.error?.message;\r\n console.log(error)\r\n setTimeout(() => {\r\n this.erro_message = \"\"\r\n }, 3000)\r\n }\r\n });\r\n } else {\r\n this.setup_param.form_loading = false;\r\n this.erro_message = validate.first;\r\n setTimeout(() => {\r\n this.erro_message = \"\"\r\n }, 3000)\r\n }\r\n }\r\n }\r\n}","<!-- https://play.tailwindcss.com/lfO85drpUy -->\r\n<!-- Main Div Outer Div-->\r\n<div class=\"cide-font-poppins tw-flex tw-min-h-screen tw-w-full tw-bg-gray-50 tw-py-3\">\r\n <!-- Forrm Wrapper -->\r\n <div class=\"tw-m-auto tw-w-96 tw-rounded-2xl tw-bg-white tw-py-6 tw-shadow-xl\">\r\n <!-- Logo Wrapper -->\r\n <div class=\"tw-m-auto tw-h-32 tw-w-64 tw-text-center\">\r\n <img src=\"https://console.cloudidesys.com/assets/Cloud%20IDE%20Logo%20Dark.png\" class=\"tw-m-auto tw-h-full\"\r\n alt=\"Cloud IDE Logo\" />\r\n </div> <!-- Entity name here -->\r\n <div class=\"tw-my-2 tw-text-center tw-text-xl tw-font-semibold\">Forgot Password</div>\r\n <!-- Error Logger -->\r\n <div class=\"tw-w-full tw-select-none tw-py-1 tw-text-center tw-text-red-500 tw-h-4 tw-text-sm\">{{erro_message}}</div>\r\n \r\n <!-- section for controls -->\r\n <form [formGroup]=\"forgotPassswordForm\" (ngSubmit)=\"onForgotPasssword()\" novalidate>\r\n <div class=\"tw-m-auto tw-pb-3 tw-pt-3\">\r\n <!-- Username -->\r\n <div class=\"tw-m-auto tw-w-80\">\r\n <cide-ele-input id=\"user_username\" formControlName=\"user_username\"></cide-ele-input>\r\n </div> <!-- Forgot Password button -->\r\n <div class=\"tw-w-80 tw-m-auto tw-mt-3\">\r\n <button cideEleButton id=\"reset_password_link_button\" [loading]=\"setup_param.form_loading\" [disabled]=\"!forgotPassswordForm.valid\">Reset Password</button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n </div>","import { Injectable, inject, signal } from '@angular/core';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { BehaviorSubject, Observable, catchError, of } from 'rxjs';\r\nimport {\r\n authRoutesUrl,\r\n cidePath,\r\n hostManagerRoutesUrl,\r\n MReLogin,\r\n reLoginControllerResponse,\r\n AuthUserMst\r\n} from 'cloud-ide-lms-model';\r\nimport { CloudIdeAuthService } from '../../cloud-ide-auth.service';\r\n\r\n/**\r\n * Service to handle re-login functionality when 401 errors occur\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ReLoginService {\r\n private http = inject(HttpClient);\r\n private authService = inject(CloudIdeAuthService);\r\n\r\n // Observable to control re-login dialog visibility\r\n private showReLoginSubject = new BehaviorSubject<boolean>(false);\r\n public showReLogin$ = this.showReLoginSubject.asObservable();\r\n\r\n // Signal for re-login state\r\n isLoading = signal<boolean>(false);\r\n error = signal<string | null>(null);\r\n\r\n /**\r\n * Show re-login dialog\r\n */\r\n showReLogin(): void {\r\n // Only show if we have a token (session expired scenario)\r\n if (this.authService.auth_token) {\r\n this.showReLoginSubject.next(true);\r\n }\r\n }\r\n\r\n /**\r\n * Hide re-login dialog\r\n */\r\n hideReLogin(): void {\r\n this.showReLoginSubject.next(false);\r\n this.error.set(null);\r\n }\r\n\r\n /**\r\n * Perform re-login with MPIN or password\r\n */\r\n reLogin(payload: MReLogin): Observable<reLoginControllerResponse> {\r\n this.isLoading.set(true);\r\n this.error.set(null);\r\n\r\n // Add token to payload\r\n const reLoginPayload: MReLogin = {\r\n ...payload,\r\n token: this.authService.auth_token\r\n };\r\n\r\n const url = cidePath.join([\r\n hostManagerRoutesUrl.cideSuiteHost,\r\n authRoutesUrl.module,\r\n authRoutesUrl.createReLoginSession\r\n ]);\r\n\r\n return this.http.post<reLoginControllerResponse>(url, reLoginPayload).pipe(\r\n catchError((err) => {\r\n this.isLoading.set(false);\r\n this.error.set(err?.error?.message || 'Re-login failed');\r\n return of({\r\n success: false,\r\n message: err?.error?.message || 'Re-login failed'\r\n } as reLoginControllerResponse);\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Handle successful re-login\r\n */\r\n handleReLoginSuccess(response: reLoginControllerResponse): void {\r\n if (response.success && response.token) {\r\n // Update auth token\r\n this.authService.auth_token = response.token;\r\n\r\n // Update user data if available\r\n if (response.data) {\r\n const userData = response.data as AuthUserMst;\r\n this.authService.storeUserData(userData);\r\n }\r\n\r\n // Hide re-login dialog\r\n this.hideReLogin();\r\n this.isLoading.set(false);\r\n } else {\r\n this.error.set(response.message || 'Re-login failed');\r\n this.isLoading.set(false);\r\n }\r\n }\r\n}\r\n","import { Injectable, inject } from '@angular/core';\r\nimport { CideEleFloatingContainerService } from 'cloud-ide-element';\r\nimport { ReLoginService } from './re-login.service';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { DestroyRef } from '@angular/core';\r\nimport type { FloatingContainerConfig } from 'cloud-ide-element';\r\n\r\n/**\r\n * Service to manage re-login component in floating container\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ReLoginFloatingService {\r\n private containerService = inject(CideEleFloatingContainerService);\r\n private reLoginService = inject(ReLoginService);\r\n private readonly destroyRef = inject(DestroyRef);\r\n private containerId: string | null = null;\r\n\r\n constructor() {\r\n // Register the component when service is initialized\r\n this.registerReLoginComponent();\r\n\r\n // Subscribe to re-login service to show/hide dialog\r\n this.reLoginService.showReLogin$\r\n .pipe(takeUntilDestroyed(this.destroyRef))\r\n .subscribe((shouldShow) => {\r\n if (shouldShow && !this.containerId) {\r\n this.show();\r\n } else if (!shouldShow && this.containerId) {\r\n this.hide();\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Register re-login component with floating container service\r\n */\r\n private async registerReLoginComponent(): Promise<void> {\r\n if (this.containerService.isComponentRegistered('re-login')) {\r\n return;\r\n }\r\n\r\n try {\r\n const module = await import('./re-login.component');\r\n if (!module.CideAuthReLoginComponent) {\r\n throw new Error('Component class not found in module');\r\n }\r\n this.containerService.registerComponent('re-login', module.CideAuthReLoginComponent);\r\n } catch (error) {\r\n console.error('Failed to register re-login component:', error);\r\n }\r\n }\r\n\r\n /**\r\n * Show re-login in floating container\r\n */\r\n async show(): Promise<string | null> {\r\n // Ensure component is registered\r\n if (!this.containerService.isComponentRegistered('re-login')) {\r\n await this.registerReLoginComponent();\r\n }\r\n\r\n const config: FloatingContainerConfig = {\r\n id: 're-login-container',\r\n title: 'Re-Login Required',\r\n icon: 'lock',\r\n width: '420px',\r\n height: 'auto',\r\n minWidth: '400px',\r\n minHeight: '200px',\r\n resizable: false,\r\n draggable: true,\r\n closable: false, // Prevent closing - user must re-login\r\n minimizable: false,\r\n maximizable: false,\r\n componentId: 're-login',\r\n componentConfig: {\r\n inputs: {},\r\n outputs: {}\r\n }\r\n };\r\n\r\n this.containerId = this.containerService.show(config);\r\n return this.containerId;\r\n }\r\n\r\n /**\r\n * Hide re-login floating container\r\n */\r\n hide(): void {\r\n if (this.containerId) {\r\n this.containerService.hide(this.containerId);\r\n this.containerId = null;\r\n }\r\n }\r\n}\r\n","import { Component, inject, OnInit, OnDestroy, signal, computed } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { DestroyRef } from '@angular/core';\r\nimport {\r\n loginMethod,\r\n MReLogin,\r\n reLoginControllerResponse\r\n} from 'cloud-ide-lms-model';\r\nimport { CideInputComponent, CideEleButtonComponent } from 'cloud-ide-element';\r\nimport { ReLoginService } from './re-login.service';\r\n\r\n@Component({\r\n selector: 'cide-auth-re-login',\r\n standalone: true,\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n CideInputComponent,\r\n CideEleButtonComponent\r\n ],\r\n template: `\r\n <div class=\"tw-w-full tw-max-w-md tw-mx-auto tw-p-6\">\r\n <div class=\"tw-text-center tw-mb-6\">\r\n <h2 class=\"tw-text-2xl tw-font-semibold tw-text-gray-900 tw-mb-2\">Session Expired</h2>\r\n <p class=\"tw-text-sm tw-text-gray-600\">Please re-authenticate to continue</p>\r\n </div>\r\n\r\n @if (error()) {\r\n <div class=\"tw-mb-4 tw-p-3 tw-bg-red-50 tw-border tw-border-red-200 tw-rounded-lg\">\r\n <p class=\"tw-text-sm tw-text-red-600\">{{ error() }}</p>\r\n </div>\r\n }\r\n\r\n <form [formGroup]=\"reLoginForm\" (ngSubmit)=\"onSubmit()\" novalidate>\r\n <div class=\"tw-space-y-4\">\r\n @if (loginMethod() === 'pass') {\r\n <div>\r\n <cide-ele-input\r\n label=\"Password\"\r\n formControlName=\"user_password\"\r\n type=\"password\"\r\n placeholder=\"Enter your password\"\r\n [required]=\"true\">\r\n </cide-ele-input>\r\n </div>\r\n } @else {\r\n <div>\r\n <cide-ele-input\r\n label=\"MPIN\"\r\n formControlName=\"mpin_pin\"\r\n type=\"password\"\r\n placeholder=\"Enter your MPIN\"\r\n [maxlength]=\"6\"\r\n [required]=\"true\">\r\n </cide-ele-input>\r\n </div>\r\n }\r\n\r\n <div class=\"tw-flex tw-gap-3 tw-pt-4\">\r\n <button\r\n type=\"submit\"\r\n cideEleButton\r\n variant=\"primary\"\r\n [loading]=\"isLoading()\"\r\n [disabled]=\"!reLoginForm.valid || isLoading()\"\r\n class=\"tw-flex-1\">\r\n Re-Login\r\n </button>\r\n <button\r\n type=\"button\"\r\n cideEleButton\r\n variant=\"outline\"\r\n [disabled]=\"isLoading()\"\r\n (click)=\"onCancel()\"\r\n class=\"tw-flex-1\">\r\n Cancel\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n `,\r\n styles: []\r\n})\r\nexport class CideAuthReLoginComponent implements OnInit, OnDestroy {\r\n private reLoginService = inject(ReLoginService);\r\n private readonly destroyRef = inject(DestroyRef);\r\n\r\n loginMethod = signal<loginMethod>('pass');\r\n isLoading = this.reLoginService.isLoading;\r\n error = this.reLoginService.error;\r\n\r\n reLoginForm = new FormGroup({\r\n custom_login_method: new FormControl<loginMethod>('pass', [Validators.required]),\r\n user_password: new FormControl<string>(''),\r\n mpin_pin: new FormControl<string>('')\r\n });\r\n\r\n ngOnInit(): void {\r\n // Subscribe to re-login service to determine login method\r\n // For now, default to password - this could be configured from settings\r\n this.loginMethod.set('pass');\r\n this.reLoginForm.patchValue({\r\n custom_login_method: 'pass'\r\n });\r\n\r\n // Update validators based on login method\r\n this.updateValidators();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n // Cleanup handled by takeUntilDestroyed\r\n }\r\n\r\n private updateValidators(): void {\r\n const method = this.loginMethod();\r\n \r\n if (method === 'pass') {\r\n this.reLoginForm.get('user_password')?.setValidators([Validators.required]);\r\n this.reLoginForm.get('mpin_pin')?.clearValidators();\r\n this.reLoginForm.get('mpin_pin')?.setValue('');\r\n } else {\r\n this.reLoginForm.get('mpin_pin')?.setValidators([Validators.required, Validators.minLength(4), Validators.maxLength(6)]);\r\n this.reLoginForm.get('user_password')?.clearValidators();\r\n this.reLoginForm.get('user_password')?.setValue('');\r\n }\r\n\r\n this.reLoginForm.get('user_password')?.updateValueAndValidity();\r\n this.reLoginForm.get('mpin_pin')?.updateValueAndValidity();\r\n }\r\n\r\n onSubmit(): void {\r\n if (this.reLoginForm.valid) {\r\n const formValue = this.reLoginForm.value;\r\n const payload: MReLogin = new MReLogin({\r\n custom_login_method: formValue.custom_login_method || 'pass',\r\n user_password: formValue.user_password || undefined,\r\n mpin_pin: formValue.mpin_pin || undefined\r\n } as MReLogin);\r\n\r\n this.reLoginService.reLogin(payload)\r\n .pipe(takeUntilDestroyed(this.destroyRef))\r\n .subscribe({\r\n next: (response: reLoginControllerResponse) => {\r\n this.reLoginService.handleReLoginSuccess(response);\r\n },\r\n error: () => {\r\n // Error is handled in the service\r\n }\r\n });\r\n }\r\n }\r\n\r\n onCancel(): void {\r\n this.reLoginService.hideReLogin();\r\n }\r\n}\r\n","import { Route } from '@angular/router';\r\n\r\nexport const authRoutes: Route = {\r\n path: \"auth\",\r\n loadComponent: () => import('./cloud-ide-auth.component').then(c => c.CloudIdeAuthComponent),\r\n children: [\r\n {\r\n path: \"\",\r\n pathMatch: 'full',\r\n redirectTo: 'sign-in'\r\n },\r\n {\r\n path: \"sign-in\",\r\n loadComponent: () => import('./auth/sign-in/sign-in.component').then(c => c.CideAuthSignInComponent)\r\n },\r\n {\r\n path: \"forgot-password\",\r\n loadComponent: () => import('./auth/forgot-password/forgot-password.component').then(c => c.CideAuthForgotPasswordComponent)\r\n },\r\n {\r\n path: \"reset-password/:rout_token\",\r\n loadComponent: () => import('./auth/reset-password/reset-password.component').then(c => c.CideAuthResetPasswordComponent)\r\n }\r\n ]\r\n}\r\n","import { inject } from '@angular/core';\r\nimport { CanActivateFn, Router } from '@angular/router';\r\nimport { IAuthService, AUTH_SERVICE_TOKEN, IAppStateService, APP_STATE_SERVICE_TOKEN } from 'cloud-ide-shared';\r\n\r\nexport const authGuard: CanActivateFn = (route, state) => {\r\n const authService = inject(AUTH_SERVICE_TOKEN) as IAuthService;\r\n const appState = inject(APP_STATE_SERVICE_TOKEN) as IAppStateService;\r\n const router = inject(Router);\r\n \r\n // Refresh auth state to make sure it's current\r\n authService.refreshAuthState();\r\n \r\n // Refresh app state from localStorage to ensure synchronization\r\n appState.refreshFromLocalStorage();\r\n \r\n // Check if user is authenticated using app state (modern approach)\r\n if (appState.isUserAuthenticated() && !authService.isTokenExpired()) {\r\n return true;\r\n }\r\n \r\n // Redirect to login page with the intended destination\r\n router.navigate(['/auth/sign-in'], { \r\n queryParams: { returnUrl: state.url }\r\n });\r\n \r\n return false;\r\n};\r\n","/*\r\n * Public API Surface of cloud-ide-auth\r\n */\r\n\r\nexport * from './lib/cloud-ide-auth.service';\r\nexport * from './lib/cloud-ide-auth.component';\r\nexport * from './lib/auth/forgot-password/forgot-password.component';\r\nexport * from './lib/auth/re-login/re-login.service';\r\nexport * from './lib/auth/re-login/re-login-floating.service';\r\nexport * from './lib/auth/re-login/re-login.component';\r\nexport * from './lib/cloud-ide-auth.routes';\r\nexport * from './lib/guards/auth.guard';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAYa,mBAAmB,CAAA;AACvB,IAAA,aAAa,GAA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QAAQ,CAAC,mBAAmB,EAAE,IAAI,CAAC,WAAW,CAAC,cAAc,EAAE,EAAE;AACnE,QAAA,OAAO,IAAI;;;AAIb,IAAA,MAAM,CAAC,QAAQ,CAAC,CAAC,eAAe,CAAC,EAAE;AACjC,QAAA,WAAW,EAAE,EAAE,SAAS,EAAE,KAAK,CAAC,GAAG;AACpC,KAAA,CAAC;AAEF,IAAA,OAAO,KAAK;AACd;;AC1BA;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"cloud-ide-auth.mjs","sources":["../../../projects/cloud-ide-auth/src/lib/cloud-ide-auth.service.ts","../../../projects/cloud-ide-auth/src/lib/cloud-ide-auth.component.ts","../../../projects/cloud-ide-auth/src/lib/auth/forgot-password/forgot-password.component.ts","../../../projects/cloud-ide-auth/src/lib/auth/forgot-password/forgot-password.component.html","../../../projects/cloud-ide-auth/src/lib/auth/re-login/re-login.service.ts","../../../projects/cloud-ide-auth/src/lib/auth/re-login/re-login-floating.service.ts","../../../projects/cloud-ide-auth/src/lib/auth/re-login/re-login.component.ts","../../../projects/cloud-ide-auth/src/lib/cloud-ide-auth.routes.ts","../../../projects/cloud-ide-auth/src/lib/guards/auth.guard.ts","../../../projects/cloud-ide-auth/src/public-api.ts","../../../projects/cloud-ide-auth/src/cloud-ide-auth.ts"],"sourcesContent":["import { HttpClient } from '@angular/common/http';\r\nimport { Injectable, inject } from '@angular/core';\r\nimport {\r\n authRoutesUrl, cidePath, hostManagerRoutesUrl, AuthUserMst,\r\n loginControllerResponse, MLogin, MForgotPassword, ForgotPasswordControllerResponse,\r\n MResetPassword, ResetPasswordControllerResponse\r\n} from 'cloud-ide-lms-model';\r\nimport { BehaviorSubject, Observable } from 'rxjs';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CloudIdeAuthService {\r\n public auth_user_mst: BehaviorSubject<AuthUserMst> = new BehaviorSubject({});\r\n private _auth_token: string = \"\";\r\n\r\n // Storage keys\r\n private readonly TOKEN_STORAGE_KEY = 'cide_auth_token';\r\n private readonly USER_STORAGE_KEY = 'cide_auth_user';\r\n\r\n // Modern Angular v20 dependency injection pattern\r\n private http = inject(HttpClient);\r\n\r\n constructor() {\r\n // Modern Angular v20 pattern: Use constructor for initialization only\r\n this.loadAuthDataFromStorage();\r\n }\r\n\r\n /**\r\n * Check if localStorage is available (browser environment)\r\n */\r\n private isLocalStorageAvailable(): boolean {\r\n try {\r\n return typeof window !== 'undefined' && typeof localStorage !== 'undefined';\r\n } catch {\r\n return false;\r\n }\r\n }\r\n\r\n // Getter and setter for auth_token with localStorage persistence\r\n get auth_token(): string {\r\n return this._auth_token;\r\n }\r\n\r\n set auth_token(value: string) {\r\n this._auth_token = value;\r\n if (!this.isLocalStorageAvailable()) {\r\n return;\r\n }\r\n if (value) {\r\n localStorage.setItem(this.TOKEN_STORAGE_KEY, value);\r\n } else {\r\n localStorage.removeItem(this.TOKEN_STORAGE_KEY);\r\n }\r\n }\r\n\r\n // View-only token for public APIs\r\n private readonly VIEW_ONLY_TOKEN_STORAGE_KEY = 'cloud_ide_view_only_token';\r\n private _view_only_token: string = '';\r\n\r\n get view_only_token(): string {\r\n return this._view_only_token;\r\n }\r\n\r\n set view_only_token(value: string) {\r\n this._view_only_token = value;\r\n if (!this.isLocalStorageAvailable()) {\r\n return;\r\n }\r\n if (value) {\r\n localStorage.setItem(this.VIEW_ONLY_TOKEN_STORAGE_KEY, value);\r\n } else {\r\n localStorage.removeItem(this.VIEW_ONLY_TOKEN_STORAGE_KEY);\r\n }\r\n }\r\n\r\n // Load authentication data from localStorage on service initialization\r\n private loadAuthDataFromStorage(): void {\r\n if (!this.isLocalStorageAvailable()) {\r\n return;\r\n }\r\n\r\n try {\r\n // Load token\r\n const storedToken = localStorage.getItem(this.TOKEN_STORAGE_KEY);\r\n if (storedToken) {\r\n this._auth_token = storedToken;\r\n }\r\n\r\n // Load view-only token\r\n const storedViewOnlyToken = localStorage.getItem(this.VIEW_ONLY_TOKEN_STORAGE_KEY);\r\n if (storedViewOnlyToken) {\r\n this._view_only_token = storedViewOnlyToken;\r\n }\r\n\r\n // Load user data\r\n const storedUserData = localStorage.getItem(this.USER_STORAGE_KEY);\r\n if (storedUserData) {\r\n const userData = JSON.parse(storedUserData);\r\n this.auth_user_mst.next(userData);\r\n }\r\n } catch (error) {\r\n // Silent error handling for auth data loading\r\n }\r\n }\r\n\r\n // Store user data in localStorage\r\n public storeUserData(userData: AuthUserMst): void {\r\n if (userData) {\r\n this.auth_user_mst.next(userData);\r\n if (this.isLocalStorageAvailable()) {\r\n localStorage.setItem(this.USER_STORAGE_KEY, JSON.stringify(userData));\r\n }\r\n }\r\n }\r\n\r\n signIn(body: MLogin): Observable<loginControllerResponse> {\r\n if (body?.user_password) {\r\n if (body?.user_password?.length <= 6) {\r\n body.custom_login_method = \"mpin\";\r\n body.mpin_pin = body?.user_password;\r\n body.user_password = \"\";\r\n }\r\n }\r\n return this.http?.post(cidePath?.join([hostManagerRoutesUrl?.cideSuiteHost, authRoutesUrl?.module, authRoutesUrl?.signIn]), body);\r\n }\r\n\r\n forgotPassword(body: MForgotPassword): Observable<ForgotPasswordControllerResponse> {\r\n return this.http?.post(cidePath?.join([hostManagerRoutesUrl?.cideSuiteHost, authRoutesUrl?.module, authRoutesUrl?.forgotPassword]), body);\r\n }\r\n\r\n resetPassword(body: MResetPassword): Observable<ResetPasswordControllerResponse> {\r\n const payload = new MResetPassword(body);\r\n if (payload?.Validate) {\r\n payload?.Validate();\r\n }\r\n return this.http?.post(cidePath?.join([hostManagerRoutesUrl?.cideSuiteHost, authRoutesUrl?.module, authRoutesUrl?.resetPassword]), body);\r\n }\r\n\r\n // Sign out the user and clear all stored auth data\r\n signOut(): void {\r\n // Clear token and user data from memory\r\n this._auth_token = \"\";\r\n this.auth_user_mst.next({});\r\n\r\n // Clear stored data\r\n if (this.isLocalStorageAvailable()) {\r\n localStorage.removeItem(this.TOKEN_STORAGE_KEY);\r\n localStorage.removeItem(this.USER_STORAGE_KEY);\r\n }\r\n }\r\n\r\n // Check if user is authenticated\r\n isAuthenticated(): boolean {\r\n return !!this._auth_token;\r\n }\r\n\r\n // Get current user data \r\n getCurrentUser(): AuthUserMst {\r\n return this.auth_user_mst.getValue();\r\n }\r\n\r\n // Check if token is expired\r\n isTokenExpired(): boolean {\r\n try {\r\n if (!this._auth_token) {\r\n return true;\r\n }\r\n\r\n // Extract the payload from the JWT token\r\n const tokenParts = this._auth_token.split('.');\r\n if (tokenParts.length !== 3) {\r\n return true; // Not a valid JWT token\r\n }\r\n\r\n const payload = JSON.parse(atob(tokenParts[1]));\r\n\r\n // Check expiration time\r\n const expiration = payload.exp * 1000; // Convert seconds to milliseconds\r\n return Date.now() >= expiration;\r\n } catch (error) {\r\n return true; // Assume expired if there's an error\r\n }\r\n }\r\n\r\n // Refresh auth data if needed based on stored data\r\n refreshAuthState(): void {\r\n // If we have a token but no user data, try to load user data\r\n if (this._auth_token && this.auth_user_mst && Object.keys(this.auth_user_mst.getValue()).length === 0 && this.isLocalStorageAvailable()) {\r\n const storedUserData = localStorage.getItem(this.USER_STORAGE_KEY);\r\n if (storedUserData) {\r\n try {\r\n const userData = JSON.parse(storedUserData);\r\n this.auth_user_mst.next(userData);\r\n } catch (error) {\r\n // Silent error handling for parsing user data\r\n }\r\n }\r\n }\r\n\r\n // If token is expired, sign out\r\n if (this.isTokenExpired()) {\r\n this.signOut();\r\n }\r\n }\r\n}\r\n","import { Component } from '@angular/core';\r\nimport { RouterOutlet } from '@angular/router';\r\n\r\n@Component({\r\n selector: 'cide-auth-wrapper',\r\n standalone: true,\r\n imports: [RouterOutlet],\r\n template: `\r\n <router-outlet></router-outlet>\r\n `,\r\n styles: ``\r\n})\r\nexport class CloudIdeAuthComponent {\r\n\r\n}\r\n","import { Component, inject } from '@angular/core';\r\nimport { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';\r\nimport { CommonModule } from '@angular/common';\r\nimport { Router } from '@angular/router';\r\nimport { FormGroupModel } from '../sign-in/sign-in.component';\r\nimport { forgotPasswordMethod, MForgotPassword, validateRequestModal } from 'cloud-ide-lms-model';\r\nimport { CloudIdeAuthService } from '../../cloud-ide-auth.service';\r\nimport { CideEleButtonComponent, CideInputComponent } from 'cloud-ide-element';\r\n\r\n@Component({\r\n selector: 'cide-auth-forgot-password',\r\n standalone: true,\r\n imports: [CideInputComponent, ReactiveFormsModule, CommonModule, CideEleButtonComponent],\r\n templateUrl: './forgot-password.component.html',\r\n styleUrl: './forgot-password.component.css'\r\n})\r\nexport class CideAuthForgotPasswordComponent {\r\n public setup_param = { form_loading: false };\r\n public forgotPassswordForm: FormGroupModel<MForgotPassword>;\r\n public erro_message = \"\";\r\n\r\n private authService = inject(CloudIdeAuthService);\r\n private route = inject(Router);\r\n\r\n constructor() {\r\n\r\n this.forgotPassswordForm = new FormGroup({\r\n custom_forgot_password_method: new FormControl<forgotPasswordMethod>('username'),\r\n user_username: new FormControl(''),\r\n user_emailid: new FormControl(''),\r\n user_mobileno: new FormControl(),\r\n }) as unknown as FormGroupModel<MForgotPassword>;\r\n }\r\n\r\n onForgotPasssword() {\r\n if (this.forgotPassswordForm.valid) {\r\n this.setup_param.form_loading = true;\r\n const validate = validateRequestModal(new MForgotPassword(this.forgotPassswordForm?.value as MForgotPassword));\r\n console.log(validate)\r\n if(validate === true){\r\n this.authService.forgotPassword(this.forgotPassswordForm?.value as MForgotPassword)?.subscribe({\r\n next: (response) => {\r\n if (response?.success === true) {\r\n this.setup_param.form_loading = false;\r\n this.route.navigate(['auth', 'sign-in'])\r\n }\r\n },\r\n error: (error) => {\r\n this.setup_param.form_loading = false;\r\n this.erro_message = error?.error?.message;\r\n console.log(error)\r\n setTimeout(() => {\r\n this.erro_message = \"\"\r\n }, 3000)\r\n }\r\n });\r\n } else {\r\n this.setup_param.form_loading = false;\r\n this.erro_message = validate.first;\r\n setTimeout(() => {\r\n this.erro_message = \"\"\r\n }, 3000)\r\n }\r\n }\r\n }\r\n}","<!-- https://play.tailwindcss.com/lfO85drpUy -->\r\n<!-- Main Div Outer Div-->\r\n<div class=\"cide-font-poppins tw-flex tw-min-h-screen tw-w-full tw-bg-gray-50 tw-py-3\">\r\n <!-- Forrm Wrapper -->\r\n <div class=\"tw-m-auto tw-w-96 tw-rounded-2xl tw-bg-white tw-py-6 tw-shadow-xl\">\r\n <!-- Logo Wrapper -->\r\n <div class=\"tw-m-auto tw-h-32 tw-w-64 tw-text-center\">\r\n <img src=\"https://console.cloudidesys.com/assets/Cloud%20IDE%20Logo%20Dark.png\" class=\"tw-m-auto tw-h-full\"\r\n alt=\"Cloud IDE Logo\" />\r\n </div> <!-- Entity name here -->\r\n <div class=\"tw-my-2 tw-text-center tw-text-xl tw-font-semibold\">Forgot Password</div>\r\n <!-- Error Logger -->\r\n <div class=\"tw-w-full tw-select-none tw-py-1 tw-text-center tw-text-red-500 tw-h-4 tw-text-sm\">{{erro_message}}</div>\r\n \r\n <!-- section for controls -->\r\n <form [formGroup]=\"forgotPassswordForm\" (ngSubmit)=\"onForgotPasssword()\" novalidate>\r\n <div class=\"tw-m-auto tw-pb-3 tw-pt-3\">\r\n <!-- Username -->\r\n <div class=\"tw-m-auto tw-w-80\">\r\n <cide-ele-input id=\"user_username\" formControlName=\"user_username\"></cide-ele-input>\r\n </div> <!-- Forgot Password button -->\r\n <div class=\"tw-w-80 tw-m-auto tw-mt-3\">\r\n <button cideEleButton id=\"reset_password_link_button\" [loading]=\"setup_param.form_loading\" [disabled]=\"!forgotPassswordForm.valid\">Reset Password</button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n </div>","import { Injectable, inject, signal } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { BehaviorSubject, Observable, catchError, of } from 'rxjs';\nimport {\n authRoutesUrl,\n cidePath,\n hostManagerRoutesUrl,\n MReLogin,\n reLoginControllerResponse,\n AuthUserMst\n} from 'cloud-ide-lms-model';\nimport { CloudIdeAuthService } from '../../cloud-ide-auth.service';\n\n/**\n * Service to handle re-login functionality when 401 errors occur\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class ReLoginService {\n private http = inject(HttpClient);\n private authService = inject(CloudIdeAuthService);\n\n // Observable to control re-login dialog visibility\n private showReLoginSubject = new BehaviorSubject<boolean>(false);\n public showReLogin$ = this.showReLoginSubject.asObservable();\n\n // Signal for re-login state\n isLoading = signal<boolean>(false);\n error = signal<string | null>(null);\n\n /**\n * Show re-login dialog\n */\n showReLogin(): void {\n // Only show if we have a token (session expired scenario)\n if (this.authService.auth_token) {\n this.showReLoginSubject.next(true);\n }\n }\n\n /**\n * Hide re-login dialog\n */\n hideReLogin(): void {\n this.showReLoginSubject.next(false);\n this.error.set(null);\n }\n\n /**\n * Perform re-login with MPIN or password\n */\n reLogin(payload: MReLogin): Observable<reLoginControllerResponse> {\n this.isLoading.set(true);\n this.error.set(null);\n\n // Add token to payload\n const reLoginPayload: MReLogin = {\n ...payload,\n token: this.authService.auth_token\n };\n\n const url = cidePath.join([\n hostManagerRoutesUrl.cideSuiteHost,\n authRoutesUrl.module,\n authRoutesUrl.createReLoginSession\n ]);\n\n return this.http.post<reLoginControllerResponse>(url, reLoginPayload).pipe(\n catchError((err) => {\n this.isLoading.set(false);\n this.error.set(err?.error?.message || 'Re-login failed');\n return of({\n success: false,\n message: err?.error?.message || 'Re-login failed'\n } as reLoginControllerResponse);\n })\n );\n }\n\n /**\n * Handle successful re-login\n */\n handleReLoginSuccess(response: reLoginControllerResponse): void {\n if (response.success && response.token) {\n // Update auth token\n this.authService.auth_token = response.token;\n\n // Update user data if available\n if (response.data) {\n const userData = response.data as AuthUserMst;\n this.authService.storeUserData(userData);\n }\n\n // Hide re-login dialog\n this.hideReLogin();\n this.isLoading.set(false);\n } else {\n this.error.set(response.message || 'Re-login failed');\n this.isLoading.set(false);\n }\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { CideEleFloatingContainerService } from 'cloud-ide-element';\nimport { ReLoginService } from './re-login.service';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { DestroyRef } from '@angular/core';\nimport type { FloatingContainerConfig } from 'cloud-ide-element';\n\n/**\n * Service to manage re-login component in floating container\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class ReLoginFloatingService {\n private containerService = inject(CideEleFloatingContainerService);\n private reLoginService = inject(ReLoginService);\n private readonly destroyRef = inject(DestroyRef);\n private containerId: string | null = null;\n\n constructor() {\n // Register the component when service is initialized\n this.registerReLoginComponent();\n\n // Subscribe to re-login service to show/hide dialog\n this.reLoginService.showReLogin$\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((shouldShow) => {\n if (shouldShow && !this.containerId) {\n this.show();\n } else if (!shouldShow && this.containerId) {\n this.hide();\n }\n });\n }\n\n /**\n * Register re-login component with floating container service\n */\n private async registerReLoginComponent(): Promise<void> {\n if (this.containerService.isComponentRegistered('re-login')) {\n return;\n }\n\n try {\n const module = await import('./re-login.component');\n if (!module.CideAuthReLoginComponent) {\n throw new Error('Component class not found in module');\n }\n this.containerService.registerComponent('re-login', module.CideAuthReLoginComponent);\n } catch (error) {\n console.error('Failed to register re-login component:', error);\n }\n }\n\n /**\n * Show re-login in floating container\n */\n async show(): Promise<string | null> {\n // Ensure component is registered\n if (!this.containerService.isComponentRegistered('re-login')) {\n await this.registerReLoginComponent();\n }\n\n const config: FloatingContainerConfig = {\n id: 're-login-container',\n title: 'Re-Login Required',\n icon: 'lock',\n backdrop: true,\n width: '420px',\n height: 'auto',\n minWidth: '400px',\n minHeight: '200px',\n resizable: false,\n draggable: true,\n closable: false, // Prevent closing - user must re-login\n minimizable: false,\n maximizable: false,\n componentId: 're-login',\n componentConfig: {\n inputs: {},\n outputs: {}\n }\n };\n\n this.containerId = this.containerService.show(config);\n return this.containerId;\n }\n\n /**\n * Hide re-login floating container\n */\n hide(): void {\n if (this.containerId) {\n this.containerService.hide(this.containerId);\n this.containerId = null;\n }\n }\n}\n","import { Component, inject, OnInit, OnDestroy, signal } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { DestroyRef } from '@angular/core';\nimport {\n loginMethod,\n MReLogin,\n reLoginControllerResponse\n} from 'cloud-ide-lms-model';\nimport { CideInputComponent, CideEleButtonComponent } from 'cloud-ide-element';\nimport { ReLoginService } from './re-login.service';\n\n@Component({\n selector: 'cide-auth-re-login',\n standalone: true,\n imports: [\n CommonModule,\n ReactiveFormsModule,\n CideInputComponent,\n CideEleButtonComponent\n ],\n template: `\n <div class=\"tw-w-full tw-max-w-md tw-mx-auto tw-p-6\">\n <div class=\"tw-text-center tw-mb-6\">\n <h2 class=\"tw-text-2xl tw-font-semibold tw-text-gray-900 tw-mb-2\">Session Expired</h2>\n <p class=\"tw-text-sm tw-text-gray-600\">Please re-authenticate to continue</p>\n </div>\n\n @if (error()) {\n <div class=\"tw-mb-4 tw-p-3 tw-bg-red-50 tw-border tw-border-red-200 tw-rounded-lg\">\n <p class=\"tw-text-sm tw-text-red-600\">{{ error() }}</p>\n </div>\n }\n\n <form [formGroup]=\"reLoginForm\" (ngSubmit)=\"onSubmit()\" novalidate>\n <div class=\"tw-space-y-4\">\n <!-- Single input field for both password and MPIN -->\n <div>\n <cide-ele-input\n id=\"user_password_mpin\"\n formControlName=\"user_password\"\n type=\"password\"\n placeholder=\"Enter your password or MPIN\"\n [required]=\"true\">\n </cide-ele-input>\n </div>\n\n <div class=\"tw-flex tw-gap-3 tw-pt-4\">\n <button\n type=\"submit\"\n cideEleButton\n variant=\"primary\"\n [loading]=\"isLoading()\"\n [disabled]=\"!reLoginForm.valid || isLoading()\"\n class=\"tw-flex-1\">\n Re-Login\n </button>\n </div>\n </div>\n </form>\n </div>\n `,\n styles: []\n})\nexport class CideAuthReLoginComponent implements OnInit, OnDestroy {\n private reLoginService = inject(ReLoginService);\n private readonly destroyRef = inject(DestroyRef);\n\n // Page code for tracking/configuration\n readonly pageCode = 'auth_relogin_dialog';\n\n isLoading = this.reLoginService.isLoading;\n error = this.reLoginService.error;\n\n reLoginForm = new FormGroup({\n custom_login_method: new FormControl<loginMethod>('pass', [Validators.required]),\n user_password: new FormControl<string>('', [Validators.required])\n });\n\n ngOnInit(): void {\n // Set default login method to password\n this.reLoginForm.patchValue({\n custom_login_method: 'pass'\n });\n }\n\n ngOnDestroy(): void {\n // Cleanup handled by takeUntilDestroyed\n }\n\n onSubmit(): void {\n if (this.reLoginForm.valid) {\n const formValue = this.reLoginForm.value;\n const passwordValue = formValue.user_password || '';\n \n // Auto-detect MPIN vs Password based on length (same as login screen)\n // If length <= 6, treat as MPIN, otherwise as password\n let customLoginMethod: loginMethod = 'pass';\n let userPassword: string | undefined = passwordValue;\n let mpinPin: string | undefined = undefined;\n\n if (passwordValue && passwordValue.length <= 6) {\n customLoginMethod = 'mpin';\n mpinPin = passwordValue;\n userPassword = undefined;\n }\n\n const payload: MReLogin = new MReLogin({\n custom_login_method: customLoginMethod,\n user_password: userPassword,\n mpin_pin: mpinPin\n } as MReLogin);\n\n this.reLoginService.reLogin(payload)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe({\n next: (response: reLoginControllerResponse) => {\n this.reLoginService.handleReLoginSuccess(response);\n },\n error: () => {\n // Error is handled in the service\n }\n });\n }\n }\n}\n\n","import { Route } from '@angular/router';\r\n\r\nexport const authRoutes: Route = {\r\n path: \"auth\",\r\n loadComponent: () => import('./cloud-ide-auth.component').then(c => c.CloudIdeAuthComponent),\r\n children: [\r\n {\r\n path: \"\",\r\n pathMatch: 'full',\r\n redirectTo: 'sign-in'\r\n },\r\n {\r\n path: \"sign-in\",\r\n loadComponent: () => import('./auth/sign-in/sign-in.component').then(c => c.CideAuthSignInComponent)\r\n },\r\n {\r\n path: \"forgot-password\",\r\n loadComponent: () => import('./auth/forgot-password/forgot-password.component').then(c => c.CideAuthForgotPasswordComponent)\r\n },\r\n {\r\n path: \"reset-password/:rout_token\",\r\n loadComponent: () => import('./auth/reset-password/reset-password.component').then(c => c.CideAuthResetPasswordComponent)\r\n }\r\n ]\r\n}\r\n","import { inject } from '@angular/core';\r\nimport { CanActivateFn, Router } from '@angular/router';\r\nimport { IAuthService, AUTH_SERVICE_TOKEN, IAppStateService, APP_STATE_SERVICE_TOKEN } from 'cloud-ide-shared';\r\n\r\nexport const authGuard: CanActivateFn = (route, state) => {\r\n const authService = inject(AUTH_SERVICE_TOKEN) as IAuthService;\r\n const appState = inject(APP_STATE_SERVICE_TOKEN) as IAppStateService;\r\n const router = inject(Router);\r\n \r\n // Check if user is authenticated using current state (without refreshing first)\r\n const isAuthenticated = appState.isUserAuthenticated() && !authService.isTokenExpired();\r\n \r\n // Defer state refresh to next change detection cycle to avoid ExpressionChangedAfterItHasBeenCheckedError\r\n Promise.resolve().then(() => {\r\n // Refresh auth state to make sure it's current\r\n authService.refreshAuthState();\r\n \r\n // Refresh app state from localStorage to ensure synchronization\r\n appState.refreshFromLocalStorage();\r\n });\r\n \r\n if (isAuthenticated) {\r\n return true;\r\n }\r\n \r\n // Redirect to login page with the intended destination\r\n router.navigate(['/auth/sign-in'], { \r\n queryParams: { returnUrl: state.url }\r\n });\r\n \r\n return false;\r\n};\r\n","/*\n * Public API Surface of cloud-ide-auth\n */\n\nexport * from './lib/cloud-ide-auth.service';\nexport * from './lib/cloud-ide-auth.component';\nexport * from './lib/auth/forgot-password/forgot-password.component';\nexport * from './lib/auth/re-login/re-login.service';\nexport * from './lib/auth/re-login/re-login-floating.service';\nexport * from './lib/auth/re-login/re-login.component';\nexport * from './lib/cloud-ide-auth.routes';\nexport * from './lib/guards/auth.guard';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAYa,mBAAmB,CAAA;AACvB,IAAA,aAAa,GAAiC,IAAI,eAAe,CAAC,EAAE,CAAC;IACpE,WAAW,GAAW,EAAE;;IAGf,iBAAiB,GAAG,iBAAiB;IACrC,gBAAgB,GAAG,g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AC,CAAC,uBAAuB;AACtG,SAAA;AACD,QAAA;AACI,YAAA,IAAI,EAAE,iBAAiB;AACvB,YAAA,aAAa,EAAE,MAAM,wEAA0D,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,+BAA+B;AAC9H,SAAA;AACD,QAAA;AACI,YAAA,IAAI,EAAE,4BAA4B;AAClC,YAAA,aAAa,EAAE,MAAM,OAAO,wDAAgD,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,8BAA8B;AAC3H;AACJ;;;MCnBQ,SAAS,GAAkB,CAAC,KAAK,EAAE,KAAK,KAAI;AACvD,IAAA,MAAM,WAAW,GAAG,MAAM,CAAC,kBAAkB,CAAiB;AAC9D,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,uBAAuB,CAAqB;AACpE,IAAA,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;;AAG7B,IAAA,MAAM,eAAe,GAAG,QAAQ,CAAC,mBAAmB,EAAE,IAAI,CAAC,WAAW,CAAC,cAAc,EAAE;;AAGvF,IAAA,OAAO,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,MAAK;;QAE1B,WAAW,CAAC,gBAAgB,EAAE;;QAG9B,QAAQ,CAAC,uBAAuB,EAAE;AACpC,KAAC,CAAC;IAEF,IAAI,eAAe,EAAE;AACnB,QAAA,OAAO,IAAI;;;AAIb,IAAA,MAAM,CAAC,QAAQ,CAAC,CAAC,eAAe,CAAC,EAAE;AACjC,QAAA,WAAW,EAAE,EAAE,SAAS,EAAE,KAAK,CAAC,GAAG;AACpC,KAAA,CAAC;AAEF,IAAA,OAAO,KAAK;AACd;;AC/BA;;AAEG;;ACFH;;AAEG;;;;"}
|
package/index.d.ts
CHANGED
|
@@ -18,6 +18,10 @@ declare class CloudIdeAuthService {
|
|
|
18
18
|
private isLocalStorageAvailable;
|
|
19
19
|
get auth_token(): string;
|
|
20
20
|
set auth_token(value: string);
|
|
21
|
+
private readonly VIEW_ONLY_TOKEN_STORAGE_KEY;
|
|
22
|
+
private _view_only_token;
|
|
23
|
+
get view_only_token(): string;
|
|
24
|
+
set view_only_token(value: string);
|
|
21
25
|
private loadAuthDataFromStorage;
|
|
22
26
|
storeUserData(userData: AuthUserMst): void;
|
|
23
27
|
signIn(body: MLogin): Observable<loginControllerResponse>;
|
|
@@ -113,19 +117,16 @@ declare class ReLoginFloatingService {
|
|
|
113
117
|
declare class CideAuthReLoginComponent implements OnInit, OnDestroy {
|
|
114
118
|
private reLoginService;
|
|
115
119
|
private readonly destroyRef;
|
|
116
|
-
|
|
120
|
+
readonly pageCode = "auth_relogin_dialog";
|
|
117
121
|
isLoading: i0.WritableSignal<boolean>;
|
|
118
122
|
error: i0.WritableSignal<string | null>;
|
|
119
123
|
reLoginForm: FormGroup<{
|
|
120
124
|
custom_login_method: FormControl<loginMethod | null>;
|
|
121
125
|
user_password: FormControl<string | null>;
|
|
122
|
-
mpin_pin: FormControl<string | null>;
|
|
123
126
|
}>;
|
|
124
127
|
ngOnInit(): void;
|
|
125
128
|
ngOnDestroy(): void;
|
|
126
|
-
private updateValidators;
|
|
127
129
|
onSubmit(): void;
|
|
128
|
-
onCancel(): void;
|
|
129
130
|
static ɵfac: i0.ɵɵFactoryDeclaration<CideAuthReLoginComponent, never>;
|
|
130
131
|
static ɵcmp: i0.ɵɵComponentDeclaration<CideAuthReLoginComponent, "cide-auth-re-login", never, {}, {}, never, never, true, never>;
|
|
131
132
|
}
|