Commit 710de1f8 authored by Martin Bebjak's avatar Martin Bebjak
Browse files

Update README.md

parent 9ad839a5
Pipeline #142211 passed with stage
in 1 minute and 42 seconds
......@@ -3,7 +3,7 @@
*PA165 course at MUNI, Spring 2022*
##How to start
## How to start
To start run the application you need only docker. \
If you are using linux, use command:
```
......@@ -12,7 +12,28 @@ docker-compose -f docker-compose-linux.yml up
It is currently impossible to run the application on Windows because of limitations of docker networking on Windows
After every container initializes, you should be able to use the application on address localhost:3000/pa165 \
Login data is operator/operator
Login data is
_username_: operator
_password_: operator
## Test Rest Api
For rest api we have [swagger](http://localhost:6969/pa165/rest/swagger-ui/index.html#/).
To get authorization token needed for testing send post request to keycloak. You can use postman or Curl.
#### Postman
Fill the postman post request according to following screenshots to url ```http://127.0.0.1:8080/realms/pa165-secret-service-archive/protocol/openid-connect/token```.
**Body**
![Postman Body](docs/img/postman1.png)
**Header**
![Postman Header](docs/img/postman2.png)
and copy the acces_token from response to swagger.
#### Curl
Run this Curl command to get acces_token for swagger authorization.
```
curl -X POST -H "Content-Type: application/x-www-form-urlencoded" \
-d 'client_id=archive-login&username=operator&password=operator&grant_type=password&client_secret=mrmAhajtblAVVAQ8whrylOYQrN1W0axk' \
http://127.0.0.1:8080/realms/pa165-secret-service-archive/protocol/openid-connect/token
```
## About Project
......@@ -61,4 +82,4 @@ System has two authorization roles - **Agent** and **Secret Service Operator**
![Screenshot](docs/img/SecretServiceClassDiagram.png)
### Database Model
![Screenshot](docs/img/SecretServiceDatabaseDiagram.png)
\ No newline at end of file
![Screenshot](docs/img/SecretServiceDatabaseDiagram.png)
Supports Markdown
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