Add TOTP MFA Authenticator D-bus interfaces

Time-based One-time Password (TOTP) authenticator provides TOTP based
two factor user authentication.

This commit adds TOTP authenticator D-bus interfaces

Change-Id: I20959c5c28d590e48804d4344a31795f424c3869
Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
diff --git a/gen/xyz/openbmc_project/User/TOTPAuthenticator/meson.build b/gen/xyz/openbmc_project/User/TOTPAuthenticator/meson.build
new file mode 100644
index 0000000..1d8e229
--- /dev/null
+++ b/gen/xyz/openbmc_project/User/TOTPAuthenticator/meson.build
@@ -0,0 +1,15 @@
+# Generated file; do not modify.
+generated_sources += custom_target(
+    'xyz/openbmc_project/User/TOTPAuthenticator__cpp'.underscorify(),
+    input: [ '../../../../../yaml/xyz/openbmc_project/User/TOTPAuthenticator.interface.yaml',  ],
+    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    depend_files: sdbusplusplus_depfiles,
+    command: [
+        sdbuspp_gen_meson_prog, '--command', 'cpp',
+        '--output', meson.current_build_dir(),
+        '--tool', sdbusplusplus_prog,
+        '--directory', meson.current_source_dir() / '../../../../../yaml',
+        'xyz/openbmc_project/User/TOTPAuthenticator',
+    ],
+)
+
diff --git a/gen/xyz/openbmc_project/User/meson.build b/gen/xyz/openbmc_project/User/meson.build
index 16c6364..378518f 100644
--- a/gen/xyz/openbmc_project/User/meson.build
+++ b/gen/xyz/openbmc_project/User/meson.build
@@ -105,3 +105,18 @@
     ],
 )
 
+subdir('TOTPAuthenticator')
+generated_others += custom_target(
+    'xyz/openbmc_project/User/TOTPAuthenticator__markdown'.underscorify(),
+    input: [ '../../../../yaml/xyz/openbmc_project/User/TOTPAuthenticator.interface.yaml',  ],
+    output: [ 'TOTPAuthenticator.md' ],
+    depend_files: sdbusplusplus_depfiles,
+    command: [
+        sdbuspp_gen_meson_prog, '--command', 'markdown',
+        '--output', meson.current_build_dir(),
+        '--tool', sdbusplusplus_prog,
+        '--directory', meson.current_source_dir() / '../../../../yaml',
+        'xyz/openbmc_project/User/TOTPAuthenticator',
+    ],
+)
+
diff --git a/yaml/xyz/openbmc_project/User/TOTPAuthenticator.interface.yaml b/yaml/xyz/openbmc_project/User/TOTPAuthenticator.interface.yaml
new file mode 100644
index 0000000..252c2cc
--- /dev/null
+++ b/yaml/xyz/openbmc_project/User/TOTPAuthenticator.interface.yaml
@@ -0,0 +1,52 @@
+description: >
+    This interface defines methods and properties required for Time-based
+    One-time Password (TOTP) multi-factor authentication at user level to
+    support multi-factor authentication secret key setup for each user. This
+    interface implemented by each user object to support TOTP based
+    authenticators like google, microsoft, etc.
+
+methods:
+    - name: CreateSecretKey
+      description: >
+          This method setup Time-based One-time Password (TOTP) authenticator
+          secret key for the given user and returns secret key string to share
+          secret key to user.
+      returns:
+          - name: SecretKey
+            type: string
+            description: >
+                Secret key string which will be shared to user to setup TOTP
+                applications to generate TOTP token.
+
+    - name: VerifyOTP
+      description: >
+          This method verifies OTP with Time-based One-time Password
+          authenticator secret key for the given user and returns weather this
+          OTP is valid or not which make sure user has setup valid secret key
+          for two factor authentication.
+      parameters:
+          - name: OTP
+            type: string
+            description: >
+                One-time password string
+      returns:
+          - name: Status
+            type: boolean
+            description: >
+                Returns true if provided OTP is valid otherwise returns false.
+
+properties:
+    - name: SecretKeyIsValid
+      type: boolean
+      default: false
+      description: >
+          This property indicates whether TOTP authenticator secret key setup
+          for the given user
+
+    - name: BypassedProtocol
+      type: enum[xyz.openbmc_project.User.MultiFactorAuthConfiguration.Type]
+      default: None
+      description: >
+          User level multi-factor authentication bypass settings. This interface
+          will be implemented by user D-bus object to support user's MFA bypass
+          configuration.