/** * Configures what URL a POST to will trigger a log out. * @param logoutUrl the url to trigger a log out (i.e. "/signout" would mean a POST to "/signout" would trigger * log out) * @return the {@link LogoutSpec} to configure */ public LogoutSpec logoutUrl(String logoutUrl) { Assert.notNull(logoutUrl, "logoutUrl must not be null"); ServerWebExchangeMatcher requiresLogout = ServerWebExchangeMatchers.pathMatchers(HttpMethod.POST, logoutUrl); return requiresLogout(requiresLogout); }
/** * Configures what URL a POST to will trigger a log out. * @param logoutUrl the url to trigger a log out (i.e. "/signout" would mean a POST to "/signout" would trigger * log out) * @return the {@link LogoutSpec} to configure */ public LogoutSpec logoutUrl(String logoutUrl) { Assert.notNull(logoutUrl, "logoutUrl must not be null"); ServerWebExchangeMatcher requiresLogout = ServerWebExchangeMatchers.pathMatchers(HttpMethod.POST, logoutUrl); return requiresLogout(requiresLogout); }
.formLogin().and() .logout() .requiresLogout(ServerWebExchangeMatchers.pathMatchers("/custom-logout")) .and() .build();
/** * Configures what URL a POST to will trigger a log out. * @param logoutUrl the url to trigger a log out (i.e. "/signout" would mean a POST to "/signout" would trigger * log out) * @return the {@link LogoutSpec} to configure */ public LogoutSpec logoutUrl(String logoutUrl) { Assert.notNull(logoutUrl, "logoutUrl must not be null"); ServerWebExchangeMatcher requiresLogout = ServerWebExchangeMatchers.pathMatchers(HttpMethod.POST, logoutUrl); return requiresLogout(requiresLogout); }