최근 버전에서는 deprecated 되었지만
Authorization Server Config
Oauth2AuthorizationConfig 생성하고 인증 서버 활성화
1 | |
- scopes : 인증후 얻은 accessToken으로 접근할 수 있는 리소스 범위
- accessTokenValiditySeconds : 발급된 accessToken 유효시간(초)
SpringSecurity Config 생성
1 | |
ResourceServerConfig 생성
1 | |
access token 발급
1 | |
다음과 같이 응답이 온다.
1 | |
엑세스 토큰을 이용하여 접속할 수 있다.
1 | |
gradle 사용시
1 | |
1 | |
1 | |