summaryrefslogtreecommitdiffstats
path: root/ipaclient/plugins/otptoken_yubikey.py
diff options
context:
space:
mode:
Diffstat (limited to 'ipaclient/plugins/otptoken_yubikey.py')
-rw-r--r--ipaclient/plugins/otptoken_yubikey.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/ipaclient/plugins/otptoken_yubikey.py b/ipaclient/plugins/otptoken_yubikey.py
index e9aaba934..5e0d99462 100644
--- a/ipaclient/plugins/otptoken_yubikey.py
+++ b/ipaclient/plugins/otptoken_yubikey.py
@@ -25,7 +25,7 @@ import yubico
from ipalib import _, IntEnum
from ipalib.errors import NotFound
-from ipalib.frontend import Command
+from ipalib.frontend import Command, Method, Object
from ipalib.plugable import Registry
if six.PY3:
@@ -50,6 +50,17 @@ register = Registry()
topic = 'otp'
+@register(no_fail=True)
+class _fake_otptoken(Object):
+ name = 'otptoken'
+
+
+@register(no_fail=True)
+class _fake_otptoken_add(Method):
+ name = 'otptoken_add'
+ NO_CLI = True
+
+
@register()
class otptoken_add_yubikey(Command):
__doc__ = _('Add a new YubiKey OTP token.')
@@ -63,6 +74,10 @@ class otptoken_add_yubikey(Command):
)
has_output_params = takes_options
+ @property
+ def NO_CLI(self):
+ return self.api.Command.otptoken_add.NO_CLI
+
def get_args(self):
for arg in self.api.Command.otptoken_add.args():
yield arg