Class PasscodeEndpoint


  • @FrameworkRestController
    @FrameworkMapping("/passcode")
    public class PasscodeEndpoint
    extends Object
    Author:
    Cade Rea (cade-rea)
    • Method Detail

      • retrieve

        @Policy(permissionRoots="PASSCODE",
                operationTypes=CREATE)
        @FrameworkGetMapping("/retrieve")
        public com.broadleafcommerce.auth.user.web.endpoint.PasscodeEndpoint.PasscodeResponse retrieve​(javax.servlet.http.HttpServletRequest request,
                                                                                                       javax.servlet.http.HttpServletResponse response,
                                                                                                       @RequestParam("client_id")
                                                                                                       String clientId,
                                                                                                       @RequestParam("purpose")
                                                                                                       String purpose,
                                                                                                       @RequestParam("username")
                                                                                                       String username)
      • consume

        @Policy(permissionRoots="PASSCODE",
                operationTypes=UPDATE)
        @FrameworkPostMapping(path="/consume",
                              consumes="application/x-www-form-urlencoded")
        public com.broadleafcommerce.auth.user.web.endpoint.PasscodeEndpoint.PasscodeResponse consume​(javax.servlet.http.HttpServletRequest request,
                                                                                                      javax.servlet.http.HttpServletResponse response,
                                                                                                      @RequestParam("client_id")
                                                                                                      String clientId,
                                                                                                      @RequestParam("passcode")
                                                                                                      String passcode,
                                                                                                      @RequestParam("purpose")
                                                                                                      String purpose,
                                                                                                      @RequestParam("username")
                                                                                                      String username)
                                                                                               throws PasscodeNotConsumedException
        Throws:
        PasscodeNotConsumedException
      • passcodeConsumptionErrorHandler

        @ResponseStatus(code=BAD_REQUEST,
                        reason="Passcode not consumed.")
        @ExceptionHandler(PasscodeNotConsumedException.class)
        protected void passcodeConsumptionErrorHandler()
      • status

        @Policy(permissionRoots="PASSCODE",
                operationTypes=READ)
        @FrameworkGetMapping("/status")
        public com.broadleafcommerce.auth.user.web.endpoint.PasscodeEndpoint.PasscodeStatusResponse status​(javax.servlet.http.HttpServletRequest request,
                                                                                                           javax.servlet.http.HttpServletResponse response,
                                                                                                           @RequestParam("passcode_id")
                                                                                                           String passcodeId)
      • invalidate

        @Policy(permissionRoots="PASSCODE",
                operationTypes=DELETE)
        @FrameworkPostMapping(path="/invalidate",
                              consumes="application/x-www-form-urlencoded")
        public com.broadleafcommerce.auth.user.web.endpoint.PasscodeEndpoint.PasscodeStatusResponse invalidate​(javax.servlet.http.HttpServletRequest request,
                                                                                                               javax.servlet.http.HttpServletResponse response,
                                                                                                               @RequestParam("passcode_id")
                                                                                                               String passcodeId)
      • getUser

        protected User getUser​(@RequestParam("client_id")
                               String clientId,
                               @RequestParam("username")
                               String username)