Skip to content

iivek/redis-token-rotation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TokenCycle

Custom token lifecyle and rotation in Redis

License Version

PRs Welcome

About

Made for authorization flows that use internal refresh tokens. Implements token generation, validation, rotation and token reuse detection, using an async Redis client.

Installation

Clone the repository and install the package:

$ git clone https://github.com/iivek/redis-token-rotation.git
$ pip install -e ./

Usage

First, let's provision a local redis instance, using terraform. From project root:

$ export PROJECT_ROOT=$(pwd)
$ cd $PROJECT_ROOT/examples/terraform && \
  terraform init && \
  terraform plan && \
  terraform apply -auto-approve              # provision a local redis instance

Next, we can run the example python script:

$ cd $PROJECT_ROOT/examples && \
  PYTHONPATH=$PROJECT_ROOT python main.py    # run the example

Releases

No releases published

Packages

No packages published

Languages