원래 사용하던 signWith(io.jsonwebtoken.SignatureAlgorithm, java.lang.String) 방식이
jwt 0.10.0부터 사용되지 않는다.
대신 signWith(Key) or signWith(Key, SignatureAlgorithm)를 사용해야한다.
getSignKey 코드 추가
→ 그냥 secretkey를 String이 아닌 key 형식으로 변경
private SecretKey key = Keys.*secretKeyFor*(SignatureAlgorithm.*HS256*);
참고
[JWT] Spring Boot 환경에서 JWT(Json Web Token)생성 하기
[springboot, jwt] jwt 로 토큰 생성, 유효시간 관리 하기
'Etc > Error' 카테고리의 다른 글
Mysql Workbench 예기치않게 종료되었습니다 (2) | 2022.11.04 |
---|---|
No candidates found for method call useJUnitPlatform. (0) | 2022.07.18 |
[Lombok 에러] java: variable memberService not initialized in the default constructor (0) | 2022.07.18 |
[MySQL 패스워드 에러] Access denied for user 'root'@'localhost' (using password: YES) (0) | 2022.07.18 |