Skip to main content

Introduction

The LoginTC Python client is a complete LoginTC REST API client to manage LoginTC organizations, users, domains, tokens and to create login sessions.

Installation

The libraries can be installed using the standard Python module installation method, Distutils. Note that you will also need to have 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

Example

The following example will create an authentication session and wait 60 seconds for the user to approve or deny.

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...'

Documentation

See https://www.logintc.com/docs

If you have Sphinx installed, you can run make html from the root directory to generate the API documentation for the library locally.

Help

Email: support@cyphercor.com

https://www.logintc.com

Release files for logintc 1.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for logintc 1.1.9
File Size Uploaded
logintc-1.1.9.tar.gz 11.8 kB Details

Release files / logintc-1.1.9.tar.gz

Download URL logintc-1.1.9.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ca268a925818333b726d69bf140208414e1fbc1cbc1cb0eeb7fb517aa88ef5ab
BLAKE2b-256 checksum
How to use checksums
f73d91d9099511565542501b6ea1a101dc6a8daa70adcf98c84959e7d707e172
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.1.9 This release

1 release file

1.1.8

1 release file

1.1.7

1 release file

1.1.6

1 release file

1.1.5

1 release file

1.1.4

1 release file

1.1.3

1 release file

1.1.2

1 release file

1.1.1

1 release file

1.1.0

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page