st-tu-dresden/salespoint

Method signature leads to error for unauthenticated users

Closed this issue · 1 comments

@GetMapping("/cart")
@PreAuthorize("isAuthenticated()")
String cart(Cart cart, Model model, @LoggedIn UserAccount userAccount) {
	...
}

Workaround: Use Optional<UserAccount> as suggested by the error page

We decided to refrain from throwing the parameter resolution exception if we find the target method to be guarded by security annotations like @PreAuthorize/@Secured.