@@ -0,0 +1,1262 @@
+package io.github.saidie.plantuml_api;%0A%0Aimport lombok.NoArgsConstructor;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.stereotype.Controller;%0Aimport org.springframework.web.bind.annotation.RequestMapping;%0Aimport org.springframework.web.bind.annotation.RequestMethod;%0Aimport org.springframework.web.bind.annotation.RequestParam;%0A%0A@Controller%0A@RequestMapping(%22/register%22)%0A@NoArgsConstructor%0Apublic class RegisterController %7B%0A    @Autowired%0A    private AccountService accountService;%0A%0A    @RequestMapping(method=RequestMethod.GET)%0A    public String registerForm() %7B%0A        if (!accountService.isIdpAuthenticated())%0A            return %22redirect:/connect%22;%0A%0A        if (accountService.getCurrentAccount() != null)%0A            return %22redirect:/%22;%0A%0A        return %22register%22;%0A    %7D%0A%0A    @RequestMapping(method=RequestMethod.POST)%0A    public String register(@RequestParam(%22username%22) String username) %7B%0A        // TODO: CSRF%0A%0A        if (!accountService.isIdpAuthenticated())%0A            return %22redirect:/connect%22;%0A%0A        if (accountService.getCurrentAccount() != null)%0A            return %22redirect:/%22;%0A%0A        accountService.createAccount(username);%0A%0A        // TODO: issue cookie%0A%0A        return %22redirect:/%22;%0A    %7D%0A%7D%0A

Add registration controller