Skip to content

Latest commit

 

History

History
34 lines (20 loc) · 1.54 KB

README.md

File metadata and controls

34 lines (20 loc) · 1.54 KB

LIQUIDO Mobile REST API

Groovy backend for LIQUIDO mobile App (pwa) implemented with Micronaut

Implemented in Groovy with Micronaut and GORM

... WORK IN PROGRESS ...

Security - Login with Json Web Token (JWT)

Inital "registration"

  • => POST /createTeam or POST /joinTeam with valid inviteCode
  • The custom LIQUIDO JWT is created in TeamController.groovy
  • <= HttpResponse.body then contains the JWT that must be sent in every future request

How micronaute validates JWTs

  1. TokenAuthenticationFetcher implements AuthenticationFetcher Attempts to retrieve a token form the HttpRequest
  2. DefaultTokenResolver implements TokenResolver returns the first token found by the supplied token readers.
  3. BearerTokenReader extends HttpHeaderTokenReader implements TokenReader Reads JWT token from "Authorization: Bearer a3425c34e5..." header.
  4. JwtTokenValidator implements TokenValidator validates the token

For each of these you can provide custom implementations.

mongodb://localhost:27017/test2?readPreference=primary&appname=Liquido&ssl=false&uuidRepresentation=standard

Resources & Links