Class RegistrationFormController


  • @FrameworkController
    @FrameworkMapping("/register")
    public class RegistrationFormController
    extends Object
    Controller for supporting form-based registration for Universal Login.
    Author:
    Cade Rea (cade-rea)
    See Also:
    for handling embedded login.
    • Method Detail

      • showRegisterForm

        @FrameworkGetMapping
        public String showRegisterForm​(javax.servlet.http.HttpServletRequest request,
                                       javax.servlet.http.HttpServletResponse response,
                                       org.springframework.ui.Model model,
                                       @RequestParam("client_id")
                                       String clientId,
                                       @RequestParam(value="returnTo",required=false)
                                       String redirectUrl,
                                       @ModelAttribute
                                       UserRegistration userRegistration,
                                       org.springframework.validation.BindingResult bindingResult,
                                       @RequestParam
                                       org.springframework.util.MultiValueMap<String,​String> attributes)
      • addAttributesToForm

        protected void addAttributesToForm​(org.springframework.util.MultiValueMap<String,​String> attributes,
                                           UserRegistration userRegistration)
        Adds attributes from the request parameter MultiValueMap to the user registration form. The client_id parameter will be ignored and not added to the attributes map. If the List from MultiValueMap.Entry.value has a single value, the single item will added to the attributes map and not the List
        Parameters:
        attributes -
        userRegistration -
      • registerUser

        @FrameworkPostMapping("/submit")
        public org.springframework.web.servlet.view.RedirectView registerUser​(javax.servlet.http.HttpServletRequest request,
                                                                              javax.servlet.http.HttpServletResponse response,
                                                                              org.springframework.ui.Model model,
                                                                              @RequestParam("client_id")
                                                                              String clientId,
                                                                              @ModelAttribute
                                                                              UserRegistration userRegistration,
                                                                              org.springframework.validation.BindingResult bindingResult,
                                                                              org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
      • determineLoggedInReturnUrl

        protected String determineLoggedInReturnUrl​(UserRegistration userRegistration)
      • addFlashAttributesToModel

        protected void addFlashAttributesToModel​(javax.servlet.http.HttpServletRequest request,
                                                 org.springframework.ui.Model model)
        Add flash attributes passed from the /submit endpoint to the Model
        Parameters:
        request -
        model -
      • addFlashAttributeToModel

        protected void addFlashAttributeToModel​(org.springframework.ui.Model model,
                                                Map<String,​?> inputFlashMap,
                                                String attributeKey)
        Add a flash attribute to the model if it exists. Use the same key for the flash map and Model attribute.
        Parameters:
        model -
        inputFlashMap -
        attributeKey -