Sign inSign up

jrichardsz/oauth2-shield

By jrichardsz

•Updated almost 7 years ago

A minimal, fast and ready to use oauth2 implementation

Image
0

958

jrichardsz/oauth2-shield repository overview

⁠Oauth2 Shield

A minimal, fast and ready to use oauth2 implementation.

⁠Endpoints

⁠Oauth2 Flow

Check this guideline⁠

⁠Prerequisites

  • Linux
  • Nodejs >= 8
  • Mysql = 5.7.*
    • Another version, show errors and unexpected behaviors
    • Execute sql script : /ddl.sql

⁠Required variables

VariableDescription
token_secretalphanumeric string required to jwt token generation
token_lifestring representation of token expiration time. Example: 10s, 50m, 1h,etc
database_hostmysql database host. Ip or domain
database_useruser to login into mysql database host.
database_passwordpassword related to database_user.
database_portmysql port. Most of the time is 3306
database_namename of database.
database_connection_managementdatabase connection type: single or pool. Default: single
database_connection_pool_limitThe maximum number of database connections to create at once. Check this⁠
auth_realmalphanumeric string required to basic auth entropy.
auth_useruser to perform requests to /oauth2/credentials endpoint .
auth_passwordpassword related to auth_user
TZLinux timezone. IMPORTANT FOR DATES AND EXPIRATION TIME. Example: 'America/Lima'

More details about required variables here⁠

⁠Run for Developers

Just

npm install

Export required variables⁠, startup your mysql

And execute

npm run dev

⁠Run in Production environments

Just

npm install

Export required variables⁠, startup your mysql

And execute

npm run start

⁠Run with Docker

Check this guideline⁠

⁠Unit Testing

Check this guideline⁠

⁠Wiki

Check this⁠

⁠TO-DO

  • More unit tests
  • Add UI for management
  • Upload to public docker hub
  • Add docker-compose

⁠Contributors

Tag summary

Content type

Image

Digest

Size

30.9 MB

Last updated

almost 7 years ago

docker pull jrichardsz/oauth2-shield