Skip to content

A REST API that will support basic needs for a renovation contractor agency. Some of its functionality include: the employees - managers of its platform to have access to information concerning customers and repairs, ability for customers to oversee the progress of repair/renovation work on their property.

Notifications You must be signed in to change notification settings

ittrad-mobile-lab/JWT-EXAMPLE

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 

Repository files navigation

Team1

Members

Alexandros Atsalakis, Stavroula Kampylh, Evangelos Poulios

About

A REST API that will support basic needs for a renovation contractor agency. Some of its needs include:

  • the employees - managers of its platform to have access to information concerning customers and repairs
  • ability for customers to oversee the progress of repair/renovation work on their property.

How to use it

A. Select one of the following options:

  1. Clone it
  2. Download it as ZIP file

B. Manually create a database with name "Team1Technico"

C. Run the application from your preferable IDE

D. Use the application and interact with the REST API either by:

  1. importing to the Postman the collection of the requests
  2. using the Swagger interface provided in the "http://localhost:8080/swagger-ui/index.html"

E. In each case you have firstly to log in with valid credentials. On application start up 2 instances of users are being created: user1(username: john, password: 1234, role: ROLE_ADMIN), user2(username: jake, password:1234, role: ROLE_MODERATOR)

Postman

  • The first time when you have to log in, with postman you need to request: localhost:8080/api/login, by providing query params: username: usernameValueOfYourUser, password: passwordValueOfYourUser
  • Then, you should include in each request a header with (key,value) : ("Authorization", "Bearer " + the accessToken that you got from the client)

Swagger UI

  • The first time when you have to log in, with Swagger UI you have to send the request (http://localhost:8080/api/login?username=usernameValueOfYourUser&password=passwordValueOfYourUser) through browser
  • Afterwards, you have to install a browser extension like ModHeader for Chrome. The extension enables the option for custom request and response http headers. And you follow the same procedure (like Postman) where, you should include in each request header a header with (key,value) : ("Authorization", "Bearer " + the accessToken that you got from the client)

Watch a quick demo video

(back to top)

Technologies

  • Java 17
  • Spring Framework
  • MS SQL Server
  • JSON Web Token
  • Swagger

(back to top)

Contributing

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

About

A REST API that will support basic needs for a renovation contractor agency. Some of its functionality include: the employees - managers of its platform to have access to information concerning customers and repairs, ability for customers to oversee the progress of repair/renovation work on their property.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%