Coding challenge (authorization is working, rates are calculated and displayed, login and registration works, but no tests and no UI was provided)
- Currently, authentication/authorization is done with Basic auth, it can be replaced with JWT solution.
- CSRF can be enabled with Cookie-based CSRF for Angular apps.
- go to root folder of the project
- run ./gradlew composeUp
- go to root folder of the project
- run ./gradlew composeDown
- go to root folder of the project
- specify your OpenExchange app id as environment variable OPEN_EXCHANGE_RATES_APP_ID (either in the terminal session or globally in .bash_profile)
- run ./gradlew bootRun -Dspring.profiles.active=local
- work with the app in your REST Client by following the sample CurrencyRatesViewerApplication.http (password should be
BCrypt-hashed and supplied in
hash
field)
- visit localhost:8080/actuator/health
- you should see {"status":"UP"}
- run docker-compose down --volumes
- run the application
- visit POST /register in Postman and provide user details in request body (e.g. {"email":"[email protected]", "hash":"hash"})
- visit POST /login in Postman and provide valid user details in request body (e.g. {"email":"[email protected]", "hash":"hash"})
- visit GET /rates/{currency}, where currency is one of "EUR", "USD", "GBP", "NZD", "AUD", "JPY"