vault/ui/app/forms/mfa/method/ping-id.ts
Vault Automation 0a27857988
[UI] Ember Data Migration - MFA (#14721) (#14894)
* Update mfa index route beforeModel to use api instead of store

* MFA form...

* Remove mfa method

* WIP

* first arg..

* Working form submit

* Working create forms..

* Put model back in original state..

* Working edit

* Update methods list

* Working detail..

* Working infotablerows

* Use form arg instead of model

* Set up new enforcements form

* MFA enforcement...

* Update remaining pages...

* Add more util helpers

* Refactor

* Update targets initial values

* Update targets to use api

* Update useExisting

* Patch SearchSelect and fix mfa-login-enforcement-form test

* Some more tests fixed..

* Working mfa-method tests

* Passing method-form-test

* Update editDisabled

* Address feedback..

* Add attribute to data for display

* Update displayFields

* Add defaultValue

* Update tests..

* Conditionally show onClose

* Add defaultvalue

Co-authored-by: Kianna <30884335+kiannaquach@users.noreply.github.com>
2026-05-20 13:36:35 +00:00

38 lines
1.2 KiB
TypeScript

/**
* Copyright IBM Corp. 2016, 2025
* SPDX-License-Identifier: BUSL-1.1
*/
import Form from 'vault/forms/form';
import FormField from 'vault/utils/forms/field';
import type { Validations } from 'vault/app-types';
import type { MfaCreatePingIdMethodRequest } from '@hashicorp/vault-client-typescript';
type MfaCreatePingIdMethodFormData = MfaCreatePingIdMethodRequest & {
name: string;
};
export default class MfaCreatePingIdMethodForm extends Form<MfaCreatePingIdMethodFormData> {
type = 'pingid';
formFields = [
new FormField('username_format', 'string', {
label: 'Username format',
subText: 'How to map identity names to MFA method names. ',
}),
new FormField('settings_file_base64', 'string', {
label: 'Settings file',
subText: 'A base-64 encoded third party setting file retrieved from the PingIDs configuration page.',
}),
new FormField('use_signature', 'boolean'),
new FormField('idp_url', 'string'),
new FormField('admin_url', 'string'),
new FormField('authenticator_url', 'string'),
new FormField('org_alias', 'string'),
];
validations: Validations = {
settings_file_base64: [{ type: 'presence', message: 'Settings file base64 is required.' }],
};
}