| | |
| | | package com.xinquan.gateway.filter; |
| | | |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.cloud.gateway.filter.GatewayFilterChain; |
| | | import org.springframework.cloud.gateway.filter.GlobalFilter; |
| | | import org.springframework.core.Ordered; |
| | | import org.springframework.http.server.reactive.ServerHttpRequest; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.server.ServerWebExchange; |
| | | import com.xinquan.common.core.constant.CacheConstants; |
| | | import com.xinquan.common.core.constant.HttpStatus; |
| | | import com.xinquan.common.core.constant.SecurityConstants; |
| | |
| | | import com.xinquan.common.redis.service.RedisService; |
| | | import com.xinquan.gateway.config.properties.IgnoreWhiteProperties; |
| | | import io.jsonwebtoken.Claims; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.cloud.gateway.filter.GatewayFilterChain; |
| | | import org.springframework.cloud.gateway.filter.GlobalFilter; |
| | | import org.springframework.core.Ordered; |
| | | import org.springframework.http.server.reactive.ServerHttpRequest; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.server.ServerWebExchange; |
| | | import reactor.core.publisher.Mono; |
| | | |
| | | /** |
| | |
| | | return chain.filter(exchange.mutate().request(mutate.build()).build()); |
| | | } |
| | | |
| | | private String getAppUserTokenKey(String userkey) { |
| | | return CacheConstants.APP_USER_LOGIN_TOKEN_KEY + userkey; |
| | | } |
| | | |
| | | private void addHeader(ServerHttpRequest.Builder mutate, String name, Object value) |
| | | { |
| | | if (value == null) |