registration screen optimized, see #58
This commit is contained in:
@@ -34,7 +34,7 @@ public class SecurityConfiguration {
|
||||
// @formatter:off
|
||||
.oauth2Login(o -> o.defaultSuccessUrl("/"))
|
||||
.logout(o -> o.logoutSuccessHandler(new OidcClientInitiatedLogoutSuccessHandler(crr)))
|
||||
.authorizeHttpRequests(o -> o.requestMatchers("/dashboard/**", "/business/**", "/confirmation/**").authenticated()
|
||||
.authorizeHttpRequests(o -> o.requestMatchers("/dashboard/**", "/business/**", "/confirmation/**", "/userlogin/**").authenticated()
|
||||
.anyRequest().permitAll())
|
||||
.oauth2ResourceServer(o -> o.jwt(Customizer.withDefaults()))
|
||||
.sessionManagement(o -> o.init(sec));
|
||||
|
||||
@@ -44,6 +44,18 @@ public class RegistrationController extends CommonController {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* userlogin is protected and leads the request to the keycloak login mask if not yet logged in
|
||||
*
|
||||
* @param fkCamp the ID of the camp
|
||||
* @param model the model
|
||||
* @return hen registration page
|
||||
*/
|
||||
@GetMapping("/userlogin/registration/{fkCamp}")
|
||||
public String loginIndex(@PathVariable(name = "fkCamp", required = true) Integer fkCamp, Model model) {
|
||||
return index(fkCamp, model);
|
||||
}
|
||||
|
||||
@PostMapping("/registration/register")
|
||||
public String register(@Valid @ModelAttribute("bean") RegistrationBean bean, final BindingResult bindingResult,
|
||||
Model model) {
|
||||
|
||||
Reference in New Issue
Block a user