Class PasscodeEndpoint
java.lang.Object
com.broadleafcommerce.auth.user.web.endpoint.PasscodeEndpoint
@FrameworkRestController
@FrameworkMapping("/passcode")
public class PasscodeEndpoint
extends Object
- Author:
- Cade Rea (cade-rea)
-
Field Summary
-
Constructor Summary
ConstructorDescriptionPasscodeEndpoint
(PasscodeService<PasswordToken, User> passcodeService, UserService<User> userService) -
Method Summary
Modifier and TypeMethodDescriptioncom.broadleafcommerce.auth.user.web.endpoint.PasscodeEndpoint.PasscodeResponse
consume
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String clientId, String passcode, String purpose, String username) protected PasscodeService<PasswordToken,
User> protected User
protected UserService<User>
com.broadleafcommerce.auth.user.web.endpoint.PasscodeEndpoint.PasscodeStatusResponse
invalidate
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String passcodeId) protected void
com.broadleafcommerce.auth.user.web.endpoint.PasscodeEndpoint.PasscodeResponse
retrieve
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String clientId, String purpose, String username) com.broadleafcommerce.auth.user.web.endpoint.PasscodeEndpoint.PasscodeStatusResponse
status
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String passcodeId)
-
Field Details
-
BASE_URI
- See Also:
-
-
Constructor Details
-
PasscodeEndpoint
public PasscodeEndpoint(PasscodeService<PasswordToken, User> passcodeService, UserService<User> userService)
-
-
Method Details
-
retrieve
@Policy(permissionRoots="PASSCODE", operationTypes=CREATE) @FrameworkGetMapping("/retrieve") public com.broadleafcommerce.auth.user.web.endpoint.PasscodeEndpoint.PasscodeResponse retrieve(jakarta.servlet.http.HttpServletRequest request, jakarta.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(jakarta.servlet.http.HttpServletRequest request, jakarta.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(jakarta.servlet.http.HttpServletRequest request, jakarta.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(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, @RequestParam("passcode_id") String passcodeId) -
getUser
-
getPasscodeService
-
getUserService
-