Package com.example.demo.registration
Class RegistrationController
java.lang.Object
com.example.demo.registration.RegistrationController
@RestController
@RequestMapping(path="api/v1/registration")
public class RegistrationController
extends Object
REST controller that exposes endpoints for user registration and email confirmation.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
RegistrationController
public RegistrationController()
-
-
Method Details
-
register
Handles new user registration requests.This endpoint accepts a JSON payload containing user details and delegates the registration logic (including password encoding and token creation) to the service.
- Parameters:
request- The RegistrationRequest body containing user details (name, email, password).- Returns:
- A string representing the result of the registration process, typically the confirmation token.
-
confirm
Confirms a user's account using a unique confirmation token. using a link sent to the users email- Parameters:
token- The confirmation token passed as a request parameter.- Returns:
- A string indicating the result of the confirmation (success message).
-