Skip to content

Commit 50daa92

Browse files
authored
hotfix: Change JWT claim key from 'TOKEN_ROLE_NAME' to 'authority'
1 parent 098edc1 commit 50daa92

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/com/irum/apigateway/filter/JwtAuthenticationFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain) {
4646
Claims claims =
4747
Jwts.parser().verifyWith(key).build().parseSignedClaims(token).getPayload();
4848
String memberId = claims.getSubject();
49-
String role = claims.get("TOKEN_ROLE_NAME", String.class);
49+
String role = claims.get("authority", String.class);
5050
GrantedAuthority authority = new SimpleGrantedAuthority(role);
5151
Collection<GrantedAuthority> authorities = Collections.singletonList(authority);
5252

0 commit comments

Comments
 (0)