Skip to content

Latest commit

 

History

History
56 lines (33 loc) · 1.18 KB

README.md

File metadata and controls

56 lines (33 loc) · 1.18 KB

Authenticator (Beta)

This can be used to Licenseware authentification. Note that you must have already an account on licenseware.io.

Quickstart

Install this package using the following pip command:

pip3 install git+https://git@github.com/licenseware/lware-components-authenticator.git

You can add the link in a requirements.txt file. You can use git+ssh if you have ssh keys configured.

Set login values in environment variables:

  • LWARE_IDENTITY_USER (the email)
  • LWARE_IDENTITY_PASSWORD (the password)
  • AUTH_SERVICE_URL (the url for login)

Otherwise you can pass them directly into Authenticator (not recommended).

  • email
  • password
  • auth_url

If you are using environment variables you can login like this:

from authenticator import Authenticator

response = Authenticator.connect()
# check response

Or like this if you are not using environment variables:

from authenticator import Authenticator

response = Authenticator(
    email="email@company.com", 
    password="not recommended", 
    auth_url="https://licenseware.io/auth"
).connect()

# check response

The response will be json, status_code tuple.