
Security News
Django Joins curl in Pushing Back on AI Slop Security Reports
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
With this SDK, Python developers can easily interact with the Auth API, enabling hassle-free implementation of user registration, login, and client credential management features within their applications.
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/
Python 3.7+
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
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
Execute pytest
to run the tests.
Please follow the installation procedure and then run the following:
import authservice
from authservice.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://auth-service-latest.onrender.com/auth
# See configuration.py for a list of all supported configuration parameters.
configuration = authservice.Configuration(
host = "https://auth-service-latest.onrender.com/auth"
)
# Enter a context with an instance of the API client
with authservice.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = authservice.DefaultApi(api_client)
username = 'johndoe' # str | User's username
password = 'password123' # str | User's password
try:
# Get client ID and secret
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)
All URIs are relative to https://auth-service-latest.onrender.com/auth
Class | Method | HTTP request | Description |
---|---|---|---|
DefaultApi | client_get | GET /client | Get client ID and secret |
DefaultApi | login_client_post | POST /login/client | Logs in a user using client ID and secret |
DefaultApi | regenerate_client_credentials_post | POST /regenerate-client-credentials | Regenerate client credentials |
DefaultApi | register_post | POST /register | Registers a new user |
Endpoints do not require authorization.
FAQs
With this SDK, Python developers can easily interact with the Auth API, enabling hassle-free implementation of user registration, login, and client credential management features within their applications.
We found that authservice demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.