Springboot AzureAD ログアウト情報を集める

参考

MS forum 2019年1月11日 の情報

AppServiceAuthSessionというCookieに情報が残っているためろぐあうとができないらしい CookieはSecureかつHttpOnlyのため、クライアントサイドのJavaScriptからじょがいできないとのこと https://social.msdn.microsoft.com/Forums/aspnet/ja-JP/7181af2d-c5c0-46eb-bce4-13c24a4d6a40/azure-ad1239512518125401247035469353881243422996353511237512383web

azure-spring-boot GithubのISSUE 2018年1月23日の情報

下記実装でうまくいくとのこと よく読むこと。

http.logout()
    .logoutRequestMatcher(new AntPathRequestMatcher("/logout"))
    .logoutSuccessUrl("/logout.done")
    .deleteCookies("JSESSIONID")
    .invalidateHttpSession(true);

https://github.com/microsoft/azure-spring-boot/issues/364

ISSUEのリンクがあったStackoverflowの記事 2016年4月11日の質問 返答 2019年3月1日が最終更新

https://stackoverflow.com/questions/36557294/spring-security-logout-does-not-work-does-not-clear-security-context-and-authe/36562183#36562183

順に検証していくこと。

`その他

https://www.greptips.com/posts/847/

https://www.rough-and-cheap.jp/java/spring-boot-with-spring-security-login-logout/#logout

https://www.fixes.pub/program/40260.html

結論

以下サイトを参考にすることでログアウトでけた。 よかった。 AzureAD側のマニフェストには、特に設定はしなくても大丈夫でした。 "logoutUrl": null, https://docs.microsoft.com/ja-jp/azure/active-directory/develop/scenario-web-app-sign-user-sign-in?tabs=java