@dereekb/dbx-firebase 13.2.2 → 13.3.0
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/dereekb-dbx-firebase-oidc.mjs +1378 -0
- package/fesm2022/dereekb-dbx-firebase-oidc.mjs.map +1 -0
- package/fesm2022/dereekb-dbx-firebase.mjs +122 -6
- package/fesm2022/dereekb-dbx-firebase.mjs.map +1 -1
- package/package.json +14 -10
- package/types/dereekb-dbx-firebase-oidc.d.ts +616 -0
- package/types/dereekb-dbx-firebase.d.ts +145 -9
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/dbx-firebase",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.3.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^21.0.0",
|
|
6
6
|
"@angular/core": "^21.0.0",
|
|
7
7
|
"@angular/fire": "21.0.0-rc.0-canary.ac3dd7c",
|
|
8
8
|
"@angular/material": "^21.0.0",
|
|
9
|
-
"@dereekb/date": "13.
|
|
10
|
-
"@dereekb/dbx-analytics": "13.
|
|
11
|
-
"@dereekb/dbx-core": "13.
|
|
12
|
-
"@dereekb/dbx-form": "13.
|
|
13
|
-
"@dereekb/dbx-web": "13.
|
|
14
|
-
"@dereekb/firebase": "13.
|
|
15
|
-
"@dereekb/model": "13.
|
|
16
|
-
"@dereekb/rxjs": "13.
|
|
17
|
-
"@dereekb/util": "13.
|
|
9
|
+
"@dereekb/date": "13.3.0",
|
|
10
|
+
"@dereekb/dbx-analytics": "13.3.0",
|
|
11
|
+
"@dereekb/dbx-core": "13.3.0",
|
|
12
|
+
"@dereekb/dbx-form": "13.3.0",
|
|
13
|
+
"@dereekb/dbx-web": "13.3.0",
|
|
14
|
+
"@dereekb/firebase": "13.3.0",
|
|
15
|
+
"@dereekb/model": "13.3.0",
|
|
16
|
+
"@dereekb/rxjs": "13.3.0",
|
|
17
|
+
"@dereekb/util": "13.3.0",
|
|
18
18
|
"@ngrx/component-store": "^21.0.0",
|
|
19
19
|
"@ngx-formly/core": "git+https://git@github.com/dereekb/ngx-formly#996d1041c8d2afbe429985a5ad394e59327bfa1d",
|
|
20
20
|
"firebase": "^12.0.0",
|
|
@@ -31,6 +31,10 @@
|
|
|
31
31
|
"types": "./types/dereekb-dbx-firebase.d.ts",
|
|
32
32
|
"default": "./fesm2022/dereekb-dbx-firebase.mjs"
|
|
33
33
|
},
|
|
34
|
+
"./oidc": {
|
|
35
|
+
"types": "./types/dereekb-dbx-firebase-oidc.d.ts",
|
|
36
|
+
"default": "./fesm2022/dereekb-dbx-firebase-oidc.mjs"
|
|
37
|
+
},
|
|
34
38
|
"./package.json": {
|
|
35
39
|
"default": "./package.json"
|
|
36
40
|
}
|
|
@@ -0,0 +1,616 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { OnDestroy, Signal, Type, EnvironmentProviders } from '@angular/core';
|
|
3
|
+
import * as _dereekb_util from '@dereekb/util';
|
|
4
|
+
import { Maybe, ErrorInput } from '@dereekb/util';
|
|
5
|
+
import * as _dereekb_dbx_core from '@dereekb/dbx-core';
|
|
6
|
+
import { DbxInjectionComponentConfig, SegueRefOrSegueRefRouterLink } from '@dereekb/dbx-core';
|
|
7
|
+
import * as _dereekb_firebase from '@dereekb/firebase';
|
|
8
|
+
import { OAuthInteractionLoginDetails, OidcScope, OidcInteractionUid, OidcTokenEndpointAuthMethod, OidcRedirectUri, OidcScopeDetails, CreateOidcClientParams, UpdateOidcClientFieldParams, OidcEntry, OidcEntryDocument, OidcModelFunctions, CreateOidcClientResult, RotateOidcClientSecretResult, OidcModelFirestoreCollections, OAuthInteractionLoginResponse, OAuthInteractionConsentResponse } from '@dereekb/firebase';
|
|
9
|
+
import * as rxjs from 'rxjs';
|
|
10
|
+
import { Observable } from 'rxjs';
|
|
11
|
+
import * as _ngx_formly_core from '@ngx-formly/core';
|
|
12
|
+
import { FormlyFieldConfig } from '@ngx-formly/core';
|
|
13
|
+
import { AbstractConfigAsyncFormlyFormDirective } from '@dereekb/dbx-form';
|
|
14
|
+
import { AbstractDbxSelectionListWrapperDirective, AbstractDbxSelectionListViewDirective, DbxSelectionValueListViewConfig, DbxValueAsListItem, AbstractDbxValueListViewItemComponent, DbxActionConfirmConfig } from '@dereekb/dbx-web';
|
|
15
|
+
import { WorkUsingContext } from '@dereekb/rxjs';
|
|
16
|
+
import * as _dereekb_dbx_firebase from '@dereekb/dbx-firebase';
|
|
17
|
+
import { AbstractDbxFirebaseDocumentStore, AbstractDbxFirebaseCollectionStore, DbxFirebaseCollectionStoreDirective, DbxFirebaseDocumentStoreDirective } from '@dereekb/dbx-firebase';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* State cases for the OIDC login interaction flow.
|
|
21
|
+
*/
|
|
22
|
+
type OidcLoginStateCase = 'no_user' | 'user' | 'submitting' | 'error';
|
|
23
|
+
/**
|
|
24
|
+
* Presentational component for the OIDC OAuth login interaction.
|
|
25
|
+
*
|
|
26
|
+
* Renders the login UI based on the current state case. Supports ng-content
|
|
27
|
+
* projection to allow apps to provide a custom login view for the `'no_user'` state,
|
|
28
|
+
* falling back to the default `<dbx-firebase-login>` component.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```html
|
|
32
|
+
* <dbx-firebase-oauth-login-view [loginStateCase]="'no_user'">
|
|
33
|
+
* <my-custom-login />
|
|
34
|
+
* </dbx-firebase-oauth-login-view>
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
declare class DbxFirebaseOAuthLoginViewComponent {
|
|
38
|
+
readonly loginStateCase: _angular_core.InputSignal<OidcLoginStateCase>;
|
|
39
|
+
readonly error: _angular_core.InputSignal<Maybe<string | ErrorInput>>;
|
|
40
|
+
readonly resolvedError: _angular_core.Signal<Maybe<ErrorInput>>;
|
|
41
|
+
readonly retryClick: _angular_core.OutputEmitterRef<void>;
|
|
42
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DbxFirebaseOAuthLoginViewComponent, never>;
|
|
43
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DbxFirebaseOAuthLoginViewComponent, "dbx-firebase-oauth-login-view", never, { "loginStateCase": { "alias": "loginStateCase"; "required": true; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; }, { "retryClick": "retryClick"; }, never, ["*"], true, never>;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Presentational component for the OIDC OAuth consent screen.
|
|
48
|
+
*
|
|
49
|
+
* Accepts an `OAuthInteractionLoginDetails` input that contains all client and scope
|
|
50
|
+
* information. Renders the client name, logo, client URL, scopes (via `<dbx-injection>`),
|
|
51
|
+
* error/loading states, and approve/deny action buttons.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```html
|
|
55
|
+
* <dbx-firebase-oauth-consent-view
|
|
56
|
+
* [details]="loginDetails"
|
|
57
|
+
* [loading]="false"
|
|
58
|
+
* [scopeInjectionConfig]="scopeConfig"
|
|
59
|
+
* (approveClick)="onApprove()"
|
|
60
|
+
* (denyClick)="onDeny()">
|
|
61
|
+
* </dbx-firebase-oauth-consent-view>
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
declare class DbxFirebaseOAuthConsentViewComponent {
|
|
65
|
+
readonly details: _angular_core.InputSignal<Maybe<OAuthInteractionLoginDetails<string>>>;
|
|
66
|
+
readonly loading: _angular_core.InputSignal<boolean>;
|
|
67
|
+
readonly error: _angular_core.InputSignal<Maybe<string | ErrorInput>>;
|
|
68
|
+
readonly scopeInjectionConfig: _angular_core.InputSignal<DbxInjectionComponentConfig<unknown>>;
|
|
69
|
+
readonly clientName: _angular_core.Signal<string>;
|
|
70
|
+
readonly clientUri: _angular_core.Signal<Maybe<string>>;
|
|
71
|
+
readonly logoUri: _angular_core.Signal<Maybe<string>>;
|
|
72
|
+
readonly scopes: _angular_core.Signal<string[]>;
|
|
73
|
+
readonly resolvedError: _angular_core.Signal<Maybe<ErrorInput>>;
|
|
74
|
+
readonly approveClick: _angular_core.OutputEmitterRef<void>;
|
|
75
|
+
readonly denyClick: _angular_core.OutputEmitterRef<void>;
|
|
76
|
+
readonly resolvedScopeInjectionConfig: _angular_core.Signal<DbxInjectionComponentConfig<unknown>>;
|
|
77
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DbxFirebaseOAuthConsentViewComponent, never>;
|
|
78
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DbxFirebaseOAuthConsentViewComponent, "dbx-firebase-oauth-consent-view", never, { "details": { "alias": "details"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "scopeInjectionConfig": { "alias": "scopeInjectionConfig"; "required": true; "isSignal": true; }; }, { "approveClick": "approveClick"; "denyClick": "denyClick"; }, never, never, true, never>;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
interface OAuthConsentScope<T extends OidcScope = OidcScope> {
|
|
82
|
+
readonly name: T;
|
|
83
|
+
readonly description: string;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Data provided to consent scope view components via the `DBX_INJECTION_COMPONENT_DATA` token.
|
|
88
|
+
*
|
|
89
|
+
* Contains the scopes being requested and contextual information about the consent interaction.
|
|
90
|
+
*/
|
|
91
|
+
interface DbxFirebaseOAuthConsentScopesViewData {
|
|
92
|
+
readonly details?: Maybe<OAuthInteractionLoginDetails>;
|
|
93
|
+
readonly scopes: OidcScope[];
|
|
94
|
+
readonly clientName: string;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Abstract base class for consent scope view components.
|
|
98
|
+
*
|
|
99
|
+
* Provides typed access to the `DbxFirebaseOAuthConsentScopesViewData` injected
|
|
100
|
+
* via `DBX_INJECTION_COMPONENT_DATA`. Subclasses only need to define a template.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```typescript
|
|
104
|
+
* @Component({ template: `...` })
|
|
105
|
+
* export class MyCustomScopesViewComponent extends AbstractDbxFirebaseOAuthConsentScopeViewComponent {}
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
declare abstract class AbstractDbxFirebaseOAuthConsentScopeViewComponent {
|
|
109
|
+
private readonly data;
|
|
110
|
+
readonly details: _angular_core.Signal<Maybe<OAuthInteractionLoginDetails<string>>>;
|
|
111
|
+
readonly scopes: _angular_core.Signal<string[]>;
|
|
112
|
+
readonly clientName: _angular_core.Signal<string>;
|
|
113
|
+
readonly clientUri: _angular_core.Signal<Maybe<string>>;
|
|
114
|
+
readonly logoUri: _angular_core.Signal<Maybe<string>>;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Standalone presentational component that renders a list of OAuth consent scopes.
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* ```html
|
|
122
|
+
* <dbx-firebase-oauth-consent-scope-list [scopes]="mappedScopes"></dbx-firebase-oauth-consent-scope-list>
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
125
|
+
declare class DbxFirebaseOAuthConsentScopeListComponent {
|
|
126
|
+
readonly scopes: _angular_core.InputSignal<OAuthConsentScope<string>[]>;
|
|
127
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DbxFirebaseOAuthConsentScopeListComponent, never>;
|
|
128
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DbxFirebaseOAuthConsentScopeListComponent, "dbx-firebase-oauth-consent-scope-list", never, { "scopes": { "alias": "scopes"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Default consent scope view component that maps scope names to descriptions
|
|
133
|
+
* using the `OidcScopeDetails` from the app-level OIDC configuration.
|
|
134
|
+
*
|
|
135
|
+
* Apps can override this by providing a custom `consentScopeListViewClass`
|
|
136
|
+
* in `DbxFirebaseOidcConfig` or `DbxOAuthConsentComponentConfig`.
|
|
137
|
+
*/
|
|
138
|
+
declare class DbxFirebaseOAuthConsentScopeDefaultViewComponent extends AbstractDbxFirebaseOAuthConsentScopeViewComponent {
|
|
139
|
+
private readonly oidcConfigService;
|
|
140
|
+
readonly mappedScopes: _angular_core.Signal<OAuthConsentScope<string>[]>;
|
|
141
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DbxFirebaseOAuthConsentScopeDefaultViewComponent, never>;
|
|
142
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DbxFirebaseOAuthConsentScopeDefaultViewComponent, "dbx-firebase-oauth-consent-scope-default-view", never, {}, {}, never, never, true, never>;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Container component for the OIDC OAuth login interaction flow.
|
|
147
|
+
*
|
|
148
|
+
* Manages all state: route param reading, Firebase Auth observation, ID token
|
|
149
|
+
* submission, and error handling. Delegates visual rendering to
|
|
150
|
+
* `DbxFirebaseOAuthLoginViewComponent`.
|
|
151
|
+
*
|
|
152
|
+
* Supports ng-content projection — any content provided is passed through to
|
|
153
|
+
* the view component, replacing the default `<dbx-firebase-login>` for the
|
|
154
|
+
* `'no_user'` state.
|
|
155
|
+
*
|
|
156
|
+
* Usage: Route to this component with `?uid=<interaction-uid>` query param.
|
|
157
|
+
*/
|
|
158
|
+
declare class DbxFirebaseOAuthLoginComponent implements OnDestroy {
|
|
159
|
+
private readonly dbxRouterService;
|
|
160
|
+
private readonly dbxFirebaseAuthService;
|
|
161
|
+
private readonly interactionService;
|
|
162
|
+
readonly uidParamReader: _dereekb_dbx_core.DbxRouteParamReaderInstance<string>;
|
|
163
|
+
readonly interactionUid: Signal<Maybe<OidcInteractionUid>>;
|
|
164
|
+
readonly isLoggedIn: Signal<boolean>;
|
|
165
|
+
readonly submitting: _angular_core.WritableSignal<boolean>;
|
|
166
|
+
readonly errorMessage: _angular_core.WritableSignal<string | null>;
|
|
167
|
+
readonly loginStateCase: Signal<OidcLoginStateCase>;
|
|
168
|
+
constructor();
|
|
169
|
+
ngOnDestroy(): void;
|
|
170
|
+
retry(): void;
|
|
171
|
+
private _submitIdToken;
|
|
172
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DbxFirebaseOAuthLoginComponent, never>;
|
|
173
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DbxFirebaseOAuthLoginComponent, "dbx-firebase-oauth-login", never, {}, {}, never, ["*"], true, never>;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Configuration for `DbxOAuthConsentComponent`.
|
|
178
|
+
*/
|
|
179
|
+
interface DbxOAuthConsentComponentConfig {
|
|
180
|
+
/**
|
|
181
|
+
* Component class for rendering the consent scope list.
|
|
182
|
+
*
|
|
183
|
+
* When not provided, falls back to the class configured in `DbxFirebaseOidcConfig`,
|
|
184
|
+
* which itself defaults to `DbxFirebaseOAuthConsentScopeDefaultViewComponent`.
|
|
185
|
+
*/
|
|
186
|
+
readonly consentScopeListViewClass?: Type<AbstractDbxFirebaseOAuthConsentScopeViewComponent>;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Container component for the OIDC OAuth consent screen.
|
|
190
|
+
*
|
|
191
|
+
* Manages all state: route param reading, consent submission, and error handling.
|
|
192
|
+
* Delegates visual rendering to `DbxFirebaseOAuthConsentViewComponent`.
|
|
193
|
+
*
|
|
194
|
+
* Reads interaction UID and client details from route params (populated by
|
|
195
|
+
* the server redirect), then assembles them into `OAuthInteractionLoginDetails`.
|
|
196
|
+
*/
|
|
197
|
+
declare class DbxOAuthConsentComponent implements OnDestroy {
|
|
198
|
+
private readonly dbxRouterService;
|
|
199
|
+
private readonly interactionService;
|
|
200
|
+
private readonly oidcConfigService;
|
|
201
|
+
readonly config: _angular_core.InputSignal<Maybe<DbxOAuthConsentComponentConfig>>;
|
|
202
|
+
readonly interactionUidParamReader: _dereekb_dbx_core.DbxRouteParamReaderInstance<string>;
|
|
203
|
+
readonly clientIdParamReader: _dereekb_dbx_core.DbxRouteParamReaderInstance<string>;
|
|
204
|
+
readonly clientNameParamReader: _dereekb_dbx_core.DbxRouteParamReaderInstance<string>;
|
|
205
|
+
readonly clientUriParamReader: _dereekb_dbx_core.DbxRouteParamReaderInstance<string>;
|
|
206
|
+
readonly logoUriParamReader: _dereekb_dbx_core.DbxRouteParamReaderInstance<string>;
|
|
207
|
+
readonly scopesParamReader: _dereekb_dbx_core.DbxRouteParamReaderInstance<string>;
|
|
208
|
+
private readonly routeUid;
|
|
209
|
+
private readonly routeClientId;
|
|
210
|
+
private readonly routeClientName;
|
|
211
|
+
private readonly routeClientUri;
|
|
212
|
+
private readonly routeLogoUri;
|
|
213
|
+
private readonly routeScopes;
|
|
214
|
+
readonly resolvedInteractionUid: _angular_core.Signal<Maybe<string>>;
|
|
215
|
+
readonly resolvedDetails: _angular_core.Signal<Maybe<OAuthInteractionLoginDetails<string>>>;
|
|
216
|
+
readonly scopeInjectionConfig: _angular_core.Signal<DbxInjectionComponentConfig<unknown>>;
|
|
217
|
+
readonly loading: _angular_core.WritableSignal<boolean>;
|
|
218
|
+
readonly error: _angular_core.WritableSignal<string | null>;
|
|
219
|
+
ngOnDestroy(): void;
|
|
220
|
+
approve(): void;
|
|
221
|
+
deny(): void;
|
|
222
|
+
private _submitConsent;
|
|
223
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DbxOAuthConsentComponent, never>;
|
|
224
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DbxOAuthConsentComponent, "dbx-firebase-oauth-consent", never, { "config": { "alias": "config"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
interface OidcEntryClientFormFieldsConfig {
|
|
228
|
+
/**
|
|
229
|
+
* Mode to show. Defaults to 'create'.
|
|
230
|
+
*/
|
|
231
|
+
readonly mode: 'create' | 'update';
|
|
232
|
+
/**
|
|
233
|
+
* Token endpoint auth methods available for selection.
|
|
234
|
+
*
|
|
235
|
+
* Provided by the {@link DbxFirebaseOidcConfigService}.
|
|
236
|
+
*/
|
|
237
|
+
readonly tokenEndpointAuthMethods: OidcTokenEndpointAuthMethod[];
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Creates fields for the OAuth client create form.
|
|
241
|
+
*
|
|
242
|
+
* Includes `token_endpoint_auth_method` which is immutable after creation.
|
|
243
|
+
*/
|
|
244
|
+
declare function oidcEntryClientFormFields(config?: OidcEntryClientFormFieldsConfig): FormlyFieldConfig[];
|
|
245
|
+
declare function oidcClientTokenEndpointAuthMethodField(config?: OidcEntryClientFormFieldsConfig): FormlyFieldConfig;
|
|
246
|
+
/**
|
|
247
|
+
* Creates fields for updating an existing OAuth client.
|
|
248
|
+
*
|
|
249
|
+
* Excludes `token_endpoint_auth_method` (immutable after creation).
|
|
250
|
+
*/
|
|
251
|
+
declare function oidcEntryClientUpdateFormFields(): FormlyFieldConfig[];
|
|
252
|
+
declare function oidcClientNameField(): FormlyFieldConfig;
|
|
253
|
+
declare function oidcClientRedirectUrisField(): FormlyFieldConfig;
|
|
254
|
+
declare function oidcClientJwksUriField(): FormlyFieldConfig;
|
|
255
|
+
declare function oidcClientLogoUriField(): FormlyFieldConfig;
|
|
256
|
+
declare function oidcClientHomepageUriField(): FormlyFieldConfig;
|
|
257
|
+
interface OidcEntryClientTestFormFieldsConfig {
|
|
258
|
+
readonly redirectUris: OidcRedirectUri[];
|
|
259
|
+
readonly availableScopes: OidcScopeDetails[];
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Assembles the form fields for the OAuth test client form.
|
|
263
|
+
*/
|
|
264
|
+
declare function oidcEntryClientTestFormFields(config: OidcEntryClientTestFormFieldsConfig): FormlyFieldConfig[];
|
|
265
|
+
declare function oidcClientTestClientIdField(): FormlyFieldConfig;
|
|
266
|
+
declare function oidcClientTestRedirectUriField(redirectUris: OidcRedirectUri[]): FormlyFieldConfig;
|
|
267
|
+
declare function oidcClientTestScopesField(availableScopes: OidcScopeDetails[]): FormlyFieldConfig;
|
|
268
|
+
|
|
269
|
+
type DbxFirebaseOidcModelClientFormValue = CreateOidcClientParams;
|
|
270
|
+
type DbxFirebaseOidcModelClientUpdateFormValue = UpdateOidcClientFieldParams;
|
|
271
|
+
/**
|
|
272
|
+
* Config input for {@link DbxFirebaseOidcEntryClientFormComponent}.
|
|
273
|
+
*
|
|
274
|
+
* Omits `tokenEndpointAuthMethods` since the component pulls those from {@link DbxFirebaseOidcConfigService}.
|
|
275
|
+
*/
|
|
276
|
+
type DbxFirebaseOidcEntryClientFormComponentConfig = Omit<OidcEntryClientFormFieldsConfig, 'tokenEndpointAuthMethods'>;
|
|
277
|
+
/**
|
|
278
|
+
* Configurable form component for creating or updating an OAuth client.
|
|
279
|
+
*
|
|
280
|
+
* Pass `{ mode: 'create' }` to show all fields including `token_endpoint_auth_method`.
|
|
281
|
+
* Pass `{ mode: 'update' }` to exclude `token_endpoint_auth_method` (immutable after creation).
|
|
282
|
+
*
|
|
283
|
+
* Token endpoint auth methods are pulled from the injected {@link DbxFirebaseOidcConfigService}.
|
|
284
|
+
*/
|
|
285
|
+
declare class DbxFirebaseOidcEntryClientFormComponent extends AbstractConfigAsyncFormlyFormDirective<DbxFirebaseOidcModelClientFormValue, DbxFirebaseOidcEntryClientFormComponentConfig> {
|
|
286
|
+
private readonly _oidcConfigService;
|
|
287
|
+
readonly fields$: rxjs.Observable<_ngx_formly_core.FormlyFieldConfig<_ngx_formly_core.FormlyFieldProps & {
|
|
288
|
+
[additionalProperties: string]: any;
|
|
289
|
+
}>[]>;
|
|
290
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DbxFirebaseOidcEntryClientFormComponent, never>;
|
|
291
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DbxFirebaseOidcEntryClientFormComponent, "dbx-firebase-oidc-client-form", never, {}, {}, never, never, true, never>;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
interface DbxFirebaseOidcModelClientTestFormValue {
|
|
295
|
+
client_id: string;
|
|
296
|
+
redirect_uri: string;
|
|
297
|
+
scopes: string[];
|
|
298
|
+
}
|
|
299
|
+
type DbxFirebaseOidcEntryClientTestFormComponentConfig = OidcEntryClientTestFormFieldsConfig;
|
|
300
|
+
/**
|
|
301
|
+
* Form component for configuring an OAuth test authorization request.
|
|
302
|
+
*
|
|
303
|
+
* Displays read-only client_id/secret, a redirect URI selector, and scope picker.
|
|
304
|
+
*/
|
|
305
|
+
declare class DbxFirebaseOidcEntryClientTestFormComponent extends AbstractConfigAsyncFormlyFormDirective<DbxFirebaseOidcModelClientTestFormValue, DbxFirebaseOidcEntryClientTestFormComponentConfig> {
|
|
306
|
+
readonly fields$: rxjs.Observable<_ngx_formly_core.FormlyFieldConfig<_ngx_formly_core.FormlyFieldProps & {
|
|
307
|
+
[additionalProperties: string]: any;
|
|
308
|
+
}>[]>;
|
|
309
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DbxFirebaseOidcEntryClientTestFormComponent, never>;
|
|
310
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DbxFirebaseOidcEntryClientTestFormComponent, "dbx-firebase-oidc-client-test-form", never, {}, {}, never, never, true, never>;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
type OidcEntryWithSelection = DbxValueAsListItem<OidcEntry>;
|
|
314
|
+
declare class DbxFirebaseOidcEntryClientListComponent extends AbstractDbxSelectionListWrapperDirective<OidcEntry> {
|
|
315
|
+
constructor();
|
|
316
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DbxFirebaseOidcEntryClientListComponent, never>;
|
|
317
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DbxFirebaseOidcEntryClientListComponent, "dbx-firebase-oidc-client-list", never, {}, {}, never, ["[top]", "[bottom]", "[empty]", "[emptyLoading]", "[end]"], true, never>;
|
|
318
|
+
}
|
|
319
|
+
declare class DbxFirebaseOidcEntryClientListViewComponent extends AbstractDbxSelectionListViewDirective<OidcEntry> {
|
|
320
|
+
readonly config: DbxSelectionValueListViewConfig<OidcEntryWithSelection>;
|
|
321
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DbxFirebaseOidcEntryClientListViewComponent, never>;
|
|
322
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DbxFirebaseOidcEntryClientListViewComponent, "dbx-firebase-oidc-client-list-view", never, {}, {}, never, never, true, never>;
|
|
323
|
+
}
|
|
324
|
+
declare class DbxFirebaseOidcEntryClientListViewItemClientComponent {
|
|
325
|
+
readonly entry: _angular_core.InputSignal<OidcEntry>;
|
|
326
|
+
get name(): string;
|
|
327
|
+
get clientId(): string;
|
|
328
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DbxFirebaseOidcEntryClientListViewItemClientComponent, never>;
|
|
329
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DbxFirebaseOidcEntryClientListViewItemClientComponent, "dbx-firebase-oidc-client-list-view-item-client", never, { "entry": { "alias": "entry"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
330
|
+
}
|
|
331
|
+
declare class DbxFirebaseOidcEntryClientListViewItemDefaultComponent {
|
|
332
|
+
readonly entry: _angular_core.InputSignal<OidcEntry>;
|
|
333
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DbxFirebaseOidcEntryClientListViewItemDefaultComponent, never>;
|
|
334
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DbxFirebaseOidcEntryClientListViewItemDefaultComponent, "dbx-firebase-oidc-client-list-view-item-default", never, { "entry": { "alias": "entry"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
335
|
+
}
|
|
336
|
+
declare class DbxFirebaseOidcEntryClientListViewItemComponent extends AbstractDbxValueListViewItemComponent<OidcEntry> {
|
|
337
|
+
readonly clientType: _dereekb_firebase.OidcEntryType;
|
|
338
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DbxFirebaseOidcEntryClientListViewItemComponent, never>;
|
|
339
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DbxFirebaseOidcEntryClientListViewItemComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
/** Document store for a single {@link OidcEntry}. */
|
|
343
|
+
declare class OidcEntryDocumentStore extends AbstractDbxFirebaseDocumentStore<OidcEntry, OidcEntryDocument> {
|
|
344
|
+
readonly oidcModelFunctions: OidcModelFunctions;
|
|
345
|
+
private readonly _latestClientSecret$;
|
|
346
|
+
/**
|
|
347
|
+
* The client secret from the most recent create operation.
|
|
348
|
+
*
|
|
349
|
+
* Only available immediately after creation — the server does not return it again.
|
|
350
|
+
*/
|
|
351
|
+
readonly latestClientSecret$: rxjs.Observable<Maybe<string>>;
|
|
352
|
+
get latestClientSecret(): Maybe<string>;
|
|
353
|
+
constructor();
|
|
354
|
+
readonly createClient: _dereekb_dbx_firebase.DbxFirebaseDocumentStoreCreateFunction<_dereekb_firebase.CreateOidcClientParams, CreateOidcClientResult>;
|
|
355
|
+
readonly updateClient: _dereekb_dbx_firebase.DbxFirebaseDocumentStoreFunction<_dereekb_firebase.UpdateOidcClientParams, void>;
|
|
356
|
+
readonly rotateClientSecret: _dereekb_dbx_firebase.DbxFirebaseDocumentStoreFunction<_dereekb_firebase.TargetModelParams, RotateOidcClientSecretResult>;
|
|
357
|
+
readonly deleteClient: _dereekb_dbx_firebase.DbxFirebaseDocumentStoreFunction<_dereekb_firebase.TargetModelParams, void>;
|
|
358
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<OidcEntryDocumentStore, never>;
|
|
359
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<OidcEntryDocumentStore>;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* Container component for creating a new OAuth client.
|
|
364
|
+
*
|
|
365
|
+
* Wraps the client form in an action context with a submit button.
|
|
366
|
+
* Emits {@link clientCreated} with the result after successful creation.
|
|
367
|
+
*/
|
|
368
|
+
declare class DbxFirebaseOidcEntryClientCreateComponent {
|
|
369
|
+
readonly oidcEntryDocumentStore: OidcEntryDocumentStore;
|
|
370
|
+
readonly formConfig: DbxFirebaseOidcEntryClientFormComponentConfig;
|
|
371
|
+
readonly createClientOwnerTarget: _angular_core.InputSignal<Maybe<string>>;
|
|
372
|
+
readonly clientCreated: _angular_core.OutputEmitterRef<CreateOidcClientResult>;
|
|
373
|
+
readonly handleCreateClient: WorkUsingContext<DbxFirebaseOidcModelClientFormValue>;
|
|
374
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DbxFirebaseOidcEntryClientCreateComponent, never>;
|
|
375
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DbxFirebaseOidcEntryClientCreateComponent, "dbx-firebase-oidc-entry-client-create", never, { "createClientOwnerTarget": { "alias": "createClientOwnerTarget"; "required": false; "isSignal": true; }; }, { "clientCreated": "clientCreated"; }, never, never, true, never>;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Container component for testing an OAuth authorization flow against a registered client.
|
|
380
|
+
*
|
|
381
|
+
* Displays a form with the client's ID, redirect URIs, and scopes,
|
|
382
|
+
* then builds an authorization URL with PKCE parameters that can be opened in a new tab.
|
|
383
|
+
*/
|
|
384
|
+
declare class DbxFirebaseOidcEntryClientTestComponent {
|
|
385
|
+
private readonly oidcEntryDocumentStore;
|
|
386
|
+
private readonly oidcConfigService;
|
|
387
|
+
/** Scopes the user can pick from. Overrides the service default when provided. */
|
|
388
|
+
readonly availableScopes: _angular_core.InputSignal<Maybe<OidcScopeDetails[]>>;
|
|
389
|
+
/** Path to the authorization endpoint. Overrides the service default when provided. */
|
|
390
|
+
readonly oidcAuthorizationEndpointApiPath: _angular_core.InputSignal<Maybe<string>>;
|
|
391
|
+
readonly resolvedAvailableScopes: _angular_core.Signal<OidcScopeDetails[]>;
|
|
392
|
+
readonly resolvedAuthorizationEndpointPath: _angular_core.Signal<string>;
|
|
393
|
+
readonly redirectUrisSignal: _angular_core.Signal<string[] | undefined>;
|
|
394
|
+
readonly clientIdSignal: _angular_core.Signal<string | undefined>;
|
|
395
|
+
readonly formConfig: _angular_core.Signal<OidcEntryClientTestFormFieldsConfig | undefined>;
|
|
396
|
+
readonly formTemplate$: rxjs.Observable<DbxFirebaseOidcModelClientTestFormValue>;
|
|
397
|
+
readonly codeVerifier: _angular_core.WritableSignal<string>;
|
|
398
|
+
readonly codeChallenge: _angular_core.WritableSignal<string>;
|
|
399
|
+
readonly state: _angular_core.WritableSignal<string>;
|
|
400
|
+
readonly nonce: _angular_core.WritableSignal<string>;
|
|
401
|
+
/** The current form value, updated by the form via dbxFormValueChange. */
|
|
402
|
+
readonly formValue: _angular_core.WritableSignal<Maybe<DbxFirebaseOidcModelClientTestFormValue>>;
|
|
403
|
+
readonly authorizationUrlSignal: _angular_core.Signal<string | undefined>;
|
|
404
|
+
constructor();
|
|
405
|
+
onFormValueChange(value: Maybe<DbxFirebaseOidcModelClientTestFormValue>): void;
|
|
406
|
+
openAuthorizationUrl(): void;
|
|
407
|
+
regeneratePkce(): void;
|
|
408
|
+
private _updateCodeChallenge;
|
|
409
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DbxFirebaseOidcEntryClientTestComponent, never>;
|
|
410
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DbxFirebaseOidcEntryClientTestComponent, "dbx-firebase-oidc-entry-client-test", never, { "availableScopes": { "alias": "availableScopes"; "required": false; "isSignal": true; }; "oidcAuthorizationEndpointApiPath": { "alias": "oidcAuthorizationEndpointApiPath"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* Container component for updating an existing OAuth client.
|
|
415
|
+
*
|
|
416
|
+
* Wraps the client update form in an action context with a save button.
|
|
417
|
+
*/
|
|
418
|
+
declare class DbxFirebaseOidcEntryClientUpdateComponent {
|
|
419
|
+
readonly oidcEntryDocumentStore: OidcEntryDocumentStore;
|
|
420
|
+
readonly formConfig: DbxFirebaseOidcEntryClientFormComponentConfig;
|
|
421
|
+
readonly formTemplate$: rxjs.Observable<_dereekb_firebase.UpdateOidcClientFieldParams>;
|
|
422
|
+
readonly handleUpdateClient: WorkUsingContext<DbxFirebaseOidcModelClientUpdateFormValue>;
|
|
423
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DbxFirebaseOidcEntryClientUpdateComponent, never>;
|
|
424
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DbxFirebaseOidcEntryClientUpdateComponent, "dbx-firebase-oidc-entry-client-update", never, {}, {}, never, never, true, never>;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* Displays the OIDC client ID and (when available) the one-time client secret.
|
|
429
|
+
*
|
|
430
|
+
* The client secret is only shown immediately after creation or after rotating.
|
|
431
|
+
* When no secret is available, a "Rotate Secret" button is shown.
|
|
432
|
+
*/
|
|
433
|
+
declare class DbxFirebaseOidcEntryClientViewComponent {
|
|
434
|
+
readonly oidcEntryDocumentStore: OidcEntryDocumentStore;
|
|
435
|
+
readonly clientIdSignal: _angular_core.Signal<string | undefined>;
|
|
436
|
+
readonly latestClientSecretSignal: _angular_core.Signal<_dereekb_util.Maybe<string>>;
|
|
437
|
+
readonly rotateSecretConfirmConfig: DbxActionConfirmConfig;
|
|
438
|
+
readonly handleRotateClientSecret: WorkUsingContext;
|
|
439
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DbxFirebaseOidcEntryClientViewComponent, never>;
|
|
440
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DbxFirebaseOidcEntryClientViewComponent, "dbx-firebase-oidc-entry-client-view", never, {}, {}, never, never, true, never>;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
/** Collection store for querying {@link OidcEntry} documents. */
|
|
444
|
+
declare class OidcEntryCollectionStore extends AbstractDbxFirebaseCollectionStore<OidcEntry, OidcEntryDocument> {
|
|
445
|
+
constructor();
|
|
446
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<OidcEntryCollectionStore, never>;
|
|
447
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<OidcEntryCollectionStore>;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/** Directive providing a {@link OidcEntryCollectionStore} for querying {@link OidcEntry} documents. */
|
|
451
|
+
declare class OidcEntryCollectionStoreDirective extends DbxFirebaseCollectionStoreDirective<OidcEntry, OidcEntryDocument, OidcEntryCollectionStore> {
|
|
452
|
+
constructor();
|
|
453
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<OidcEntryCollectionStoreDirective, never>;
|
|
454
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<OidcEntryCollectionStoreDirective, "[dbxOidcEntryCollection]", never, {}, {}, never, never, true, never>;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
/** Directive providing a {@link OidcEntryDocumentStore} for accessing a single {@link OidcEntry} document. */
|
|
458
|
+
declare class OidcEntryDocumentStoreDirective extends DbxFirebaseDocumentStoreDirective<OidcEntry, OidcEntryDocument, OidcEntryDocumentStore> {
|
|
459
|
+
constructor();
|
|
460
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<OidcEntryDocumentStoreDirective, never>;
|
|
461
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<OidcEntryDocumentStoreDirective, "[dbxOidcEntryDocument]", never, {}, {}, never, never, true, never>;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* Generates a random PKCE code verifier string (43 characters, base64url-encoded).
|
|
466
|
+
*
|
|
467
|
+
* @returns A cryptographically random base64url string suitable for use as a PKCE code_verifier.
|
|
468
|
+
*/
|
|
469
|
+
declare function generatePkceCodeVerifier(): string;
|
|
470
|
+
/**
|
|
471
|
+
* Generates a PKCE code challenge from a code verifier using SHA-256.
|
|
472
|
+
*
|
|
473
|
+
* @param verifier - The code verifier string to hash
|
|
474
|
+
* @returns A base64url-encoded SHA-256 hash of the verifier
|
|
475
|
+
*/
|
|
476
|
+
declare function generatePkceCodeChallenge(verifier: string): Promise<string>;
|
|
477
|
+
|
|
478
|
+
declare const DEFAULT_OIDC_AUTHORIZATION_ENDPOINT_PATH = "/oidc/auth";
|
|
479
|
+
declare const DEFAULT_OIDC_INTERACTION_ENDPOINT_PATH = "/interaction";
|
|
480
|
+
declare const DEFAULT_OIDC_INTERACTION_UID_PARAM_KEY = "uid";
|
|
481
|
+
declare const DEFAULT_OIDC_CLIENT_ID_PARAM_KEY = "client_id";
|
|
482
|
+
declare const DEFAULT_OIDC_CLIENT_NAME_PARAM_KEY = "client_name";
|
|
483
|
+
declare const DEFAULT_OIDC_CLIENT_URI_PARAM_KEY = "client_uri";
|
|
484
|
+
declare const DEFAULT_OIDC_LOGO_URI_PARAM_KEY = "logo_uri";
|
|
485
|
+
declare const DEFAULT_OIDC_SCOPES_PARAM_KEY = "scopes";
|
|
486
|
+
declare const DEFAULT_OIDC_TOKEN_ENDPOINT_AUTH_METHODS: OidcTokenEndpointAuthMethod[];
|
|
487
|
+
/**
|
|
488
|
+
* Abstract configuration class used as a DI token for app-level OIDC settings.
|
|
489
|
+
*
|
|
490
|
+
* Apps provide a concrete implementation via `provideDbxFirebaseOidc()`.
|
|
491
|
+
*/
|
|
492
|
+
declare abstract class DbxFirebaseOidcConfig {
|
|
493
|
+
/** Available scopes for the OIDC provider. Used in scope picker fields. */
|
|
494
|
+
abstract readonly availableScopes: OidcScopeDetails[];
|
|
495
|
+
/** Path to the authorization endpoint. Defaults to '/oidc/auth'. */
|
|
496
|
+
readonly oidcAuthorizationEndpointApiPath?: Maybe<string>;
|
|
497
|
+
/** Base path for interaction endpoints. Defaults to '/interaction'. */
|
|
498
|
+
readonly oidcInteractionEndpointApiPath?: Maybe<string>;
|
|
499
|
+
/**
|
|
500
|
+
* Supported token endpoint authentication methods.
|
|
501
|
+
*
|
|
502
|
+
* Overrides the default methods (`client_secret_post`, `client_secret_basic`).
|
|
503
|
+
* Used by forms and UI components that need to know which auth methods are available.
|
|
504
|
+
*/
|
|
505
|
+
readonly tokenEndpointAuthMethods?: Maybe<OidcTokenEndpointAuthMethod[]>;
|
|
506
|
+
/**
|
|
507
|
+
* Frontend route ref for the OAuth interaction pages (login/consent).
|
|
508
|
+
*
|
|
509
|
+
* When provided, this route is registered with {@link DbxAppAuthRouterService} as an
|
|
510
|
+
* ignored route, preventing auth effects from redirecting away during the OIDC flow.
|
|
511
|
+
*
|
|
512
|
+
* Uses hierarchical matching — a parent route ref (e.g., `'app.oauth'`) will cover
|
|
513
|
+
* all child routes (e.g., `'app.oauth.login'`, `'app.oauth.consent'`).
|
|
514
|
+
*/
|
|
515
|
+
readonly oauthInteractionRoute?: Maybe<SegueRefOrSegueRefRouterLink>;
|
|
516
|
+
/**
|
|
517
|
+
* Component class for rendering the consent scope list.
|
|
518
|
+
*
|
|
519
|
+
* When not provided, uses `DbxFirebaseOAuthConsentScopeDefaultViewComponent` which
|
|
520
|
+
* maps scope names to descriptions from `availableScopes`.
|
|
521
|
+
*/
|
|
522
|
+
readonly consentScopeListViewClass?: Maybe<Type<AbstractDbxFirebaseOAuthConsentScopeViewComponent>>;
|
|
523
|
+
}
|
|
524
|
+
/**
|
|
525
|
+
* Service that exposes the app-level OIDC configuration.
|
|
526
|
+
*
|
|
527
|
+
* Inject this service in components to access centralized OIDC settings
|
|
528
|
+
* (scopes, endpoint paths, param keys, etc.) without requiring explicit inputs.
|
|
529
|
+
*/
|
|
530
|
+
declare class DbxFirebaseOidcConfigService {
|
|
531
|
+
private readonly config;
|
|
532
|
+
get availableScopes(): OidcScopeDetails[];
|
|
533
|
+
get oidcAuthorizationEndpointApiPath(): string;
|
|
534
|
+
get oidcInteractionEndpointApiPath(): string;
|
|
535
|
+
get tokenEndpointAuthMethods(): OidcTokenEndpointAuthMethod[];
|
|
536
|
+
get oauthInteractionRoute(): Maybe<SegueRefOrSegueRefRouterLink>;
|
|
537
|
+
get consentScopeListViewClass(): Maybe<Type<AbstractDbxFirebaseOAuthConsentScopeViewComponent>>;
|
|
538
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DbxFirebaseOidcConfigService, never>;
|
|
539
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<DbxFirebaseOidcConfigService>;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* Provider factory for the {@link OidcModelFirestoreCollections}.
|
|
544
|
+
*/
|
|
545
|
+
declare function provideOidcModelFirestoreCollections(appCollection: OidcModelFirestoreCollections): OidcModelFirestoreCollections;
|
|
546
|
+
/**
|
|
547
|
+
* Configuration for {@link provideDbxFirebaseOidc}.
|
|
548
|
+
*/
|
|
549
|
+
interface ProvideDbxFirebaseOidcConfig {
|
|
550
|
+
/**
|
|
551
|
+
* The app collection class that implements {@link OidcModelFirestoreCollections}.
|
|
552
|
+
*
|
|
553
|
+
* Used to resolve the {@link OidcModelFirestoreCollections} provider.
|
|
554
|
+
*/
|
|
555
|
+
readonly appCollectionClass: abstract new (...args: any[]) => any;
|
|
556
|
+
/**
|
|
557
|
+
* Whether or not to provide the {@link OidcModelFirestoreCollections}.
|
|
558
|
+
*
|
|
559
|
+
* True by default.
|
|
560
|
+
*/
|
|
561
|
+
readonly provideOidcModelFirestoreCollections?: boolean;
|
|
562
|
+
/**
|
|
563
|
+
* App-level OIDC configuration (scopes, endpoint paths).
|
|
564
|
+
*
|
|
565
|
+
* Provided as {@link DbxFirebaseOidcConfig} and consumed by {@link DbxFirebaseOidcConfigService}.
|
|
566
|
+
*/
|
|
567
|
+
readonly oidcConfig: DbxFirebaseOidcConfig;
|
|
568
|
+
}
|
|
569
|
+
/**
|
|
570
|
+
* Provides the OIDC-related Angular services and collections for `@dereekb/dbx-firebase/oidc`.
|
|
571
|
+
*
|
|
572
|
+
* When `oauthInteractionRoute` is configured in {@link DbxFirebaseOidcConfig}, an app initializer
|
|
573
|
+
* is registered that adds that route to the {@link DbxAppAuthRouterService} ignored routes set,
|
|
574
|
+
* preventing auth effects from redirecting away during the OIDC interaction flow.
|
|
575
|
+
*/
|
|
576
|
+
declare function provideDbxFirebaseOidc(config: ProvideDbxFirebaseOidcConfig): EnvironmentProviders;
|
|
577
|
+
|
|
578
|
+
/**
|
|
579
|
+
* Service for communicating with the backend OIDC interaction endpoints.
|
|
580
|
+
*
|
|
581
|
+
* Automatically includes the current user's Firebase Auth ID token
|
|
582
|
+
* with each request for server-side verification.
|
|
583
|
+
*
|
|
584
|
+
* After successful login/consent submission, the server returns a redirect URL.
|
|
585
|
+
* The component is responsible for navigating to it (e.g., via `window.location.href`).
|
|
586
|
+
*/
|
|
587
|
+
declare class DbxFirebaseOidcInteractionService {
|
|
588
|
+
private readonly http;
|
|
589
|
+
private readonly _authService;
|
|
590
|
+
private readonly _oidcConfig;
|
|
591
|
+
/**
|
|
592
|
+
* Base URL for the interaction API, derived from the OIDC config service.
|
|
593
|
+
*/
|
|
594
|
+
get baseUrl(): string;
|
|
595
|
+
/**
|
|
596
|
+
* Submit login to complete the login interaction.
|
|
597
|
+
*
|
|
598
|
+
* Automatically attaches the current user's Firebase ID token.
|
|
599
|
+
*
|
|
600
|
+
* @returns Observable that emits the redirect URL from the server response.
|
|
601
|
+
*/
|
|
602
|
+
submitLogin(uid: OidcInteractionUid): Observable<OAuthInteractionLoginResponse>;
|
|
603
|
+
/**
|
|
604
|
+
* Submit consent decision to complete the consent interaction.
|
|
605
|
+
*
|
|
606
|
+
* Automatically attaches the current user's Firebase ID token.
|
|
607
|
+
*
|
|
608
|
+
* @returns Observable that emits the redirect URL from the server response.
|
|
609
|
+
*/
|
|
610
|
+
submitConsent(uid: OidcInteractionUid, approved: boolean): Observable<OAuthInteractionConsentResponse>;
|
|
611
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DbxFirebaseOidcInteractionService, never>;
|
|
612
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<DbxFirebaseOidcInteractionService>;
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
export { AbstractDbxFirebaseOAuthConsentScopeViewComponent, DEFAULT_OIDC_AUTHORIZATION_ENDPOINT_PATH, DEFAULT_OIDC_CLIENT_ID_PARAM_KEY, DEFAULT_OIDC_CLIENT_NAME_PARAM_KEY, DEFAULT_OIDC_CLIENT_URI_PARAM_KEY, DEFAULT_OIDC_INTERACTION_ENDPOINT_PATH, DEFAULT_OIDC_INTERACTION_UID_PARAM_KEY, DEFAULT_OIDC_LOGO_URI_PARAM_KEY, DEFAULT_OIDC_SCOPES_PARAM_KEY, DEFAULT_OIDC_TOKEN_ENDPOINT_AUTH_METHODS, DbxFirebaseOAuthConsentScopeDefaultViewComponent, DbxFirebaseOAuthConsentScopeListComponent, DbxFirebaseOAuthConsentViewComponent, DbxFirebaseOAuthLoginComponent, DbxFirebaseOAuthLoginViewComponent, DbxFirebaseOidcConfig, DbxFirebaseOidcConfigService, DbxFirebaseOidcEntryClientCreateComponent, DbxFirebaseOidcEntryClientFormComponent, DbxFirebaseOidcEntryClientListComponent, DbxFirebaseOidcEntryClientListViewComponent, DbxFirebaseOidcEntryClientListViewItemClientComponent, DbxFirebaseOidcEntryClientListViewItemComponent, DbxFirebaseOidcEntryClientListViewItemDefaultComponent, DbxFirebaseOidcEntryClientTestComponent, DbxFirebaseOidcEntryClientTestFormComponent, DbxFirebaseOidcEntryClientUpdateComponent, DbxFirebaseOidcEntryClientViewComponent, DbxFirebaseOidcInteractionService, DbxOAuthConsentComponent, OidcEntryCollectionStore, OidcEntryCollectionStoreDirective, OidcEntryDocumentStore, OidcEntryDocumentStoreDirective, generatePkceCodeChallenge, generatePkceCodeVerifier, oidcClientHomepageUriField, oidcClientJwksUriField, oidcClientLogoUriField, oidcClientNameField, oidcClientRedirectUrisField, oidcClientTestClientIdField, oidcClientTestRedirectUriField, oidcClientTestScopesField, oidcClientTokenEndpointAuthMethodField, oidcEntryClientFormFields, oidcEntryClientTestFormFields, oidcEntryClientUpdateFormFields, provideDbxFirebaseOidc, provideOidcModelFirestoreCollections };
|
|
616
|
+
export type { DbxFirebaseOAuthConsentScopesViewData, DbxFirebaseOidcEntryClientFormComponentConfig, DbxFirebaseOidcEntryClientTestFormComponentConfig, DbxFirebaseOidcModelClientFormValue, DbxFirebaseOidcModelClientTestFormValue, DbxFirebaseOidcModelClientUpdateFormValue, DbxOAuthConsentComponentConfig, OAuthConsentScope, OidcEntryClientFormFieldsConfig, OidcEntryClientTestFormFieldsConfig, OidcEntryWithSelection, OidcLoginStateCase, ProvideDbxFirebaseOidcConfig };
|