0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-02-17 22:04:19 -05:00

refactor: rename method

This commit is contained in:
Gao Sun 2024-06-15 11:22:06 +08:00
parent 128ee0c9bb
commit 320b720c46
No known key found for this signature in database
GPG key ID: 13EBE123E4773688
3 changed files with 5 additions and 5 deletions

View file

@ -298,7 +298,7 @@ describe('organization token grant', () => {
Sinon.stub(tenant.queries.organizations.relations.users, 'exists').resolves(true);
Sinon.stub(tenant.queries.applications, 'findApplicationById').resolves(mockApplication);
Sinon.stub(tenant.queries.applications.userConsentOrganizations, 'exists').resolves(true);
Sinon.stub(tenant.queries.organizations, 'getMfaData').resolves({
Sinon.stub(tenant.queries.organizations, 'getMfaStatus').resolves({
isMfaRequired: true,
hasMfaConfigured: false,
});
@ -322,7 +322,7 @@ describe('organization token grant', () => {
{ tenantId: 'default', id: 'bar', name: 'bar', description: 'bar' },
{ tenantId: 'default', id: 'baz', name: 'baz', description: 'baz' },
]);
Sinon.stub(tenant.queries.organizations, 'getMfaData').resolves({
Sinon.stub(tenant.queries.organizations, 'getMfaStatus').resolves({
isMfaRequired: false,
hasMfaConfigured: false,
});

View file

@ -248,7 +248,7 @@ export const buildHandler: (
}
// Check if the organization requires MFA and the user has MFA enabled
const { isMfaRequired, hasMfaConfigured } = await queries.organizations.getMfaData(
const { isMfaRequired, hasMfaConfigured } = await queries.organizations.getMfaStatus(
organizationId,
account.accountId
);

View file

@ -298,12 +298,12 @@ export default class OrganizationQueries extends SchemaQueries<
}
/**
* Get the multi-factor authentication (MFA) data for the given organization and user.
* Get the multi-factor authentication (MFA) status for the given organization and user.
*
* @returns Whether MFA is required for the organization and whether the user has configured MFA.
* @see {@link MfaData}
*/
async getMfaData(organizationId: string, userId: string) {
async getMfaStatus(organizationId: string, userId: string) {
const { table, fields } = convertToIdentifiers(Organizations);
const users = convertToIdentifiers(Users);