|
|
@@ -1,6 +1,7 @@
|
|
|
package com.mrxu.framework.boot.token;
|
|
|
|
|
|
import com.auth0.jwt.exceptions.TokenExpiredException;
|
|
|
+import com.mrxu.framework.boot.entity.RpcRequestInfo;
|
|
|
import com.mrxu.framework.common.util.StrFunc;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.http.server.reactive.ServerHttpRequest;
|
|
|
@@ -46,6 +47,7 @@ public class SecurityFilter extends HiddenHttpMethodFilter {
|
|
|
String tokenStr = request.getHeaders().getFirst(TOKEN_KEY);
|
|
|
try {
|
|
|
String userId = tokenManager.getUserId(tokenStr);
|
|
|
+ RpcRequestInfo.get().setUsername(userId);
|
|
|
return null;
|
|
|
} catch (TokenExpiredException e) {
|
|
|
return null;
|