Git Product home page Git Product logo

jwt-service's Introduction

JWT service

This is a simple microservice that can create users, issue jwt tokens and validate them

Getting started in docker

Environment variables

  • CONNECTION_STRING some postgres connection string. Format: postgres://user:password@host:port/database_name
  • SECRET the hmac sh256 signing secret
  • ISSUER the issuer name on the tokens
  • AUDIENCE optional: the audience on the tokens
  • EXPIRY_TIME optional: the time after which a JWT expires. This is parsed with Zeit/ms.
  • PORT optional: in docker this is set to 80 by default
  • ADMIN_USER optional: set this to set the user id for the admin user. Default: admin
  • ADMIN_PASS: optional: set this to set the password for the admin user. If you don't set this then no admin user is created.

Setting ADMIN_PASS essentially only needs to happen once on first run, since the admin user doesn't need to be recreated every time. It is safe to keep it set though. If a user with ADMIN_USER as username already exists, it won't be modified and admin user creation will be skipped.

jwt-service's People

Contributors

dependabot[bot] avatar mees- avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

djun

jwt-service's Issues

Add extra user data

When creating a user, allow for custom extra json data to be attached to the user. Also send the data along with the token when it is issued.

this also needs a new api method to update the userdata.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.