All Projects → labd → Django Cognito Jwt

labd / Django Cognito Jwt

Licence: mit
An Authentication backend for Django Rest Framework for AWS Cognito JWT tokens

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Django Cognito Jwt

Retail Demo Store
AWS Retail Demo Store is a sample retail web application and workshop platform demonstrating how AWS infrastructure and services can be used to build compelling customer experiences for eCommerce, retail, and digital marketing use-cases
Stars: ✭ 238 (+87.4%)
Mutual labels:  aws, cognito
Aws Cognito Angular Quickstart
An Angular(v5)-based QuickStart single-page app utilizing Amazon Cognito, S3, and DynamoDB (Serverless architecture)
Stars: ✭ 685 (+439.37%)
Mutual labels:  aws, cognito
Terraform Aws Cognito Auth
Serverless Authentication as a Service (AaaS) provider built on top of AWS Cognito
Stars: ✭ 248 (+95.28%)
Mutual labels:  aws, cognito
Cognito Backup Restore
AIO Tool for backing up and restoring AWS Cognito User Pools
Stars: ✭ 142 (+11.81%)
Mutual labels:  aws, cognito
Amplify Js
A declarative JavaScript library for application development using cloud services.
Stars: ✭ 8,539 (+6623.62%)
Mutual labels:  aws, cognito
Aws Mobile React Native Starter
AWS Mobile React Native Starter App https://aws.amazon.com/mobile
Stars: ✭ 2,247 (+1669.29%)
Mutual labels:  aws, cognito
Aws Mobile React Sample
A React Starter App that displays how web developers can integrate their front end with AWS on the backend. The App interacts with AWS Cognito, API Gateway, Lambda and DynamoDB on the backend.
Stars: ✭ 650 (+411.81%)
Mutual labels:  aws, cognito
Cognito Express
Authenticates API requests on a Node application by verifying the JWT signature of AccessToken or IDToken generated by Amazon Cognito.
Stars: ✭ 165 (+29.92%)
Mutual labels:  aws, cognito
Workshop Donkeytracker
Workshop to build a serverless tracking application for your mobile device with an AWS backend
Stars: ✭ 27 (-78.74%)
Mutual labels:  aws, cognito
Cfn Generic Custom Resource
CloudFormation generic custom resource provider
Stars: ✭ 26 (-79.53%)
Mutual labels:  aws, cognito
Aws Amplify Vue
A Vue.js starter app integrated with AWS Amplify
Stars: ✭ 359 (+182.68%)
Mutual labels:  aws, cognito
Cognitocurl
🦉🤖Easily sign curl calls to API Gateway with Cognito authorization token.
Stars: ✭ 76 (-40.16%)
Mutual labels:  aws, cognito
Aws Serverless Auth Reference App
Serverless reference app and backend API, showcasing authentication and authorization patterns using Amazon Cognito, Amazon API Gateway, AWS Lambda, and AWS IAM.
Stars: ✭ 724 (+470.08%)
Mutual labels:  aws, cognito
Ixortalk.aws.cognito.jwt.security.filter
Spring Boot security filter for decoding Cognito JWT IdTokens
Stars: ✭ 75 (-40.94%)
Mutual labels:  aws, cognito
Aws Cli Cheatsheet
☁️ AWS CLI + JQ = Make life easier
Stars: ✭ 94 (-25.98%)
Mutual labels:  aws, cognito
Aws Serverless Event Fork Pipelines
AWS Event Fork Pipelines helps you build event-driven serverless applications by providing pipelines for common event-handling requirements, such as event backup, analytics, and replay. The pipelines are based on AWS SAM, and can be deployed directly from AWS SAR into your AWS account.
Stars: ✭ 126 (-0.79%)
Mutual labels:  aws
Serverless Prisma
AWS Serverless Prisma Boilerplate
Stars: ✭ 126 (-0.79%)
Mutual labels:  aws
Flywheel
Object mapper for Amazon's DynamoDB
Stars: ✭ 124 (-2.36%)
Mutual labels:  aws
Architect
The simplest, most powerful way to build serverless applications
Stars: ✭ 1,925 (+1415.75%)
Mutual labels:  aws
Hybrid multicloud overlay
MutiCloud_Overlay demonstrates a use case of overlay over one or more clouds such as AWS, Azure, GCP, OCI, Alibaba and a vSphere private infrastructure in Hub and spoke topology, point to point topology and in a Single cloud. Overlay protocols IPv6 and IPv4 are independent of underlying infrastructure. This solution can be integrated with encryption and additional security features.
Stars: ✭ 127 (+0%)
Mutual labels:  aws

.. start-no-pypi .. image:: https://github.com/labd/django-cognito-jwt/workflows/Python%20Tests/badge.svg :target: https://github.com/labd/django-cognito-jwt/workflows/Python%20Tests/

.. image:: http://codecov.io/github/LabD/django-cognito-jwt/coverage.svg?branch=master :target: http://codecov.io/github/LabD/django-cognito-jwt?branch=master

.. image:: https://img.shields.io/pypi/v/django-cognito-jwt.svg :target: https://pypi.python.org/pypi/django-cognito-jwt/

.. image:: https://readthedocs.org/projects/django-cognito-jwt/badge/?version=latest :target: https://django-cognito-jwt.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status .. end-no-pypi

Django Cognito JWT

An Authentication backend for Django Rest Framework for AWS Cognito JWT tokens

Installation

.. code-block:: shell

pip install django-cognito-jwt

Usage

Add the following lines to your Django settings.py file:

.. code-block:: python

COGNITO_AWS_REGION = '<aws region>' # 'eu-central-1'
COGNITO_USER_POOL = '<user pool>'   # 'eu-central-1_xYzaq'
COGNITO_AUDIENCE = '<client id>'

(Optional) If you want to cache the Cognito public keys between requests you can enable the COGNITO_PUBLIC_KEYS_CACHING_ENABLED setting (it only works if you have the Django CACHES setup to anything other than the dummy backend).

.. code-block:: python

COGNITO_PUBLIC_KEYS_CACHING_ENABLED = True
COGNITO_PUBLIC_KEYS_CACHING_TIMEOUT = 60*60*24  # 24h caching, default is 300s

Also update the rest framework settings to use the correct authentication backend:

.. code-block:: python

REST_FRAMEWORK = {
    'DEFAULT_AUTHENTICATION_CLASSES': [
        ...
        'django_cognito_jwt.JSONWebTokenAuthentication',
        ...
    ],
    ...
 }

Be sure you are passing the ID Token JWT from Cognito as the authentication header. Using the Access Token will work for authentication only but we're unable to use the get_or_create_for_cognito method with the Access Token.

(Optional) If you want to use a different user model then the default DJANGO_USER_MODEL you can use the COGNITO_USER_MODEL setting.

.. code-block:: python

COGNITO_USER_MODEL = "myproject.AppUser"
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].