From 2e4f60027939c79596b6df1f1fcec03aabb1e4df Mon Sep 17 00:00:00 2001 From: choisungwook Date: Fri, 8 Oct 2021 19:34:53 +0900 Subject: [PATCH] =?UTF-8?q?[FEATURE]=20E4-S3=20=ED=9A=8C=EC=9B=90=EA=B0=80?= =?UTF-8?q?=EC=9E=85=20API=20=20-=20=EC=8A=A4=ED=94=84=EB=A7=81=EC=8B=9C?= =?UTF-8?q?=ED=81=90=EB=A6=AC=ED=8B=B0=EC=97=90=20userdetail=EC=84=A4?= =?UTF-8?q?=EC=A0=95=20#25?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ciat/config/security/WebSecurityConfig.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/backend/src/main/java/com/infp/ciat/config/security/WebSecurityConfig.java b/backend/src/main/java/com/infp/ciat/config/security/WebSecurityConfig.java index 1253499..9d55f47 100644 --- a/backend/src/main/java/com/infp/ciat/config/security/WebSecurityConfig.java +++ b/backend/src/main/java/com/infp/ciat/config/security/WebSecurityConfig.java @@ -1,7 +1,10 @@ package com.infp.ciat.config.security; +import com.infp.ciat.user.service.AccountService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; @@ -14,6 +17,9 @@ @Configuration @EnableWebSecurity public class WebSecurityConfig extends WebSecurityConfigurerAdapter { + @Autowired + private AccountService customUserDetailService; + /*** * default 패스워드 암호화알고리즘 사용 설정 * @return @@ -44,4 +50,14 @@ protected void configure(HttpSecurity http) throws Exception { .and() .csrf().disable(); } + + /*** + * 사용자 userdetailservice 등록 + * @param auth + * @throws Exception + */ + @Override + protected void configure(AuthenticationManagerBuilder auth) throws Exception { + auth.userDetailsService(customUserDetailService); + } }