Project

General

Profile

Actions

Feature #34242

closed

Include two-factor authentication scheme in users API response

Added by Go MAEDA over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
REST API
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

By #1237, a new column "twofa_scheme" that represents the two-factor authentication scheme enabled for the user. You can also know whether two-factor auth is enabled for the user by checking the column's value.

I think Users API should export the new column as well.

diff --git a/app/views/users/show.api.rsb b/app/views/users/show.api.rsb
index 3bc77e3be..5fe3d5b1c 100644
--- a/app/views/users/show.api.rsb
+++ b/app/views/users/show.api.rsb
@@ -9,6 +9,7 @@ api.user do
   api.updated_on @user.updated_on
   api.last_login_on     @user.last_login_on
   api.passwd_changed_on @user.passwd_changed_on
+  api.twofa_scheme      @user.twofa_scheme
   api.api_key    @user.api_key if User.current.admin? || (User.current == @user)
   api.status     @user.status if User.current.admin?

Possible values:
  • null: Two-factor authentication is disabled
  • "totp": Two-factor authentication with TOTP is enabled

Files

feature-34242.patch (3.77 KB) feature-34242.patch Mizuki ISHIKAWA, 2020-11-11 07:43
Actions

Also available in: Atom PDF