RentACar

How it works?


Firstly, you should add new account. You can use IndividualCustomer add or CorporateCustomer add methods.

image

After that, go to Postman and send the Post request for login the application.

image

You can see access_token and refresh_token. Copy the access_token. For developers and for test you can use this token:
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJoZXJva3VAZGVuZW1lLmNvbSIsInJvbGVzIjpbXSwiaXNzIjoiL2FwaS9sb2dpbiIsImV4cCI6OTk5OTk5OTk5OX0._ZLavBl5bO9ccc8apM2kqgOfzHxEIFHnUo6dylXyOB0

This token intentionally embedded in the code.

Then, click Authorize button in Swagger UI.

image

Paste access_token to Swagger Authorize popup. After that click Authorize!

image

Here you go! You can send any requests. Don't forget, if it is 403 Forbidden (such as updateRentalCars method. It is not allowed for every user, you should have "ROLE_ADMIN" role to access it) add roles to user.