Skip to main content

Auth Microservice (DTaaS) Package

Project description

Auth Microservice

Install the microservice:

pip install auth-trial==0.1.4

Python CLI usage

Setup

On your terminal, switch to Python CLI

python

Then, import the auth package:

from auth_trial import auth

You can now use functions of the Auth microservice.

Register/Authorize new session

auth.authorization()

Follow the guide:

  1. Paste the displayed link in a web browser
  2. If requested, approve access via Gitlab.
  3. Paste the link you are redirected to, into the terminal.

The state and access_token for this session will be displayed.

Copy/Save these for later use.

Validating existing session

auth.validation(state, access_token)

Provide the state and access_token of the session requesting validation, as parameters.

In case of successful validation, your account information will be displayed. Confirm that this is the correct account before proceeding.

Response codes will be returned by this function:

  • 200 : OK, User Validated
  • 403 : User validation has expired, Requires re-authorization
  • 404 : New user/ User is not validation

Exit

To exit the Python CLI:

exit()

Project details


Download files

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

Source Distribution

auth_trial-0.1.4.tar.gz (2.5 kB view hashes)

Uploaded Source

Built Distribution

auth_trial-0.1.4-py3-none-any.whl (3.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page