Spring Security
@Log4j2 public class MyAuthenticationFilter extends UsernamePasswordAuthenticationFilter { @Override public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) { String username = obtainUsername(request); String password = obtainPassword(request); log.info("loginfilter: "+username+" "+password); // トークンの作成 final UsernamePasswordAuthenticationToken authRequest = new UsernamePasswordAuthenticationToken( username, password); // Allow subclasses to set the "details" property setDetails(request, authRequest); return this.getAuthenticationManager().authenticate(authRequest); //nullが返ってる } @Autowired public void setAuthenticationManager(AuthenticationManager authenticationManager) { super.setAuthenticationManager(authenticationManager); } }
http://wannabe-jellyfish.hatenablog.com/entry/2018/01/10/013508 https://teratail.com/questions/94735
https://teratail.com/questions/95922
https://fueiseix.hatenablog.com/entry/2018/03/11/191200
https://terasolunaorg.github.io/guideline/5.1.0.RELEASE/ja/Security/Authentication.html
作成中...