| Server IP : 198.38.94.13 / Your IP : 216.73.217.33 Web Server : Apache System : Linux d4744.dxb1.stableserver.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64 User : revivere ( 1140) PHP Version : 8.2.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /lib/python3.9/site-packages/ipaclient/plugins/__pycache__/ |
Upload File : |
a
�ji� � @ s d dl Z d dlZd dlmZmZmZ d dlmZmZ d dl m
Z
mZmZ d dl
mZ d dlmZ zd dlZd dlZW n ey� eed�d��Y n0 ejr�eZed �ed
� ed� ed� ed
� Ze� ZdZedd�G dd� de��Zedd�G dd� de��Ze� G dd� de
��ZdS )� N)�_�api�IntEnum)�NotFound�SkipPluginModule)�Command�Method�Object)�Registry)�
classpropertyzpython-yubico is not installed.��reasonz
YubiKey Tokens
z
Manage YubiKey tokens.
zt
This code is an extension to the otptoken plugin and provides support for
reading/writing YubiKey tokens directly.
z
EXAMPLES:
zP
Add a new token:
ipa otptoken-add-yubikey --owner=jdoe --desc="My YubiKey"
ZotpT)Zno_failc @ s e Zd ZdZdS )�_fake_otptokenZotptokenN)�__name__�
__module__�__qualname__�name� r r �F/usr/lib/python3.9/site-packages/ipaclient/plugins/otptoken_yubikey.pyr ; s r c @ s e Zd ZdZdZdS )�_fake_otptoken_add�otptoken_addTN)r r r r �NO_CLIr r r r r @ s r c s� e Zd Zed�Zedded�dd�fZeZedd� �Z e
e �Zed d
� �Z
� fdd�Z� fd
d�Z� fdd�Zdd� Zdd� Z� ZS )�otptoken_add_yubikeyzAdd a new YubiKey OTP token.zslot?�slotzYubiKey slot)� � )Zcli_nameZlabel�valuesc C s t j�d�tu S )Nr )r r Z
get_pluginr )�clsr r r Z__NO_CLI_getterS s z$otptoken_add_yubikey.__NO_CLI_getterc C s | j jjjS �N)r r r �api_version��selfr r r r Y s z otptoken_add_yubikey.api_versionc # s8 | j jj�� D ]
}|V qtt| ��� D ]
}|V q(d S r )r r r �args�superr �get_args)r! �arg�� __class__r r r$ ] s zotptoken_add_yubikey.get_argsc # sB | j jj�� D ]}|jdvr|V qtt| ��� D ]
}|V q2d S )N)�type�ipatokenvendor�
ipatokenmodel�ipatokenserial�ipatokenotpalgorithm�ipatokenhotpcounter�ipatokenotpkeyZipatokentotpclockoffsetZipatokentotptimestep� no_qrcodeZqrcode�version)r r r �optionsr r# r �get_options)r! �optionr&