vault/ui/tests/helpers/auth/mfa-helpers.js
claire bontempo 741721ad0e
UI: Fix MFA + SSO login workflow (#28873)
* =passback mfa_requirement for oidc login methods

* =pass SAML mfa requirement

* add comments

* add acceptance tests

* add helper

* update callback args for auth jwt

* add changelog

* update changelog

* is this line necessary?

* fetch token data for display name, this commit can be undone when BE fixes VAULT-32462

* change error handling, add comments

* update capitalization

* revert capitalization

* reword changelog

* clarify comments

* Update changelog/28873.txt
2024-12-17 11:06:20 -06:00

25 lines
509 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
export const setupTotpMfaResponse = (mountPath) => ({
auth: {
mfa_requirement: {
mfa_request_id: '0edf0945-da02-1300-9a0a-cb052cd94eb4',
mfa_constraints: {
[mountPath]: {
any: [
{
type: 'totp',
id: '7028db82-7de3-01d7-26b5-84b147c80966',
uses_passcode: true,
},
],
},
},
},
num_uses: 0,
},
});