OAuth 2.0 Client + OAuth 2.0 Resource Server 연동
Client
의존성
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' //Client
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity6'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
}application.yml
IndexController
index.html
home.html
SecurityConfig
RestApiController
http://localhost:8081

Login 클릭

access token 클릭

PreviousOAuth 2.0 Resource Server 권한 구현 - Scope 기반 권한 매핑NextOAuth 2.0 Client + OAuth 2.0 Resource Server 연동
Last updated