https://getinthere.tistory.com/15
https://0pen3r.tistory.com/342
https://github.com/codingspecialist/Sringboot-Security-Basic-V1
https://github.com/codingspecialist/Springboot-Security-OAuth2.0-V2/tree/master
https://github.com/codingspecialist/-Springboot-Security-OAuth2.0-V3/tree/master
https://sennieworld.tistory.com/109
승인된 리디렉션 URI는 구글 로그인 완료가 되면
구글 서버에서는 우리쪽으로 인증되었다는 코드를 돌려준다.
우리는 이 코드를 받아서 다시 해당 코드를 통해서 access token을 요청한다.
이 access token을 받아서 이 access token으로
우리가 사용자 대신 서버가 구글 서버에 사용자의 개인정보 혹은 민감한 정보에
접근할 수 있는 권한이 생긴다.
이 access token을 얻기 위해 필요한 것이 코드인데,
이 코드를 받을 수 있는 주소를 승인된 리디렉션 URI에 적는 것이다.
승인된 리디렉션 URI에서 /login/oauth2/는 고정되어 있다.
그리고 우리는 이에 대한 Controller를 IndexController에 만들 필요가 없다.
OAuth 클라이언트가 생성되면 클라이언트 ID와 클라이언트 보안 비밀번호를 받게 된다.
https://spring.io/guides/tutorials/spring-boot-oauth2/
'Spring > study for project' 카테고리의 다른 글
MySQL 위도 경도 데이터 타입 (0) | 2024.01.12 |
---|---|
jpa query method (0) | 2024.01.09 |
MariaDB 데이터 유형 (0) | 2024.01.08 |
MariaDB / DATA / 데이터 추가(INSERT), 수정(UPDATE), 삭제(DELETE) (0) | 2024.01.08 |
int와 Integer의 차이 (1) | 2024.01.04 |