-
Notifications
You must be signed in to change notification settings - Fork 1
TmcClient class
TmcClient is the main class through which to communicate with the TMC server.
For now it makes the authentication request to the server to obtain the access token for further communication, and can get the authenticated user's info.
The plan is to use this class for all communication with TMC server, such as getting the new exercises and sending things to the server.
The way the Oauth2 authentication works in this case, is that we make a POST request to the server with client_id, client_secert (which are static for the application), username/password and grant_type (to indicate we are authenticating with a password). If the login information is correct, the server responds with a JSON that has our access token, which is then used in further communication with the server.
- We might want to implement functionality to get the client_id and client_secret from the server, instead of having them hard coded.
- Saving the user's login details for further sessions.