스프링 시큐리티 아키텍처 (미완성)

이동욱

2021/03/11

Categories: 프로그래밍 - 자바 Tags: 자바

인증(Authentication)과 인과(Authorization)


Screen Shot 2021-03-11 at 7 26 53 AM

인증 (Authentication)


public interface AuthenticationManager {

  Authentication authenticate(Authentication authentication)
    throws AuthenticationException;
}

Screen Shot 2021-03-11 at 7 48 00 AM

AuthenticationManager 커스터마이징

@Configuration
public class ApplicationSecurity extends WebSecurityConfigurerAdapter {

   ... // web stuff here

  @Autowired
  public void initialize(AuthenticationManagerBuilder builder, DataSource dataSource) {
    builder.jdbcAuthentication().dataSource(dataSource).withUser("dave")
      .password("secret").roles("USER");
  }

}

인가 (Authorization)


참고 문헌

>> Home