Spring security KeyClope:注销会话吊销脱机令牌
我在一个spring引导应用程序中使用KeyDoppe 4.8.3和KeyDopperWebSecurity配置适配器 我试图在会话注销后使用脱机刷新令牌来使用此令牌,但当我调用注销URL(因为我的客户端在我的服务器上)时,KeyDope LogoutHandler将我的脱机刷新令牌用于call KeyDope,我的脱机令牌将被撤销 在keydepot的文档中,脱机令牌可以在会话注销后使用,但我发现并且适配器调用LogoutEndpoint,其中令牌的类型为check和revoke,因为我的令牌的类型是脱机的 我的Spring安全配置如下:Spring security KeyClope:注销会话吊销脱机令牌,spring-security,keycloak,offline,logout,Spring Security,Keycloak,Offline,Logout,我在一个spring引导应用程序中使用KeyDoppe 4.8.3和KeyDopperWebSecurity配置适配器 我试图在会话注销后使用脱机刷新令牌来使用此令牌,但当我调用注销URL(因为我的客户端在我的服务器上)时,KeyDope LogoutHandler将我的脱机刷新令牌用于call KeyDope,我的脱机令牌将被撤销 在keydepot的文档中,脱机令牌可以在会话注销后使用,但我发现并且适配器调用LogoutEndpoint,其中令牌的类型为check和revoke,因为我的令牌
public class SpringSecurityConfig extends KeycloakSecurityAdapter
{
...
@Override
protected void configure(HttpSecurity http) throws Exception
{
super.configure(http);
RequestMatcher requestMatcher = new RequestMatcher()
{
@Override
public boolean matches(HttpServletRequest request)
{
if(csrfMatcher.matches(request))
{
return true;
}
return false;
}
};
http
.csrf()
.csrfTokenRepository(csrfTokenRepository())
.requireCsrfProtectionMatcher(requestMatcher)
.and()
.authorizeRequests()
.antMatchers("/actuator/**").permitAll()
.antMatchers("/landing").permitAll()
.antMatchers("/about-cookie", "/browsernotsupported").permitAll()
.antMatchers("/webview").permitAll()
.antMatchers("/*", "/**").hasRole("USER")
.and()
.logout()
.logoutRequestMatcher(new AntPathRequestMatcher("/logout"))
.logoutSuccessUrl("/");
http
.headers()
.frameOptions().sameOrigin().httpStrictTransportSecurity().disable();
}
...
}
我真的很想知道这样一个代币(离线)的用处
应该定义我的keydaveplogouthandler吗?
适配器的标准操作是否应该撤销令牌