Slide 17
Slide 17 text
데이터베이스 인증
u 스프링 시큐리티는 UserDetails의 구현 클래스로 User 클래스를 제공한다.
public class AccountDetails extends User {
private final Account account;
public AccountUserDetails(Account account, boolean accountNonExpired, boolean
credentialsNonExpired, boolean accountNonLocked, Collection
authorities) {
super(account.getUsername(), account.getPassword(), account.isEnabled(),
true, true, true, authorities);
this.account = account;
}
public Account getAccount() {
return account;
}
}