inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

173만명의 커뮤니티!! 함께 토론해봐요.

비대칭키 jwt 인증 문제

미해결

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

http://localhost:8888/ecommerce/default 에서는 { name : "ecommerce", profiles : [ "default" ], label : null, version : "f45bf692a6cb54252ea12041f0aa92a71964a5f7", state : null, propertySources : [ { name : "file:///C:\\Users\\ydj90\\Downloads\\git/file:C:\Users\ydj90\Downloads\git\ecommerce.yml", source : { token.expiration_time : 864000000, gateway.ip : "172.30.1.33", token.secret : "userToken_token" } } ] } http://localhost:8888/user-service/default 에서는 { name : "user-service", profiles : [ "default" ], label : null, version : "f45bf692a6cb54252ea12041f0aa92a71964a5f7", state : null, propertySources : [ { name : "file:///C:\\Users\\ydj90\\Downloads\\git/file:C:\Users\ydj90\Downloads\git\user-service.yml", source : { spring.datasource.url : "jdbc:h2:mem:testdb", spring.datasource.driver-class-name : "org.h2.Driver", spring.datasource.generate-unique-name : false, token.expiration_time : 864000000, gateway.ip : "172.30.1.33", order_service.url : " http://ORDER-SERVICE/order-service/%s/orders ", spring.datasource.username : "sa", token.secret : "userToken_token" } } ] } 이와 같이 token.secret이 같은데 왜 subject가 null값이 되는지 이유를 알 수 가 없습니다. login하고 나온 header값을 가지고 bearer에 넣어 인증하는 방식이 아닙니까? 이유를 잘 모르겠습니다. JWT token is not valid 이게 왜 뜨는지 subject = Jwts.parser().setSigningKey(env.getProperty("token.secret")) .parseClaimsJws(jwt).getBody() .getSubject(); 여기서 왜 null값으로 값을 반환하는지 이해를 할 수가 없습니다.

  • 비대칭키
  • jwt
  • spring-cloud
  • spring-boot
  • JPA
  • architecture
  • msa
  • Kafka
JUNI 댓글 4 좋아요 0 조회수 679

인기 태그

인프런 TOP Writers

주간 인기글