@ POST @ Path ( "{id}/account/confirm" ) @ PermitAll public Response confirmAccount ( @ PathParam ( "id" ) Long userId , AccountRequest request ) { checkNotNull ( userId ) ; checkNotNull ( request . getToken ( ) ) ; boolean isSuccess = userService . confirmAccountUsingToken ( userId , request . getToken ( ) ) ; return isSuccess ? Response . noContent ( ) . build ( ) : Response . status ( Response . Status . BAD_REQUEST ) . build ( ) ; }
Confirm a newly create account using a temporary token .