Commit 6304b57f authored by Jyrgen Hannus's avatar Jyrgen Hannus
Browse files

Updated office api gateway documentation

parent 7174e37d
# Office API Gateway
# Office API gateway
Office API Gateway provides REST API services for TI officials functionality.
\ No newline at end of file
Office API Gateway application provides public REST interface for TeIS official user methods.
## Features
The project contains 2 modules:
1. **api-gateway** - is a Spring Boot application providing the following functionality:
* API methods consumed by official user front-end application.
* checks the validity of client JWT access token issued by SSO (Keycloak).
* sends requests to microservices via Rabbit Exchange (gw_exchange) queues.
* generates unique request IDs forwarded to microservices along with the request data.
2. **api-gateway-lib** - Java library containing common Data Transfer Objects (DTO) exchanged in the
communication between gateway and microservices. All microservices consuming official user gateway messages depend on
Office API Gateway library.
## Requirements
* [OpenJDK 11](https://openjdk.java.net/projects/jdk/11/)
* [Rabbit MQ](https://www.rabbitmq.com/)
* [PostgreSQL](https://www.postgresql.org/)
Office API Gateway depends on other TeIS libraries:
* [TeIS Gradle plugin](../teis-gradle-plugin)
* [TeIS public commons libraries](../commons-public)
* [TeIS commons libraries](../commons)
* [TeIS common API gateway libraries](../common-api-gateway)
See [how to run required dependencies](../docs/run-requirements.md).
## Run application
Spring Boot project can be run directly from [OfficeApiGateway.main()](api-gateway/src/main/java/ee/sm/ti/teis/OfficeApiGateway.java)
method or via executable jar file. More info on running Spring applications:
[running your application.](https://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-running-your-application.html)
Visit [how to run application](../docs/run-application.md).
## Build and configure
Visit [how to build](../docs/build-configure.md) for more info.
## Default profiles
Visit [environment profiles](../docs/default-profiles.md) for more info.
## Additional profiles
### mockauth
Application allows authenticating users with mocked authentication method.
### no_keycloak
Application will not use Keycloak authentication mechanism.
## Tests
Run [integration](api-gateway/src/integTest) and [unit tests](api-gateway/src/test) via IDE or with Gradle in command line:
```jshelllanguage
./gradlew test
```
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment