[issue-1003] - WIP: give unique property names
in an attempt to make the OAuth Client Management forms accessible
@@ -15,18 +15,27 @@ import {
DynamicInputModel
} from '@ng-dynamic-forms/core';
-// Default form config object for OAuth client settings
-const OAUTH_APP_FORM_CONFIG = {
- clientId: {
+const uniqueNum = () => {
+ console.log('uniqueNum called');
+ return Math.random().toString(36).substr(2, 16);
+}
+
+const uniqueIdProp = () => 'clientId-' + uniqueNum();
+const uniqueSecretProp = () => 'clientSecret-' + uniqueNum();
+const idName = uniqueIdProp();
+const secretName = uniqueSecretProp();
+const OAUTH_APP_FORM_CONFIG = {};
+
+OAUTH_APP_FORM_CONFIG[idName] = {
displayName: 'Client ID',
type: 'string',
description: 'The OAuth client ID setting for the target application'
- },
- clientSecret: {
+};
+
+OAUTH_APP_FORM_CONFIG[secretName] = {
displayName: 'Client Secret',
type: 'password',
description: 'The OAuth client secret value for the target application'
- }
};
@Component({
