A REST API service to create football teams and will be able to sell or buy players with JWT authentication This is a project only provid APIs to customers.
-
signup: POST http://localhost:8080/api/signup , no need to use any authentication, anonymous users can use this. body : { "email": "[email protected]", "firstName": "tester1", "lastName": "Last" , "password": "root", "teamId": 0 } response: { "email": "[email protected]", "firstName": "tester1", "lastName": "Last", "teamName": "Team Name" }
-
User login : Get http://localhost:8080/api/login, should use your registered email and password(basic Auth) to anthenticate. response: { "token": "eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJGb290YmFsbCBUZWFtIiwic3ViIjoiSldUIFRva2VuIiwidXNlcm5hbWUiOiJuZXdMaW5hMTJAZ21haWwuY29tIiwiYXV0aG9yaXRpZXMiOiJST0xFX0FETUlOIiwiaWF0IjoxNjUzNjcxNzEzLCJleHAiOjE2NTM2NzQ3MTN9.QWC2_8KTcHop_Y_e0OzeneVIhZsHEyteEHrUcfF4Sps" }
-
Get your team and players info: Get http://localhost:8080/api/user_info, need use the token you got.
-
Get all free players in the market who are not belong to any team : Get http://localhost:8080/api/market_players JWT needed.
-
Buy Player in market: Put http://localhost:8080/api/market_players/102 JWT needed.
-
Change one of your own player info: Patch http://localhost:8080/api/players/102 JWT needed.