私がしましたspring security core pluginGrailsの春のセキュリティ問題
に問題I Excelスプレッドシートと1つのセルは、私のWebアプリケーションのリソースへのリンクを持っていました(例えば。http://localhost:8080/myapp/item/1)
私がリンクをクリックすると、ブラウザー(すでにログインしている場所と同じ)が開き、クリックしたURLに行く代わりに、私は家に帰宅します(デフォルトのターゲットURL)...
私はbeanのauthenticationProcessingFilterを変更しました。doFilterで何が起こっているのかを記録しています。これは私が得たものです
http://localhost:8080/myapp/item/1
E5E79669EBC938953AC6DCA4F1D38D56 <- this is the session id
false <- just printing if I'm logged in
http://localhost:8080/myapp/login/auth
1446A2704FC61E6304F0AC95F8BDAF22 <- this is the session id, and now is different
true <- just printing if I'm logged in
http://localhost:8080/myapp/home
1446A2704FC61E6304F0AC95F8BDAF22 <- this is the session id
true <- just printing if I'm logged in
それはセッションIDを変更する理由を私は知らない、これがすべてでは
public class MyAuthFilter extends RequestHolderAuthenticationFilter {
@Override
public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain) throws IOException, ServletException {
HttpServletRequest r2 = (HttpServletRequest)request;
println r2.getSession().getId();
super.doFilter(request, response, chain);
}
}
がどのように私は私がクリックされたURLにリダイレクトすることができますUsernamePasswordAuthenticationFilterのオーバーライドのdoFilterになりますか?