removed the following environment variables as they are no longer needed.
JWT_SECRET // We use the new OAUTH2_PUBLIC_KEY variable to sign / verify tokens.
Server start up
refactored migrateDbAndStartServer.sh shell script to accomodate different production / development startups. dev environment can be used by using dev as the first argument on startup. dev environment uses nodemon to start the server and hot reload on changes.
add setup-keycloak helper to run a keycloak migration on server start up.
server
add /help route with helpful descriptions on how to get an access_token from the OAuth2 endpoint using password grant
add /getRolesForOAuth2Token route that returns the roles from a token. A helper function getRoles defines on how to access the user roles from the token. getRoles can be edited by a user if a different implementation of getting roles out of the token is necessary.
remove /login route
User / Role models
all static user / role / role_to_user files have been removed.
Summary
This PR implements user management via a third-party OAuth2 server.
Changes
Environment
Added the following environment variables to configure the OAuth2 endpoint.
removed the following environment variables as they are no longer needed.
Server start up
migrateDbAndStartServer.sh
shell script to accomodate different production / development startups.dev
environment can be used by usingdev
as the first argument on startup.dev
environment usesnodemon
to start the server and hot reload on changes.setup-keycloak
helper to run a keycloak migration on server start up.server
/help
route with helpful descriptions on how to get an access_token from the OAuth2 endpoint using password grant/getRolesForOAuth2Token
route that returns the roles from a token. A helper functiongetRoles
defines on how to access the user roles from the token.getRoles
can be edited by a user if a different implementation of getting roles out of the token is necessary./login
routeUser / Role models
Related PRs