1) 스프링부트 2.7.0 사용
2) jwt 라이브러리
<dependency> <groupId>io.jsonwebtoken</groupId> <artifactId>jjwt-api</artifactId> <version>0.11.5</version> </dependency> <dependency> <groupId>io.jsonwebtoken</groupId> <artifactId>jjwt-impl</artifactId> <version>0.11.5</version> <scope>runtime</scope> </dependency> <dependency> <groupId>io.jsonwebtoken</groupId> <artifactId>jjwt-jackson</artifactId> <version>0.11.5</version> <scope>runtime</scope> </dependency>
1 .Security 설정, Data 설정 2.JWT 코드, Security 설정 3.DTO, Repository, 로그인 4. #회원가입, 권한검증
소스 :
1) https://github.com/braverokmc79/jwt-tutorial-maven (2.7.0)
2) https://github.com/SilverNine/spring-boot-jwt-tutorial (2.5.3)
3)https://github.com/ParkJiwoon/practice-codes/tree/master/spring-security-jwt ( 2.4.3)
https://bcp0109.tistory.com/301
1. 프로젝트 파일 리스트
2. 회원 가입
3. 로그인
4.POSTMAN 토큰 전역 변수로 사용 설정
* 포스트맨 토큰 유지방법 test 탭에 다음과 같이 var jsonData =JSON.parse(responseBody) pm.globals.set("jwt_tutorial_token", jsonData.token);
5. 유저별 권한 테스트 및 POSTMAN 전역 변수 사용
참조 및 강의
Spring Boot JWT Tutorial
https://www.inflearn.com/course/%EC%8A%A4%ED%94%84%EB%A7%81%EB%B6%80%ED%8A%B8-jwt#reviews
댓글 ( 4)
댓글 남기기