authservice
This API provides token-based authentication for user registration, login, and client credential management. It ensures secure communication by utilizing tokens for authentication. Users can register with unique usernames and passwords, authenticate using client credentials, retrieve client IDs and secrets, and regenerate client credentials as needed. The API supports various user roles, including 'user', 'admin', 'moderator', 'guest', and 'superadmin'.
This package is published in PyPI:
https://pypi.org/project/authservice/
Requirements.
Python 3.7+
Installation & Usage
pip install
If your package is hosted in PyPI:
pip install authservice
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/CodeCrew24/authservice_python
(you may need to run pip
with root permission: sudo pip install git+https://github.com/CodeCrew24/authservice_python
)
Then import the package:
import authservice
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Then import the package:
import authservice
Tests
Execute pytest
to run the tests.
Getting Started
Please follow the installation procedure and then run the following:
import authservice
from authservice.rest import ApiException
from pprint import pprint
configuration = authservice.Configuration(
host = "https://auth-service-latest.onrender.com/auth"
)
with authservice.ApiClient(configuration) as api_client:
api_instance = authservice.DefaultApi(api_client)
username = 'johndoe'
password = 'password123'
try:
api_response = api_instance.client_get(username, password)
print("The response of DefaultApi->client_get:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->client_get: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to https://auth-service-latest.onrender.com/auth
Documentation For Models
Documentation For Authorization
Endpoints do not require authorization.
Author