AuthClient.java 724 Bytes
package com.viontech.fanxing.commons.feign;

import com.alibaba.fastjson.JSONObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.Map;

/**
 * .
 *
 * @author 谢明辉
 * @date 2021/9/29
 */
@FeignClient(name = "fanxing-auth")
public interface AuthClient {

    @PostMapping(value = "/api/v1/auth/authorize", produces = MediaType.APPLICATION_JSON_VALUE)
    JSONObject checkToken(@RequestHeader("authorization") String token, @RequestBody Map<String, Object> data);

}