check_token 改为post接口
This commit is contained in:
@ -4,6 +4,7 @@ import com.chinaunicom.mall.ebtp.cloud.security.starter.entity.SecurityEntity;
|
|||||||
import com.chinaunicom.mall.ebtp.cloud.userinfo.starter.fallback.UnifastOAuthClientFallbackFactory;
|
import com.chinaunicom.mall.ebtp.cloud.userinfo.starter.fallback.UnifastOAuthClientFallbackFactory;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -18,4 +19,7 @@ public interface UnifastOAuthClient {
|
|||||||
@GetMapping("oauth/check_token")
|
@GetMapping("oauth/check_token")
|
||||||
SecurityEntity get(@RequestParam("token") String token);
|
SecurityEntity get(@RequestParam("token") String token);
|
||||||
|
|
||||||
|
@PostMapping("oauth/check_token")
|
||||||
|
SecurityEntity getPost(@RequestParam("token") String token);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -180,7 +180,7 @@ public class UserInfoServiceImpl implements UserInfoService {
|
|||||||
*/
|
*/
|
||||||
private SecurityEntity getAuthentication(String token) {
|
private SecurityEntity getAuthentication(String token) {
|
||||||
try {
|
try {
|
||||||
return client.get(token);
|
return client.getPost(token);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("Authentication Token: {}", token);
|
log.error("Authentication Token: {}", token);
|
||||||
log.error(e.getMessage());
|
log.error(e.getMessage());
|
||||||
|
Reference in New Issue
Block a user