Skip to content

User Controller

salma-s edited this page May 16, 2020 · 5 revisions

API/User/Google

Method Type: POST (no authentication required)

Description: Posts the onetime token given by Google to return the UserDto which includes the Jwt Token for subsequent requests.

Input

Input Parameter Type Description
oneTimeTokenDto OneTimeTokenDto The user's onetime token provided by Google Login

Response

Status Code Status Code Meaning Response
401 Unauthorized The request sent by the client could not be authenticated with Google Servers, the token provided was invalid or no longer authorized by Google -
200 OK The User was successfully authenticated/created on the database -

API/User/

Method Type: GET (authentication required)

Description: API endpoint supplies the UserDto of the user that made the request

Input

No input

Response

Status Code Status Code Meaning Response
401 Unauthorized The request sent by the client could not be authenticated -
404 Not Found No User with the presented Jwt Token could be found -
200 OK A UserDto was successfully returned to the client -

API/User/Stats

Method Type: GET (authentication required)

Description: Returns a set of statistics about the User's activities on Wedium.

Input

No input

Response

Status Code Status Code Meaning Response
401 Unauthorized The request sent by the client could not be authenticated -
200 OK A UserStatsDto was successfully returned to the client -

Clone this wiki locally