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:
- Paste the displayed link in a web browser
- If requested, approve access via Gitlab.
- 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()
Metadata
Release files for auth-trial 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| auth_trial-0.1.4.tar.gz | 2.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| auth_trial-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.4 kB
Release files / auth_trial-0.1.4.tar.gz
| Download URL | auth_trial-0.1.4.tar.gz |
|---|---|
| Size | 2.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a18d7f74f78132dc78331835eaa7c0c01d4d8a6c1628eaca708c67248abfab1b
|
|
BLAKE2b-256 checksum How to use checksums |
d15f3c3a1255dff24317d37a2396f4060badeb8ab1f36aeabd7a5b9a21b3cda2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.0 CPython/3.10.7 Windows/10
|
Release files / auth_trial-0.1.4-py3-none-any.whl
| Download URL | auth_trial-0.1.4-py3-none-any.whl |
|---|---|
| Size | 3.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ed5a156929644e9e1556ba4f9bac04b208e084fd78c767bd090e9e6cf4349921
|
|
BLAKE2b-256 checksum How to use checksums |
642e3d4931ee179718e1e569761d19e2432797e61b2ac62e33935ce752090de6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.0 CPython/3.10.7 Windows/10
|