fedora-infra/python-fedora — pull request #20 by laxathom (2013-03-02 02:10:13+00:00)
Title: Add OTP as Authentication option.

This feature allows third-party client to use OTP key as an additional option to authenticate against FAS.

/!\ this feature requires this PR: https://github.com/fedora-infra/fas/pull/10

Here's how you can test it:

from fedora.client.fas2 import AccountSystem
import getpass

username = raw_input("Enter your FAS username: ")
paswd = getpass.getpass()
# Look for a way to not print the otp on stdout
otp = raw_input("Touch your yubikey:")

fas = AccountSystem(base_url='http://fas01.dev.fedoraproject.org/accounts', username=username, password=paswd, otp=otp)

data = fas.person_by_username(username)
#data = fas.group_by_name('sysadmin')

#print data