Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
io.micronaut.security.endpoints.LogoutController注释为@Secured(SecurityRule.IS_ANONYMOUS)
io.micronaut.security.endpoints.LogoutController
@Secured(SecurityRule.IS_ANONYMOUS)
通常,人们会期望用户在注销之前进行身份验证。我错过了什么?
你是对的,没有登录就退出是没有意义的,但是如果控制器有一个非匿名规则并且你在没有登录的情况下访问它,它将触发登录。最好的办法是让它成为非身份验证访问的空操作。