Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
The LoginTC Python client is a complete LoginTC REST API <https://www.logintc.com/docs/rest-api>
_ client to manage LoginTC organizations, users, domains, tokens and to create login sessions.
The libraries can be installed using the standard Python module installation method, Distutils <http://docs.python.org/2/install/index.html>
. Note that you will also need to have setuptools <https://pypi.python.org/pypi/setuptools>
installed
::
git clone https://github.com/logintc/logintc-python.git
cd logintc-python
python setup.py install
Alternatively, you should also be able to retrieve it from the Python Package Index via easy_install logintc
or pip install logintc
The following example will create an authentication session and wait 60 seconds for the user to approve or deny.
.. code:: python
import logintc
import datetime
import time
apiKey = 'LWbSCedV8sgFxdu0mPB42wuVWG7o3hf2AyaWKeHc0k6XgUHGZQj6K3yMOqPXY4Fq'
domainId = '892e643b2da3547a705ba8f05316187976e11ec4'
client = logintc.LoginTC(apiKey)
session = client.create_session(domainId, username='john.doe')
timeout = datetime.datetime.today() + datetime.timedelta(seconds=60)
while datetime.datetime.today() < timeout:
time.sleep(1)
session = client.get_session(domainId, session['id'])
if session['state'] == 'approved':
print 'Approved!'
break
elif session['state'] == 'denied':
print 'Denied!'
break
elif session['state'] == 'pending':
print 'Waiting...'
See https://www.logintc.com/docs
If you have Sphinx <http://sphinx-doc.org/>
_ installed, you can run make html
from the root directory to generate the API documentation for the library locally.
Email: support@cyphercor.com
FAQs
API client for LoginTC two-factor authentication.
We found that logintc demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.