.antMatchers(HttpMethod.POST, "/api/transform-user").authenticated() return new SecurityEvaluationContextExtension();您可以看到,我对未通过身份验证的用户启用了除了转换用户调用之外的所有请求
在学习了Maven Spring Boot中有关微服务和OAuth2的教程后,我遇到了一个问题。我想从身份验证中排除一个请求,这样就可以获得未经授权的数据。这似乎只是在我做的方式中不起作用。我遵循的教程:https://developer.okta.com/blog/2018/02/13/secure-spring-microservices-with-oauth#
这段代码允许我在不经过身份验证的情况下访问/、/home和/signup。我的问题是如何在使用HttpSecurity时实现ErrorController,如果我得到了This application has no explicit mapping for /error,我不希望spring boot首先提示登录页面,然后显示ErrorController。() .logout()
.