@dereekb/dbx-firebase 13.8.0 → 13.9.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 +32 -28
- package/fesm2022/dereekb-dbx-firebase-oidc.mjs.map +1 -1
- package/fesm2022/dereekb-dbx-firebase.mjs +20 -18
- package/fesm2022/dereekb-dbx-firebase.mjs.map +1 -1
- package/package.json +12 -12
- package/types/dereekb-dbx-firebase-oidc.d.ts +12 -12
- package/types/dereekb-dbx-firebase.d.ts +4 -4
|
@@ -9,7 +9,7 @@ import { DbxFirebaseAuthService, AbstractDbxFirebaseDocumentStore, firebaseDocum
|
|
|
9
9
|
import { HttpClient } from '@angular/common/http';
|
|
10
10
|
import { first, switchMap, of, map, BehaviorSubject, tap } from 'rxjs';
|
|
11
11
|
import * as i1 from '@dereekb/dbx-form';
|
|
12
|
-
import {
|
|
12
|
+
import { dbxForgeValueSelectionField, dbxForgeTextField, dbxForgeSearchableStringChipField, isWebsiteUrlValidator, dbxForgeGroup, dbxForgePickableChipField, pickableValueFieldValuesConfigForStaticLabeledValues, AbstractConfigAsyncForgeFormDirective, DbxForgeFormComponentImportsModule, dbxForgeFormComponentProviders, DBX_FORGE_FORM_COMPONENT_TEMPLATE, DbxActionFormDirective, DbxFormSourceDirective, DbxFormValueChangeDirective } from '@dereekb/dbx-form';
|
|
13
13
|
import { ALL_OIDC_TOKEN_ENDPOINT_AUTH_METHOD_OPTIONS, PRIVATE_KEY_JWT_TOKEN_ENDPOINT_AUTH_METHOD, OIDC_ENTRY_CLIENT_TYPE, OidcModelFunctions, OidcModelFirestoreCollections } from '@dereekb/firebase';
|
|
14
14
|
import { CommonModule } from '@angular/common';
|
|
15
15
|
|
|
@@ -662,12 +662,12 @@ function oidcEntryClientForgeFormFields(config) {
|
|
|
662
662
|
function oidcClientTokenEndpointAuthMethodForgeField(config) {
|
|
663
663
|
const allowedAuthMethods = config?.tokenEndpointAuthMethods;
|
|
664
664
|
const options = allowedAuthMethods?.length ? ALL_OIDC_TOKEN_ENDPOINT_AUTH_METHOD_OPTIONS.filter((o) => allowedAuthMethods.includes(o.value)) : ALL_OIDC_TOKEN_ENDPOINT_AUTH_METHOD_OPTIONS;
|
|
665
|
-
return
|
|
665
|
+
return dbxForgeValueSelectionField({
|
|
666
666
|
key: 'token_endpoint_auth_method',
|
|
667
667
|
label: 'Token Endpoint Auth Method',
|
|
668
668
|
description: 'How the client authenticates when exchanging tokens. Cannot be changed after creation.',
|
|
669
669
|
required: true,
|
|
670
|
-
options
|
|
670
|
+
props: { options }
|
|
671
671
|
});
|
|
672
672
|
}
|
|
673
673
|
/**
|
|
@@ -686,10 +686,10 @@ function oidcEntryClientUpdateForgeFormFields() {
|
|
|
686
686
|
* @returns A forge text field for the client name.
|
|
687
687
|
*/
|
|
688
688
|
function oidcClientNameForgeField() {
|
|
689
|
-
return
|
|
689
|
+
return dbxForgeTextField({
|
|
690
690
|
key: 'client_name',
|
|
691
691
|
label: 'Client Name',
|
|
692
|
-
|
|
692
|
+
hint: 'A human-readable name for this OAuth client.',
|
|
693
693
|
required: true,
|
|
694
694
|
maxLength: 200
|
|
695
695
|
});
|
|
@@ -700,15 +700,17 @@ function oidcClientNameForgeField() {
|
|
|
700
700
|
* @returns A forge searchable chip field for redirect URIs.
|
|
701
701
|
*/
|
|
702
702
|
function oidcClientRedirectUrisForgeField() {
|
|
703
|
-
return
|
|
703
|
+
return dbxForgeSearchableStringChipField({
|
|
704
704
|
key: 'redirect_uris',
|
|
705
705
|
label: 'Redirect URIs',
|
|
706
|
-
|
|
706
|
+
hint: 'Type a redirect URI (e.g. https://example.com/callback) and press enter to add it.',
|
|
707
707
|
required: true,
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
708
|
+
props: {
|
|
709
|
+
searchOnEmptyText: false,
|
|
710
|
+
textInputValidator: isWebsiteUrlValidator({ requirePrefix: true, allowPorts: true }),
|
|
711
|
+
search: () => of([]),
|
|
712
|
+
displayForValue: (values) => of(values.map((v) => ({ ...v, label: v.value })))
|
|
713
|
+
}
|
|
712
714
|
});
|
|
713
715
|
}
|
|
714
716
|
/**
|
|
@@ -718,12 +720,12 @@ function oidcClientRedirectUrisForgeField() {
|
|
|
718
720
|
* @returns A forge group field with conditional visibility logic.
|
|
719
721
|
*/
|
|
720
722
|
function oidcClientJwksUriForgeField() {
|
|
721
|
-
return
|
|
723
|
+
return dbxForgeGroup({
|
|
722
724
|
fields: [
|
|
723
|
-
|
|
725
|
+
dbxForgeTextField({
|
|
724
726
|
key: 'jwks_uri',
|
|
725
727
|
label: 'JWKS URI',
|
|
726
|
-
|
|
728
|
+
hint: "URL where the client's public JSON Web Key Set can be fetched. Required for private_key_jwt authentication.",
|
|
727
729
|
required: true
|
|
728
730
|
})
|
|
729
731
|
],
|
|
@@ -746,10 +748,10 @@ function oidcClientJwksUriForgeField() {
|
|
|
746
748
|
* @returns A forge text field for the logo URI.
|
|
747
749
|
*/
|
|
748
750
|
function oidcClientLogoUriForgeField() {
|
|
749
|
-
return
|
|
751
|
+
return dbxForgeTextField({
|
|
750
752
|
key: 'logo_uri',
|
|
751
753
|
label: 'Logo URI',
|
|
752
|
-
|
|
754
|
+
hint: 'URL of the client logo image (optional).',
|
|
753
755
|
required: false
|
|
754
756
|
});
|
|
755
757
|
}
|
|
@@ -759,10 +761,10 @@ function oidcClientLogoUriForgeField() {
|
|
|
759
761
|
* @returns A forge text field for the homepage URL.
|
|
760
762
|
*/
|
|
761
763
|
function oidcClientHomepageUriForgeField() {
|
|
762
|
-
return
|
|
764
|
+
return dbxForgeTextField({
|
|
763
765
|
key: 'client_uri',
|
|
764
766
|
label: 'Homepage URL',
|
|
765
|
-
|
|
767
|
+
hint: 'URL of the client homepage (optional).',
|
|
766
768
|
required: false
|
|
767
769
|
});
|
|
768
770
|
}
|
|
@@ -781,7 +783,7 @@ function oidcEntryClientTestForgeFormFields(config) {
|
|
|
781
783
|
* @returns A read-only forge text field for the client ID.
|
|
782
784
|
*/
|
|
783
785
|
function oidcClientTestClientIdForgeField() {
|
|
784
|
-
return
|
|
786
|
+
return dbxForgeTextField({
|
|
785
787
|
key: 'client_id',
|
|
786
788
|
label: 'Client ID',
|
|
787
789
|
readonly: true
|
|
@@ -795,12 +797,12 @@ function oidcClientTestClientIdForgeField() {
|
|
|
795
797
|
*/
|
|
796
798
|
function oidcClientTestRedirectUriForgeField(redirectUris) {
|
|
797
799
|
const options = redirectUris.map((uri) => ({ label: uri, value: uri }));
|
|
798
|
-
return
|
|
800
|
+
return dbxForgeValueSelectionField({
|
|
799
801
|
key: 'redirect_uri',
|
|
800
802
|
label: 'Redirect URI',
|
|
801
803
|
description: 'Select the redirect URI to use for the test flow.',
|
|
802
804
|
required: true,
|
|
803
|
-
options
|
|
805
|
+
props: { options }
|
|
804
806
|
});
|
|
805
807
|
}
|
|
806
808
|
/**
|
|
@@ -810,12 +812,14 @@ function oidcClientTestRedirectUriForgeField(redirectUris) {
|
|
|
810
812
|
* @returns A forge pickable chip field for scope selection.
|
|
811
813
|
*/
|
|
812
814
|
function oidcClientTestScopesForgeField(availableScopes) {
|
|
813
|
-
return
|
|
815
|
+
return dbxForgePickableChipField({
|
|
814
816
|
key: 'scopes',
|
|
815
817
|
label: 'Scopes',
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
818
|
+
hint: 'Select the scopes to request.',
|
|
819
|
+
props: {
|
|
820
|
+
showSelectAllButton: true,
|
|
821
|
+
...pickableValueFieldValuesConfigForStaticLabeledValues(availableScopes)
|
|
822
|
+
}
|
|
819
823
|
});
|
|
820
824
|
}
|
|
821
825
|
|
|
@@ -829,7 +833,7 @@ function oidcClientTestScopesForgeField(availableScopes) {
|
|
|
829
833
|
*/
|
|
830
834
|
class DbxFirebaseOidcEntryClientForgeFormComponent extends AbstractConfigAsyncForgeFormDirective {
|
|
831
835
|
_oidcConfigService = inject(DbxFirebaseOidcConfigService);
|
|
832
|
-
|
|
836
|
+
formConfig$ = this.currentConfig$.pipe(map((config) => {
|
|
833
837
|
if (!config) {
|
|
834
838
|
return undefined;
|
|
835
839
|
}
|
|
@@ -859,7 +863,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
859
863
|
* Displays read-only client_id, a redirect URI selector, and scope picker.
|
|
860
864
|
*/
|
|
861
865
|
class DbxFirebaseOidcEntryClientTestForgeFormComponent extends AbstractConfigAsyncForgeFormDirective {
|
|
862
|
-
|
|
866
|
+
formConfig$ = this.currentConfig$.pipe(map((config) => {
|
|
863
867
|
if (!config) {
|
|
864
868
|
return undefined;
|
|
865
869
|
}
|
|
@@ -888,7 +892,7 @@ class DbxFirebaseOidcEntryClientListComponent extends AbstractDbxSelectionListWr
|
|
|
888
892
|
});
|
|
889
893
|
}
|
|
890
894
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxFirebaseOidcEntryClientListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
891
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: DbxFirebaseOidcEntryClientListComponent, isStandalone: true, selector: "dbx-firebase-oidc-client-list", providers: provideDbxListViewWrapper(DbxFirebaseOidcEntryClientListComponent), usesInheritance: true, ngImport: i0, template: "\n <dbx-list [state]=\"currentState$\" [config]=\"configSignal()\" [hasMore]=\"hasMore()\" [disabled]=\"
|
|
895
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: DbxFirebaseOidcEntryClientListComponent, isStandalone: true, selector: "dbx-firebase-oidc-client-list", providers: provideDbxListViewWrapper(DbxFirebaseOidcEntryClientListComponent), usesInheritance: true, ngImport: i0, template: "\n <dbx-list [state]=\"currentState$\" [config]=\"configSignal()\" [hasMore]=\"hasMore()\" [disabled]=\"disabledSignal()\" [selectionMode]=\"selectionModeSignal()\">\n <ng-content top select=\"[top]\"></ng-content>\n <ng-content bottom select=\"[bottom]\"></ng-content>\n <ng-content empty select=\"[empty]\"></ng-content>\n <ng-content emptyLoading select=\"[emptyLoading]\"></ng-content>\n <ng-content end select=\"[end]\"></ng-content>\n </dbx-list>", isInline: true, dependencies: [{ kind: "ngmodule", type: DbxListWrapperComponentImportsModule }, { kind: "component", type: i1$1.DbxListComponent, selector: "dbx-list", inputs: ["padded", "state", "config", "disabled", "selectionMode", "hasMore"], outputs: ["contentScrolled"] }] });
|
|
892
896
|
}
|
|
893
897
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxFirebaseOidcEntryClientListComponent, decorators: [{
|
|
894
898
|
type: Component,
|