Package com.se21.calbot.controllers
Class AuthenticationController
java.lang.Object
com.se21.calbot.controllers.AuthenticationController
This class serves as routing path controller. Any call to application/{route} will be handled here.
For this project we need to expose one endpoint for Google Oauth 2.0 to share auth code. So that is being handled by this class.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionTest endpoints, feel free to use them during developmentvoid
summary()
Test endpoints, feel free to use them during developmentThis function will be executed whenever a call is made to https://{application endpoint}/test It is responsible to extract auth token and user id from url parameters and save it in the db for future use.
-
Field Details
-
calendarFactory
-
-
Constructor Details
-
AuthenticationController
public AuthenticationController()
-
-
Method Details
-
token
@RequestMapping(value="/test", method=GET) public String token(@RequestParam String code, @RequestParam String state)This function will be executed whenever a call is made to https://{application endpoint}/test It is responsible to extract auth token and user id from url parameters and save it in the db for future use.- Parameters:
code
- auth codestate
- userId- Returns:
- Msg for user
-
authenticateTest
Test endpoints, feel free to use them during development- Throws:
Exception
-
summary
Test endpoints, feel free to use them during development- Throws:
Exception
-