Skip to content

JoyceBautista/eatsave-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring API + JWT Auth Template

Starter REST API with JWT Security

Dependencies

  • Java OpenJDK 17
  • Postgres 12.9+

This API uses environment variables for local development, same for staging and deployment phase

This must be configured before running the app

Name Description
SPRING_ENV This sets the current environment dev, prod
DATABASE_URL Database URL for connection
DATABASE_USERNAME Database user eg. postgres
DATABASE_PASSWORD Secret for database access
JWT_SECRET Secret for jwt encoding

For a secret generation run

openssl rand -hex 32

Usage

Make a POST request to /login with this JSON format

{
 "username": "username",
 "password:": "password"
}

You will receive a JWT Acess Token

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published