Skip to main content

Library to authenticate with a LEAP platform

Project description

This library can be used to authenticate and manage passwords in a LEAP platform. It uses the Secure Remote Password protocol.

To install it:

$ pip install leap.auth

To use it:

from leap.auth import SRPAuth

api_uri = 'https://api.leap.platform:4430/'
ca_cert_path = './path_to_certificate.crt'
# TIP: the certificate is usually at https://api.leap.platform/ca.crt

user = 'username'
password = 'longandsecurepassword'

srp_auth = SRPAuth(api_uri, ca_cert_path)

# register a user
srp_auth.register(user, password)

# authenticate with the defined LEAP server using the registered credentials
auth = srp_auth.authenticate(user, password)
# then you can access:

# changes the authenticated user password using the authentication data
srp_auth.change_password(username, current_password, new_password, auth.token, auth.uuid)

# deletes the session on the server and resets the session locally

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for leap.auth, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size leap.auth-0.1.2.tar.gz (4.7 kB) File type Source Python version None Upload date Hashes View
Filename, size leap.auth-0.1.2-py2-none-any.whl (7.0 kB) File type Wheel Python version py2 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page