Class AuthServiceController


  • @Controller
    @RequestMapping("//auth")
    public class AuthServiceController
    extends AbstractController
    • Constructor Detail

      • AuthServiceController

        public AuthServiceController()
    • Method Detail

      • login

        @RequestMapping(value="/login",
                        method=POST,
                        produces="application/json")
        @ResponseBody
        public AbstractResponseObject login​(javax.servlet.http.HttpServletRequest request,
                                            @RequestBody
                                            JsonRequest<User> user,
                                            javax.servlet.http.HttpServletResponse response)
        Parameters:
        request - HttpServletRequest
        user - User's request to login on the Platform
        response - HttpServletResponse
        Returns:
        Returns JWT if User is Authenticated else resturns Failure with status code and error message
      • logout

        @RequestMapping(value="/logout",
                        method=POST,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<Object> logout​(javax.servlet.http.HttpServletRequest request,
                                           @RequestBody
                                           JsonRequest<User> user,
                                           javax.servlet.http.HttpServletResponse response)
        Parameters:
        request - HttpServletRequest
        user - User who is logging out
        response - HttpServletResponse
        Returns:
        Returns Status Code and Message serialized as JSON
      • jwtLogin

        @RequestMapping(value="/jwtToken",
                        method=POST,
                        produces="application/json")
        @ResponseBody
        public AbstractResponseObject jwtLogin​(javax.servlet.http.HttpServletRequest request,
                                               @RequestBody
                                               JsonRequest<User> user,
                                               javax.servlet.http.HttpServletResponse response,
                                               @RequestHeader(value="provider",required=false)
                                               String provider)
      • validateToken

        @RequestMapping(value="/validateToken",
                        method=POST,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<Object> validateToken​(javax.servlet.http.HttpServletRequest request,
                                                  javax.servlet.http.HttpServletResponse response,
                                                  @RequestBody
                                                  JsonRequest<User> userObj,
                                                  @RequestHeader(value="provider",required=false)
                                                  String provider)
                                           throws MalformedException
        Throws:
        MalformedException
      • validateApiToken

        @RequestMapping(value="/validateApiToken",
                        method=POST,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<Object> validateApiToken​(javax.servlet.http.HttpServletRequest request,
                                                     javax.servlet.http.HttpServletResponse response,
                                                     @RequestBody
                                                     JsonRequest<User> userObj,
                                                     @RequestHeader(value="provider",required=false)
                                                     String provider)
                                              throws MalformedException
        Throws:
        MalformedException
      • validateCookieApiToken

        @RequestMapping(value="/validateCookieToken",
                        method=POST,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<Object> validateCookieApiToken​(javax.servlet.http.HttpServletRequest request,
                                                           javax.servlet.http.HttpServletResponse response,
                                                           @RequestBody
                                                           JsonRequest<String> cookieStr)
                                                    throws MalformedException
        Throws:
        MalformedException
      • validationStatus

        @RequestMapping(value="/validationStatus",
                        method=POST,
                        produces="application/json")
        @ResponseBody
        public String validationStatus()