Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

OpenTreeHole/auth

Repository files navigation

Auth

Auth microservice integrated with kong for registration and issuing tokens.

Features

  • White-listed email registration
  • Anonymous: RSA encrypted personal information(email) and random identity
  • issue and revoke JWT tokens

Deploy

This project continuously integrates with docker. Go check it out if you don't have docker locally installed.

docker run -d -p 8000:8000 shi2002/auth

Configurations:

Key Example Value Description
SANIC_MODE dev 'production' in production mode, otherwise in dev mode
SANIC_DB_URL mysql://username:pwd@host:port/db required
SANIC_KONG_URL http://kong:8001 kong admin api, required
SANIC_KONG_TOKEN token set "Authorization" key auth in kong to secure admin api
SANIC_EMAIL_WHITELIST ["example.com", "example.org"] domains allowed to register, default to [], accepting all domains
SANIC_VERIFICATION_CODE_EXPIRES 10 verification code expires in minutes
SANIC_EMAIL_HOST smtpdm.aliyun.com smtp email service
SANIC_EMAIL_PORT 465
SANIC_EMAIL_USER [email protected]
SANIC_EMAIL_PASSWORD password

Usage

API Docs are available at /docs

Badge

build dev build

stars issues pull requests

standard-readme compliant

Powered by

Python

Contributing

Feel free to dive in! Open an issue or submit PRs.

Contributors

This project exists thanks to all the people who contribute.

Licence

license © OpenTreeHole