본문 바로가기
반응형

FullStack/21. Java49

WebDriver를 이용한 Robot 방지 우회 이전에 만들어둔 WebDriver를 이용한 아마존 웹 크롤링 소스를 실행했는데, 그때는 없었던 로봇방지 화면이 나타났다. System.setProperty("webdriver.chrome.driver", "\chromedriver.exe"); String userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 "; ChromeOptions chromeOptions = new ChromeOptions(); chromeOptions.addArguments("--disable-blink-features=AutomationControlled");.. 2024. 1. 8.
ProviderManager,  AuthenticationProvider 차이 ProviderManager, AuthenticationProvider 차이 ProviderManager와 AuthenticationProvider는 Spring Security에서 인증 관련된 구성에서 다른 역할을 수행하는 클래스들입니다. AuthenticationProvider AuthenticationProvider는 Spring Security에서 실제로 사용자의 인증을 처리하는 인터페이스입니다. DaoAuthenticationProvider, LdapAuthenticationProvider, JwtAuthenticationProvider 등과 같이 다양한 구현이 있습니다. 각각의 AuthenticationProvider는 특정 유형의 인증을 처리하며, AuthenticationManager에 등.. 2023. 11. 23.
Azure Active Directory SSO - 사용자 프로파일(3) AD에 있는 로그인 프로파일 가져오는 방법입니다. SSO 성공 시 accessToken이 발급되며, 발급된 Token을 이용하여 프로파일 정보 접근 후 이미지 파일을 내려받는 소스입니다. 로그인 이후 프로파일 사진 다운로드 { // 로그인 시점에서 전달된 accessToken 정보 final String accessToken = filteredClaims.get("accessToken"); TokenCredential tokenCredential = new TokenCredential() { @Override public Mono getToken(TokenRequestContext tokenRequestContext) { // 비동기적으로 AccessToken을 생성하고 반환하는 예제 return Mon.. 2023. 9. 29.
Azure Active Directory SSO - 로그인 코드(2) 로그인을 위한 소스입니다. 환경에 필요한 설정 정보는 이전 글을 참고하세요. 2023.09.29 - [FullStack/21. Java] - Azure Active Directory SSO - 연동 준비(1) 기본 샘플이 SpringBoot로 구성된 예제가 많아서 SpringBoot로 구성되지 않은 환경에서는 소스 구현과 라이브러리 버전을 맞추기가 어려웠습니다. 참고 소스 https://github.com/Azure-Samples/ms-identity-java-servlet-webapp-authentication/tree/main/1-Authentication/sign-in 라이브러리 com.microsoft.azure msal4j 1.9.1 javax.servlet javax.servlet-api 4... 2023. 9. 29.
반응형