Skip to content

About

Refresh tokens on Redis

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

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

About

Refresh tokens on Redis

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages