Skip to content

Spring Todo backend application secured using JWT for user authentication

Notifications You must be signed in to change notification settings

KevFan/spring-todo

Repository files navigation

Spring Todo

This is a spring app that provides basic CRUD APIs for Todos with user creation and authentication APIs. Routes for the todo APIs are secured via JWT and must be supplied in the Authentication request header.

Features

  • User
    • Create API - unsecured
    • Authentication API - unsecured
  • Todo CRUD Secured API for current logged in user
  • Secured APIs routes via JWT
  • H2 Database persistent to file

How to run application

# Ensure docker has been installed
docker run -p 8080:8080 --name spring-todo-docker -t kevfan11/spring-todo-docker 

or

git clone {repo}
cd spring-todo
./gradlew bootRun

Application would be then served on http://localhost:8080

How to run tests

 ./gradlew test jacocoTestReport

This would run the tests and generate a test code coverage report to build/reports/jacoco/test/html/index.html

How to build docker image

 ./gradlew build docker

This would build a local docker image with the repository name kevfan11/spring-todo-docker

API

API.md for available APIs.

Improvements

  • Should use external database such MySql instead of H2 file
  • Todo APIs can be expanded for showing history of Todo
  • Allow sharing of Todo between users

Reference Documentation

Authors:

Kevin Fan (KevFan)

Version/Date:

16th June 2019

About

Spring Todo backend application secured using JWT for user authentication

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published