-
카테고리
-
세부 분야
백엔드
-
해결 여부
미해결
RSA 검증 기능 구현 - JwtDecoder 에 의한 검증 7:40
22.10.26 21:32 작성 조회수 292
0
http://localhost:8081/api/user get 요청
코드도 달라진게 없는 것 같은데
응답결과 401 로 나옵니다.
깃 클론 링크 첨부합니다.
git@github.com:InSuChoe/spring-security-oauth2.git
답변을 작성해보세요.
0
정수원
지식공유자2022.10.27
네
소스를 보면
SignatureConfig
@Bean
public RSAKey rsaKey() throws JOSEException {
RSAKey rsaKey = new RSAKeyGenerator(2048)
.keyID("rsaKey")
.algorithm(JWSAlgorithm.RS256)
.generate();
return rsaKey;
}
와
application.yml
spring:
security:
oauth2:
resourceserver:
jwt:
jws-algorithms: RS512
에서 알고리즘이 서로 다르게 설정이 되어 있습니다.
JWSAlgorithm.RS256
jws-algorithms: RS512
답변 1