@abp/ng.oauth 9.3.0-rc.2 → 9.3.0-rc.4
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/abp-ng.oauth.mjs +22 -22
- package/fesm2022/abp-ng.oauth.mjs.map +1 -1
- package/index.d.ts +340 -3
- package/package.json +4 -4
- package/lib/guards/index.d.ts +0 -1
- package/lib/guards/oauth.guard.d.ts +0 -16
- package/lib/handlers/index.d.ts +0 -1
- package/lib/handlers/oauth-configuration.handler.d.ts +0 -12
- package/lib/interceptors/api.interceptor.d.ts +0 -15
- package/lib/interceptors/index.d.ts +0 -1
- package/lib/oauth.module.d.ts +0 -11
- package/lib/providers/index.d.ts +0 -2
- package/lib/providers/navigate-to-manage-profile.provider.d.ts +0 -2
- package/lib/providers/oauth-module-config.provider.d.ts +0 -1
- package/lib/services/index.d.ts +0 -3
- package/lib/services/oauth-error-filter.service.d.ts +0 -14
- package/lib/services/oauth.service.d.ts +0 -27
- package/lib/services/remember-me.service.d.ts +0 -12
- package/lib/strategies/auth-code-flow-strategy.d.ts +0 -15
- package/lib/strategies/auth-flow-strategy.d.ts +0 -33
- package/lib/strategies/auth-password-flow-strategy.d.ts +0 -183
- package/lib/strategies/index.d.ts +0 -3
- package/lib/tokens/auth-flow-strategy.d.ts +0 -7
- package/lib/tokens/index.d.ts +0 -1
- package/lib/utils/auth-utils.d.ts +0 -3
- package/lib/utils/check-access-token.d.ts +0 -2
- package/lib/utils/clear-o-auth-storage.d.ts +0 -2
- package/lib/utils/index.d.ts +0 -5
- package/lib/utils/oauth-storage.d.ts +0 -1
- package/lib/utils/storage.factory.d.ts +0 -2
- package/public-api.d.ts +0 -9
package/index.d.ts
CHANGED
|
@@ -1,5 +1,342 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { ModuleWithProviders, Injector, Provider } from '@angular/core';
|
|
3
|
+
import * as angular_oauth2_oidc from 'angular-oauth2-oidc';
|
|
4
|
+
import { OAuthStorage, OAuthErrorEvent, OAuthService, AuthConfig } from 'angular-oauth2-oidc';
|
|
5
|
+
import * as _abp_ng_core from '@abp/ng.core';
|
|
6
|
+
import { PipeToLoginFn, CheckAuthenticationStateFn, IAuthService, LoginParams, AbpAuthResponse, AbstractAuthErrorFilter, AuthErrorFilter, AbpLocalStorageService, HttpErrorReporterService, EnvironmentService, ConfigStateService, SessionStateService, AbpWindowService, ABP, IApiInterceptor, HttpWaitService, IAbpGuard, AuthService } from '@abp/ng.core';
|
|
7
|
+
import * as rxjs from 'rxjs';
|
|
8
|
+
import { Observable } from 'rxjs';
|
|
9
|
+
import { Params, Router, ActivatedRouteSnapshot, RouterStateSnapshot, UrlTree, CanActivateFn } from '@angular/router';
|
|
10
|
+
import { HttpHeaders, HttpRequest, HttpHandler, HttpEvent } from '@angular/common/http';
|
|
11
|
+
|
|
1
12
|
/**
|
|
2
|
-
*
|
|
13
|
+
* @deprecated AbpOAuthModule is deprecated use `provideAbpOAuth` *function* instead.
|
|
3
14
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
15
|
+
declare class AbpOAuthModule {
|
|
16
|
+
static forRoot(): ModuleWithProviders<AbpOAuthModule>;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AbpOAuthModule, never>;
|
|
18
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AbpOAuthModule, never, never, never>;
|
|
19
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AbpOAuthModule>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
declare const oAuthStorage: Storage;
|
|
23
|
+
|
|
24
|
+
declare function storageFactory(): OAuthStorage;
|
|
25
|
+
|
|
26
|
+
declare const pipeToLogin: PipeToLoginFn;
|
|
27
|
+
declare function isTokenExpired(expireDate: number): boolean;
|
|
28
|
+
|
|
29
|
+
declare function clearOAuthStorage(storage?: OAuthStorage): void;
|
|
30
|
+
|
|
31
|
+
declare const checkAccessToken: CheckAuthenticationStateFn;
|
|
32
|
+
|
|
33
|
+
declare class AbpOAuthService implements IAuthService {
|
|
34
|
+
protected injector: Injector;
|
|
35
|
+
private strategy;
|
|
36
|
+
private readonly oAuthService;
|
|
37
|
+
get oidc(): boolean;
|
|
38
|
+
set oidc(value: boolean);
|
|
39
|
+
get isInternalAuth(): boolean;
|
|
40
|
+
constructor(injector: Injector);
|
|
41
|
+
init(): Promise<any>;
|
|
42
|
+
logout(queryParams?: Params): Observable<any>;
|
|
43
|
+
navigateToLogin(queryParams?: Params): void;
|
|
44
|
+
login(params: LoginParams): Observable<any>;
|
|
45
|
+
get isAuthenticated(): boolean;
|
|
46
|
+
loginUsingGrant(grantType: string, parameters: object, headers?: HttpHeaders): Promise<AbpAuthResponse>;
|
|
47
|
+
getRefreshToken(): string;
|
|
48
|
+
getAccessToken(): string;
|
|
49
|
+
refreshToken(): Promise<AbpAuthResponse>;
|
|
50
|
+
getAccessTokenExpiration(): number;
|
|
51
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AbpOAuthService, never>;
|
|
52
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AbpOAuthService>;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
declare class OAuthErrorFilterService extends AbstractAuthErrorFilter<AuthErrorFilter<OAuthErrorEvent>, OAuthErrorEvent> {
|
|
56
|
+
protected readonly _filters: i0.WritableSignal<AuthErrorFilter<OAuthErrorEvent>[]>;
|
|
57
|
+
readonly filters: i0.Signal<AuthErrorFilter<OAuthErrorEvent>[]>;
|
|
58
|
+
get(id: string): AuthErrorFilter<OAuthErrorEvent>;
|
|
59
|
+
add(filter: AuthErrorFilter<OAuthErrorEvent>): void;
|
|
60
|
+
patch(item: Partial<AuthErrorFilter<OAuthErrorEvent>>): void;
|
|
61
|
+
remove(id: string): void;
|
|
62
|
+
run(event: OAuthErrorEvent): boolean;
|
|
63
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OAuthErrorFilterService, never>;
|
|
64
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<OAuthErrorFilterService>;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
declare class RememberMeService {
|
|
68
|
+
#private;
|
|
69
|
+
protected readonly localStorageService: AbpLocalStorageService;
|
|
70
|
+
set(remember: boolean): void;
|
|
71
|
+
remove(): void;
|
|
72
|
+
get(): boolean;
|
|
73
|
+
getFromToken(accessToken: string): boolean;
|
|
74
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RememberMeService, never>;
|
|
75
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RememberMeService>;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
declare abstract class AuthFlowStrategy {
|
|
79
|
+
protected injector: Injector;
|
|
80
|
+
abstract readonly isInternalAuth: boolean;
|
|
81
|
+
protected httpErrorReporter: HttpErrorReporterService;
|
|
82
|
+
protected environment: EnvironmentService;
|
|
83
|
+
protected configState: ConfigStateService;
|
|
84
|
+
protected oAuthService: OAuthService;
|
|
85
|
+
protected oAuthConfig: AuthConfig;
|
|
86
|
+
protected sessionState: SessionStateService;
|
|
87
|
+
protected localStorageService: AbpLocalStorageService;
|
|
88
|
+
protected rememberMeService: RememberMeService;
|
|
89
|
+
protected windowService: AbpWindowService;
|
|
90
|
+
protected tenantKey: string;
|
|
91
|
+
protected router: Router;
|
|
92
|
+
protected readonly oAuthErrorFilterService: OAuthErrorFilterService;
|
|
93
|
+
abstract checkIfInternalAuth(queryParams?: Params): boolean;
|
|
94
|
+
abstract navigateToLogin(queryParams?: Params): void;
|
|
95
|
+
abstract logout(queryParams?: Params): Observable<any>;
|
|
96
|
+
abstract login(params?: LoginParams | Params): Observable<any>;
|
|
97
|
+
private catchError;
|
|
98
|
+
constructor(injector: Injector);
|
|
99
|
+
init(): Promise<any>;
|
|
100
|
+
protected navigateToPreviousUrl(): void;
|
|
101
|
+
protected refreshToken(): Promise<void | angular_oauth2_oidc.TokenResponse>;
|
|
102
|
+
protected listenToOauthErrors(): void;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
declare class AuthCodeFlowStrategy extends AuthFlowStrategy {
|
|
106
|
+
readonly isInternalAuth = false;
|
|
107
|
+
init(): Promise<void>;
|
|
108
|
+
private checkRememberMeOption;
|
|
109
|
+
private getCultureParams;
|
|
110
|
+
protected setUICulture(): void;
|
|
111
|
+
protected replaceURLParams(): void;
|
|
112
|
+
protected listenToTokenReceived(): void;
|
|
113
|
+
navigateToLogin(queryParams?: Params): void;
|
|
114
|
+
checkIfInternalAuth(queryParams?: Params): boolean;
|
|
115
|
+
logout(queryParams?: Params): rxjs.Observable<any>;
|
|
116
|
+
login(queryParams?: Params): rxjs.Observable<null>;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
declare class AuthPasswordFlowStrategy extends AuthFlowStrategy {
|
|
120
|
+
readonly isInternalAuth = true;
|
|
121
|
+
private listenToTokenExpiration;
|
|
122
|
+
init(): Promise<void>;
|
|
123
|
+
private checkRememberMeOption;
|
|
124
|
+
navigateToLogin(queryParams?: Params): Promise<boolean>;
|
|
125
|
+
checkIfInternalAuth(): boolean;
|
|
126
|
+
login(params: LoginParams): Observable<any>;
|
|
127
|
+
logout(): Observable<{
|
|
128
|
+
localization?: {
|
|
129
|
+
values?: {
|
|
130
|
+
[x: string]: {
|
|
131
|
+
[x: string]: string;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
resources?: {
|
|
135
|
+
[x: string]: {
|
|
136
|
+
texts?: {
|
|
137
|
+
[x: string]: string;
|
|
138
|
+
};
|
|
139
|
+
baseResources?: string[];
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
languages?: _abp_ng_core.LanguageInfo[];
|
|
143
|
+
currentCulture?: {
|
|
144
|
+
displayName?: string;
|
|
145
|
+
englishName?: string;
|
|
146
|
+
threeLetterIsoLanguageName?: string;
|
|
147
|
+
twoLetterIsoLanguageName?: string;
|
|
148
|
+
isRightToLeft?: boolean;
|
|
149
|
+
cultureName?: string;
|
|
150
|
+
name?: string;
|
|
151
|
+
nativeName?: string;
|
|
152
|
+
dateTimeFormat?: {
|
|
153
|
+
calendarAlgorithmType?: string;
|
|
154
|
+
dateTimeFormatLong?: string;
|
|
155
|
+
shortDatePattern?: string;
|
|
156
|
+
fullDateTimePattern?: string;
|
|
157
|
+
dateSeparator?: string;
|
|
158
|
+
shortTimePattern?: string;
|
|
159
|
+
longTimePattern?: string;
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
defaultResourceName?: string;
|
|
163
|
+
languagesMap?: {
|
|
164
|
+
[x: string]: _abp_ng_core.NameValue<string>[];
|
|
165
|
+
};
|
|
166
|
+
languageFilesMap?: {
|
|
167
|
+
[x: string]: _abp_ng_core.NameValue<string>[];
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
auth?: {
|
|
171
|
+
grantedPolicies?: {
|
|
172
|
+
[x: string]: boolean;
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
setting?: {
|
|
176
|
+
values?: {
|
|
177
|
+
[x: string]: string;
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
currentUser?: {
|
|
181
|
+
isAuthenticated?: boolean;
|
|
182
|
+
id?: string;
|
|
183
|
+
tenantId?: string;
|
|
184
|
+
impersonatorUserId?: string;
|
|
185
|
+
impersonatorTenantId?: string;
|
|
186
|
+
impersonatorUserName?: string;
|
|
187
|
+
impersonatorTenantName?: string;
|
|
188
|
+
userName?: string;
|
|
189
|
+
name?: string;
|
|
190
|
+
surName?: string;
|
|
191
|
+
email?: string;
|
|
192
|
+
emailVerified?: boolean;
|
|
193
|
+
phoneNumber?: string;
|
|
194
|
+
phoneNumberVerified?: boolean;
|
|
195
|
+
roles?: string[];
|
|
196
|
+
};
|
|
197
|
+
features?: {
|
|
198
|
+
values?: {
|
|
199
|
+
[x: string]: string;
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
globalFeatures?: {
|
|
203
|
+
enabledFeatures?: string[];
|
|
204
|
+
};
|
|
205
|
+
multiTenancy?: {
|
|
206
|
+
isEnabled?: boolean;
|
|
207
|
+
};
|
|
208
|
+
currentTenant?: {
|
|
209
|
+
id?: string;
|
|
210
|
+
name?: string;
|
|
211
|
+
isAvailable?: boolean;
|
|
212
|
+
};
|
|
213
|
+
timing?: {
|
|
214
|
+
timeZone?: {
|
|
215
|
+
iana?: {
|
|
216
|
+
timeZoneName?: string;
|
|
217
|
+
};
|
|
218
|
+
windows?: {
|
|
219
|
+
timeZoneId?: string;
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
clock?: {
|
|
224
|
+
kind?: string;
|
|
225
|
+
};
|
|
226
|
+
objectExtensions?: {
|
|
227
|
+
modules?: {
|
|
228
|
+
[x: string]: {
|
|
229
|
+
entities?: {
|
|
230
|
+
[x: string]: {
|
|
231
|
+
properties?: {
|
|
232
|
+
[x: string]: {
|
|
233
|
+
type?: string;
|
|
234
|
+
typeSimple?: string;
|
|
235
|
+
displayName?: {
|
|
236
|
+
name?: string;
|
|
237
|
+
resource?: string;
|
|
238
|
+
};
|
|
239
|
+
api?: {
|
|
240
|
+
onGet?: {
|
|
241
|
+
isAvailable?: boolean;
|
|
242
|
+
};
|
|
243
|
+
onCreate?: {
|
|
244
|
+
isAvailable?: boolean;
|
|
245
|
+
};
|
|
246
|
+
onUpdate?: {
|
|
247
|
+
isAvailable?: boolean;
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
ui?: {
|
|
251
|
+
onTable?: {
|
|
252
|
+
isVisible?: boolean;
|
|
253
|
+
};
|
|
254
|
+
onCreateForm?: {
|
|
255
|
+
isVisible?: boolean;
|
|
256
|
+
};
|
|
257
|
+
onEditForm?: {
|
|
258
|
+
isVisible?: boolean;
|
|
259
|
+
};
|
|
260
|
+
lookup?: {
|
|
261
|
+
url?: string;
|
|
262
|
+
resultListPropertyName?: string;
|
|
263
|
+
displayPropertyName?: string;
|
|
264
|
+
valuePropertyName?: string;
|
|
265
|
+
filterParamName?: string;
|
|
266
|
+
};
|
|
267
|
+
};
|
|
268
|
+
attributes?: _abp_ng_core.ExtensionPropertyAttributeDto[];
|
|
269
|
+
configuration?: {
|
|
270
|
+
[x: string]: object;
|
|
271
|
+
};
|
|
272
|
+
defaultValue?: object;
|
|
273
|
+
};
|
|
274
|
+
};
|
|
275
|
+
configuration?: {
|
|
276
|
+
[x: string]: object;
|
|
277
|
+
};
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
configuration?: {
|
|
281
|
+
[x: string]: object;
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
};
|
|
285
|
+
enums?: {
|
|
286
|
+
[x: string]: {
|
|
287
|
+
fields?: _abp_ng_core.ExtensionEnumFieldDto[];
|
|
288
|
+
localizationResource?: string;
|
|
289
|
+
};
|
|
290
|
+
};
|
|
291
|
+
};
|
|
292
|
+
extraProperties?: {
|
|
293
|
+
[x: string]: object;
|
|
294
|
+
};
|
|
295
|
+
}>;
|
|
296
|
+
protected refreshToken(): Promise<void | angular_oauth2_oidc.TokenResponse>;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
declare const AUTH_FLOW_STRATEGY: {
|
|
300
|
+
Code(injector: Injector): AuthCodeFlowStrategy;
|
|
301
|
+
Password(injector: Injector): AuthPasswordFlowStrategy;
|
|
302
|
+
};
|
|
303
|
+
|
|
304
|
+
declare class OAuthConfigurationHandler {
|
|
305
|
+
private oAuthService;
|
|
306
|
+
private environmentService;
|
|
307
|
+
private options;
|
|
308
|
+
constructor(oAuthService: OAuthService, environmentService: EnvironmentService, options: ABP.Root);
|
|
309
|
+
private listenToSetEnvironment;
|
|
310
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OAuthConfigurationHandler, never>;
|
|
311
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<OAuthConfigurationHandler>;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
declare class OAuthApiInterceptor implements IApiInterceptor {
|
|
315
|
+
private oAuthService;
|
|
316
|
+
private sessionState;
|
|
317
|
+
private httpWaitService;
|
|
318
|
+
private tenantKey;
|
|
319
|
+
constructor(oAuthService: OAuthService, sessionState: SessionStateService, httpWaitService: HttpWaitService, tenantKey: string);
|
|
320
|
+
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
|
|
321
|
+
getAdditionalHeaders(existingHeaders?: HttpHeaders): any;
|
|
322
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OAuthApiInterceptor, never>;
|
|
323
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<OAuthApiInterceptor>;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* @deprecated Use `abpOAuthGuard` *function* instead.
|
|
328
|
+
*/
|
|
329
|
+
declare class AbpOAuthGuard implements IAbpGuard {
|
|
330
|
+
protected readonly oAuthService: OAuthService;
|
|
331
|
+
protected readonly authService: AuthService;
|
|
332
|
+
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> | boolean | UrlTree;
|
|
333
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AbpOAuthGuard, never>;
|
|
334
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AbpOAuthGuard>;
|
|
335
|
+
}
|
|
336
|
+
declare const abpOAuthGuard: CanActivateFn;
|
|
337
|
+
|
|
338
|
+
declare const NavigateToManageProfileProvider: Provider;
|
|
339
|
+
|
|
340
|
+
declare function provideAbpOAuth(): i0.EnvironmentProviders;
|
|
341
|
+
|
|
342
|
+
export { AUTH_FLOW_STRATEGY, AbpOAuthGuard, AbpOAuthModule, AbpOAuthService, AuthCodeFlowStrategy, AuthFlowStrategy, AuthPasswordFlowStrategy, NavigateToManageProfileProvider, OAuthApiInterceptor, OAuthConfigurationHandler, OAuthErrorFilterService, RememberMeService, abpOAuthGuard, checkAccessToken, clearOAuthStorage, isTokenExpired, oAuthStorage, pipeToLogin, provideAbpOAuth, storageFactory };
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abp/ng.oauth",
|
|
3
|
-
"version": "9.3.0-rc.
|
|
3
|
+
"version": "9.3.0-rc.4",
|
|
4
4
|
"homepage": "https://abp.io",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/abpframework/abp.git"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@abp/ng.core": "~9.3.0-rc.
|
|
11
|
-
"@abp/utils": "~9.3.0-rc.
|
|
12
|
-
"angular-oauth2-oidc": "^
|
|
10
|
+
"@abp/ng.core": "~9.3.0-rc.4",
|
|
11
|
+
"@abp/utils": "~9.3.0-rc.4",
|
|
12
|
+
"angular-oauth2-oidc": "^20.0.0",
|
|
13
13
|
"just-clone": "^6.0.0",
|
|
14
14
|
"just-compare": "^2.0.0",
|
|
15
15
|
"tslib": "^2.0.0"
|
package/lib/guards/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './oauth.guard';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { UrlTree, ActivatedRouteSnapshot, RouterStateSnapshot, CanActivateFn } from '@angular/router';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { OAuthService } from 'angular-oauth2-oidc';
|
|
4
|
-
import { AuthService, IAbpGuard } from '@abp/ng.core';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
/**
|
|
7
|
-
* @deprecated Use `abpOAuthGuard` *function* instead.
|
|
8
|
-
*/
|
|
9
|
-
export declare class AbpOAuthGuard implements IAbpGuard {
|
|
10
|
-
protected readonly oAuthService: OAuthService;
|
|
11
|
-
protected readonly authService: AuthService;
|
|
12
|
-
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> | boolean | UrlTree;
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AbpOAuthGuard, never>;
|
|
14
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AbpOAuthGuard>;
|
|
15
|
-
}
|
|
16
|
-
export declare const abpOAuthGuard: CanActivateFn;
|
package/lib/handlers/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './oauth-configuration.handler';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { OAuthService } from "angular-oauth2-oidc";
|
|
2
|
-
import { ABP, EnvironmentService } from '@abp/ng.core';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class OAuthConfigurationHandler {
|
|
5
|
-
private oAuthService;
|
|
6
|
-
private environmentService;
|
|
7
|
-
private options;
|
|
8
|
-
constructor(oAuthService: OAuthService, environmentService: EnvironmentService, options: ABP.Root);
|
|
9
|
-
private listenToSetEnvironment;
|
|
10
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<OAuthConfigurationHandler, never>;
|
|
11
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<OAuthConfigurationHandler>;
|
|
12
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { HttpHandler, HttpHeaders, HttpRequest } from '@angular/common/http';
|
|
2
|
-
import { OAuthService } from 'angular-oauth2-oidc';
|
|
3
|
-
import { HttpWaitService, IApiInterceptor, SessionStateService } from '@abp/ng.core';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class OAuthApiInterceptor implements IApiInterceptor {
|
|
6
|
-
private oAuthService;
|
|
7
|
-
private sessionState;
|
|
8
|
-
private httpWaitService;
|
|
9
|
-
private tenantKey;
|
|
10
|
-
constructor(oAuthService: OAuthService, sessionState: SessionStateService, httpWaitService: HttpWaitService, tenantKey: string);
|
|
11
|
-
intercept(request: HttpRequest<any>, next: HttpHandler): import("rxjs").Observable<import("@angular/common/http").HttpEvent<any>>;
|
|
12
|
-
getAdditionalHeaders(existingHeaders?: HttpHeaders): any;
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<OAuthApiInterceptor, never>;
|
|
14
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<OAuthApiInterceptor>;
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './api.interceptor';
|
package/lib/oauth.module.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated AbpOAuthModule is deprecated use `provideAbpOAuth` *function* instead.
|
|
5
|
-
*/
|
|
6
|
-
export declare class AbpOAuthModule {
|
|
7
|
-
static forRoot(): ModuleWithProviders<AbpOAuthModule>;
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AbpOAuthModule, never>;
|
|
9
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<AbpOAuthModule, never, never, never>;
|
|
10
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<AbpOAuthModule>;
|
|
11
|
-
}
|
package/lib/providers/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function provideAbpOAuth(): import("@angular/core").EnvironmentProviders;
|
package/lib/services/index.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { OAuthErrorEvent } from 'angular-oauth2-oidc';
|
|
2
|
-
import { AbstractAuthErrorFilter, AuthErrorFilter } from '@abp/ng.core';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class OAuthErrorFilterService extends AbstractAuthErrorFilter<AuthErrorFilter<OAuthErrorEvent>, OAuthErrorEvent> {
|
|
5
|
-
protected readonly _filters: import("@angular/core").WritableSignal<AuthErrorFilter<OAuthErrorEvent>[]>;
|
|
6
|
-
readonly filters: import("@angular/core").Signal<AuthErrorFilter<OAuthErrorEvent>[]>;
|
|
7
|
-
get(id: string): AuthErrorFilter<OAuthErrorEvent>;
|
|
8
|
-
add(filter: AuthErrorFilter<OAuthErrorEvent>): void;
|
|
9
|
-
patch(item: Partial<AuthErrorFilter<OAuthErrorEvent>>): void;
|
|
10
|
-
remove(id: string): void;
|
|
11
|
-
run(event: OAuthErrorEvent): boolean;
|
|
12
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<OAuthErrorFilterService, never>;
|
|
13
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<OAuthErrorFilterService>;
|
|
14
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Injector } from '@angular/core';
|
|
2
|
-
import { Params } from '@angular/router';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
import { AbpAuthResponse, IAuthService, LoginParams } from '@abp/ng.core';
|
|
5
|
-
import { HttpHeaders } from '@angular/common/http';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class AbpOAuthService implements IAuthService {
|
|
8
|
-
protected injector: Injector;
|
|
9
|
-
private strategy;
|
|
10
|
-
private readonly oAuthService;
|
|
11
|
-
get oidc(): boolean;
|
|
12
|
-
set oidc(value: boolean);
|
|
13
|
-
get isInternalAuth(): boolean;
|
|
14
|
-
constructor(injector: Injector);
|
|
15
|
-
init(): Promise<any>;
|
|
16
|
-
logout(queryParams?: Params): Observable<any>;
|
|
17
|
-
navigateToLogin(queryParams?: Params): void;
|
|
18
|
-
login(params: LoginParams): Observable<any>;
|
|
19
|
-
get isAuthenticated(): boolean;
|
|
20
|
-
loginUsingGrant(grantType: string, parameters: object, headers?: HttpHeaders): Promise<AbpAuthResponse>;
|
|
21
|
-
getRefreshToken(): string;
|
|
22
|
-
getAccessToken(): string;
|
|
23
|
-
refreshToken(): Promise<AbpAuthResponse>;
|
|
24
|
-
getAccessTokenExpiration(): number;
|
|
25
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AbpOAuthService, never>;
|
|
26
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AbpOAuthService>;
|
|
27
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { AbpLocalStorageService } from '@abp/ng.core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class RememberMeService {
|
|
4
|
-
#private;
|
|
5
|
-
protected readonly localStorageService: AbpLocalStorageService;
|
|
6
|
-
set(remember: boolean): void;
|
|
7
|
-
remove(): void;
|
|
8
|
-
get(): boolean;
|
|
9
|
-
getFromToken(accessToken: string): boolean;
|
|
10
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<RememberMeService, never>;
|
|
11
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<RememberMeService>;
|
|
12
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Params } from '@angular/router';
|
|
2
|
-
import { AuthFlowStrategy } from './auth-flow-strategy';
|
|
3
|
-
export declare class AuthCodeFlowStrategy extends AuthFlowStrategy {
|
|
4
|
-
readonly isInternalAuth = false;
|
|
5
|
-
init(): Promise<void>;
|
|
6
|
-
private checkRememberMeOption;
|
|
7
|
-
private getCultureParams;
|
|
8
|
-
protected setUICulture(): void;
|
|
9
|
-
protected replaceURLParams(): void;
|
|
10
|
-
protected listenToTokenReceived(): void;
|
|
11
|
-
navigateToLogin(queryParams?: Params): void;
|
|
12
|
-
checkIfInternalAuth(queryParams?: Params): boolean;
|
|
13
|
-
logout(queryParams?: Params): import("rxjs").Observable<any>;
|
|
14
|
-
login(queryParams?: Params): import("rxjs").Observable<null>;
|
|
15
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Injector } from '@angular/core';
|
|
2
|
-
import { Params, Router } from '@angular/router';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
import { AuthConfig, OAuthService as OAuthService2 } from 'angular-oauth2-oidc';
|
|
5
|
-
import { AbpLocalStorageService, AbpWindowService, ConfigStateService, EnvironmentService, HttpErrorReporterService, LoginParams, SessionStateService } from '@abp/ng.core';
|
|
6
|
-
import { OAuthErrorFilterService } from '../services';
|
|
7
|
-
import { RememberMeService } from '../services/remember-me.service';
|
|
8
|
-
export declare abstract class AuthFlowStrategy {
|
|
9
|
-
protected injector: Injector;
|
|
10
|
-
abstract readonly isInternalAuth: boolean;
|
|
11
|
-
protected httpErrorReporter: HttpErrorReporterService;
|
|
12
|
-
protected environment: EnvironmentService;
|
|
13
|
-
protected configState: ConfigStateService;
|
|
14
|
-
protected oAuthService: OAuthService2;
|
|
15
|
-
protected oAuthConfig: AuthConfig;
|
|
16
|
-
protected sessionState: SessionStateService;
|
|
17
|
-
protected localStorageService: AbpLocalStorageService;
|
|
18
|
-
protected rememberMeService: RememberMeService;
|
|
19
|
-
protected windowService: AbpWindowService;
|
|
20
|
-
protected tenantKey: string;
|
|
21
|
-
protected router: Router;
|
|
22
|
-
protected readonly oAuthErrorFilterService: OAuthErrorFilterService;
|
|
23
|
-
abstract checkIfInternalAuth(queryParams?: Params): boolean;
|
|
24
|
-
abstract navigateToLogin(queryParams?: Params): void;
|
|
25
|
-
abstract logout(queryParams?: Params): Observable<any>;
|
|
26
|
-
abstract login(params?: LoginParams | Params): Observable<any>;
|
|
27
|
-
private catchError;
|
|
28
|
-
constructor(injector: Injector);
|
|
29
|
-
init(): Promise<any>;
|
|
30
|
-
protected navigateToPreviousUrl(): void;
|
|
31
|
-
protected refreshToken(): Promise<void | import("angular-oauth2-oidc").TokenResponse>;
|
|
32
|
-
protected listenToOauthErrors(): void;
|
|
33
|
-
}
|