Skip to main content

Provides DRF auth classes that are ultimately backed by API Gateway

Project description

Installation

pip install djangorestframework-api-gateway-auth

Or with poetry

poetry add djangorestframework-api-gateway-auth

Usage

BasicApiGatewayApiKeyAuth

from djangorestframework_api_gateway_auth import BasicApiGatewayApiKeyAuth

@authentication_classes([BasicApiGatewayApiKeyAuth])
def endpoint(request: HttpRequest):
    # ...

This authenticator reads basic auth and ensures the username and password match an API Gateway key

curl -u username:password -v localhost:8000/api/your/endpoint

Where username is the name of your API key and password is the API key

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

Built Distribution

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