@acontplus/ng-auth 1.1.7 → 1.2.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/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
- import { BaseUseCase, ITokenProvider } from '@acontplus/ng-infrastructure';
2
- export { ITokenProvider, TOKEN_PROVIDER } from '@acontplus/ng-infrastructure';
1
+ import { AuthTokenRepository } from '@acontplus/ng-config';
2
+ export { AUTH_TOKEN, AuthTokenRepository } from '@acontplus/ng-config';
3
3
  import { Observable } from 'rxjs';
4
+ import { BaseUseCase } from '@acontplus/ng-infrastructure';
4
5
  import { AuthTokens, UserData } from '@acontplus/core';
5
6
  import * as i0 from '@angular/core';
6
7
  import { Provider, OnDestroy, OnInit, TemplateRef } from '@angular/core';
@@ -96,7 +97,7 @@ declare const csrfInterceptor: HttpInterceptorFn;
96
97
 
97
98
  declare const authProviders: Provider[];
98
99
 
99
- declare class TokenRepository implements ITokenProvider {
100
+ declare class AuthTokenRepositoryImpl implements AuthTokenRepository {
100
101
  private environment;
101
102
  private platformId;
102
103
  saveTokens(tokens: AuthTokens, rememberMe?: boolean): void;
@@ -117,8 +118,8 @@ declare class TokenRepository implements ITokenProvider {
117
118
  * Extract array field from decoded token, trying multiple possible field names
118
119
  */
119
120
  private extractArrayField;
120
- static ɵfac: i0.ɵɵFactoryDeclaration<TokenRepository, never>;
121
- static ɵprov: i0.ɵɵInjectableDeclaration<TokenRepository>;
121
+ static ɵfac: i0.ɵɵFactoryDeclaration<AuthTokenRepositoryImpl, never>;
122
+ static ɵprov: i0.ɵɵInjectableDeclaration<AuthTokenRepositoryImpl>;
122
123
  }
123
124
 
124
125
  /**
@@ -126,7 +127,7 @@ declare class TokenRepository implements ITokenProvider {
126
127
  * Stores the intended URL when session is lost and redirects to it after successful login
127
128
  * SSR-compatible by checking platform before accessing sessionStorage
128
129
  */
129
- declare class UrlRedirectService {
130
+ declare class AuthUrlRedirect {
130
131
  private readonly REDIRECT_URL_KEY;
131
132
  private readonly EXCLUDED_ROUTES;
132
133
  private readonly router;
@@ -172,11 +173,11 @@ declare class UrlRedirectService {
172
173
  * @returns sessionStorage object or null if not available
173
174
  */
174
175
  private getSessionStorage;
175
- static ɵfac: i0.ɵɵFactoryDeclaration<UrlRedirectService, never>;
176
- static ɵprov: i0.ɵɵInjectableDeclaration<UrlRedirectService>;
176
+ static ɵfac: i0.ɵɵFactoryDeclaration<AuthUrlRedirect, never>;
177
+ static ɵprov: i0.ɵɵInjectableDeclaration<AuthUrlRedirect>;
177
178
  }
178
179
 
179
- declare class CsrfService {
180
+ declare class CsrfApi {
180
181
  private http;
181
182
  private csrfToken;
182
183
  /**
@@ -187,8 +188,8 @@ declare class CsrfService {
187
188
  * Clear stored CSRF token (useful on logout)
188
189
  */
189
190
  clearCsrfToken(): void;
190
- static ɵfac: i0.ɵɵFactoryDeclaration<CsrfService, never>;
191
- static ɵprov: i0.ɵɵInjectableDeclaration<CsrfService>;
191
+ static ɵfac: i0.ɵɵFactoryDeclaration<CsrfApi, never>;
192
+ static ɵprov: i0.ɵɵInjectableDeclaration<CsrfApi>;
192
193
  }
193
194
 
194
195
  declare class AuthStore implements OnDestroy {
@@ -249,7 +250,7 @@ declare class AuthStore implements OnDestroy {
249
250
  static ɵprov: i0.ɵɵInjectableDeclaration<AuthStore>;
250
251
  }
251
252
 
252
- declare class LoginComponent implements OnInit {
253
+ declare class Login implements OnInit {
253
254
  title: i0.InputSignal<string>;
254
255
  showRegisterButton: i0.InputSignal<boolean>;
255
256
  showRememberMe: i0.InputSignal<boolean>;
@@ -274,9 +275,9 @@ declare class LoginComponent implements OnInit {
274
275
  switchMode(): void;
275
276
  signIn(): void;
276
277
  registerUser(): void;
277
- static ɵfac: i0.ɵɵFactoryDeclaration<LoginComponent, never>;
278
- static ɵcmp: i0.ɵɵComponentDeclaration<LoginComponent, "acp-login", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "showRegisterButton": { "alias": "showRegisterButton"; "required": false; "isSignal": true; }; "showRememberMe": { "alias": "showRememberMe"; "required": false; "isSignal": true; }; "additionalSigninControls": { "alias": "additionalSigninControls"; "required": false; "isSignal": true; }; "additionalSignupControls": { "alias": "additionalSignupControls"; "required": false; "isSignal": true; }; "additionalSigninFields": { "alias": "additionalSigninFields"; "required": false; "isSignal": true; }; "additionalSignupFields": { "alias": "additionalSignupFields"; "required": false; "isSignal": true; }; "footerContent": { "alias": "footerContent"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
278
+ static ɵfac: i0.ɵɵFactoryDeclaration<Login, never>;
279
+ static ɵcmp: i0.ɵɵComponentDeclaration<Login, "acp-login", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "showRegisterButton": { "alias": "showRegisterButton"; "required": false; "isSignal": true; }; "showRememberMe": { "alias": "showRememberMe"; "required": false; "isSignal": true; }; "additionalSigninControls": { "alias": "additionalSigninControls"; "required": false; "isSignal": true; }; "additionalSignupControls": { "alias": "additionalSignupControls"; "required": false; "isSignal": true; }; "additionalSigninFields": { "alias": "additionalSigninFields"; "required": false; "isSignal": true; }; "additionalSignupFields": { "alias": "additionalSignupFields"; "required": false; "isSignal": true; }; "footerContent": { "alias": "footerContent"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
279
280
  }
280
281
 
281
- export { AuthHttpRepository, AuthRepository, AuthStore, CsrfService, LoginComponent, LoginUseCase, LogoutUseCase, RefreshTokenUseCase, RegisterUseCase, SKIP_CSRF, TokenRepository, UrlRedirectService, authGuard, authProviders, authRedirectInterceptor, csrfInterceptor };
282
+ export { AuthHttpRepository, AuthRepository, AuthStore, AuthTokenRepositoryImpl, AuthUrlRedirect, CsrfApi, Login, LoginUseCase, LogoutUseCase, RefreshTokenUseCase, RegisterUseCase, SKIP_CSRF, authGuard, authProviders, authRedirectInterceptor, csrfInterceptor };
282
283
  export type { LoginRequest, RefreshTokenRequest, RegisterRequest };
package/package.json CHANGED
@@ -1,23 +1,22 @@
1
1
  {
2
2
  "name": "@acontplus/ng-auth",
3
- "version": "1.1.7",
3
+ "version": "1.2.1",
4
4
  "description": "Comprehensive Angular authentication module with JWT token management, route guards, CSRF protection, URL redirection, session handling, and clean architecture patterns. Includes login components, auth interceptors, and DDD-based repositories.",
5
5
  "dependencies": {
6
- "@acontplus/ng-infrastructure": "^1.0.8",
7
- "@acontplus/ng-config": "^1.0.6",
6
+ "@acontplus/ng-infrastructure": "^1.1.1",
7
+ "@acontplus/ng-config": "^1.1.0",
8
8
  "jwt-decode": "^4.0.0",
9
9
  "rxjs": "^7.8.1",
10
10
  "tslib": "^2.3.0"
11
11
  },
12
12
  "peerDependencies": {
13
- "@acontplus/core": "^1.0.17",
13
+ "@acontplus/core": "^1.1.0",
14
14
  "@angular/common": "^20.3.2",
15
15
  "@angular/core": "^20.3.2",
16
16
  "@angular/router": "^20.3.2",
17
17
  "@angular/forms": "^20.3.2",
18
18
  "@angular/platform-browser": "^20.3.2",
19
- "@angular/material": "^20.0.0",
20
- "@angular/cdk": "^20.0.0"
19
+ "@angular/material": "^20.0.0"
21
20
  },
22
21
  "sideEffects": false,
23
22
  "main": "fesm2022/acontplus-ng-auth.mjs",
@@ -42,21 +41,27 @@
42
41
  "authentication",
43
42
  "jwt",
44
43
  "jwt-decode",
45
- "guards",
46
44
  "auth-guard",
47
- "interceptors",
48
- "csrf",
45
+ "route-guards",
46
+ "auth-interceptor",
47
+ "csrf-interceptor",
48
+ "csrf-protection",
49
49
  "url-redirect",
50
- "session",
50
+ "session-management",
51
51
  "token-management",
52
- "login",
52
+ "login-component",
53
+ "auth-providers",
54
+ "auth-repository",
55
+ "auth-stores",
53
56
  "ddd",
54
57
  "clean-architecture",
55
- "repositories",
58
+ "hexagonal-architecture",
56
59
  "use-cases",
60
+ "domain-models",
57
61
  "typescript",
58
- "frontend",
59
- "library"
62
+ "angular-material",
63
+ "enterprise",
64
+ "frontend"
60
65
  ],
61
66
  "author": "Ivan Paz <ifer343@gmail.com>",
62
67
  "license": "MIT",