package com.sptg.permissions.api.feigns;

import com.sptg.common.core.beans.ResultBean;
import com.sptg.permissions.api.dto.AccountDto;
import com.sptg.permissions.api.dto.LoginDto;
import com.sptg.permissions.api.entity.Account;
import com.sptg.permissions.api.feigns.fallback.ThirdAuthenticationFeignFallbackFactory;
import me.zhyd.oauth.model.AuthCallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.Serializable;


/**
 * title: ThirdAuthenticationFeign
 * package: com.sptg.permissions.api.feigns
 * description: 认证相关接口
 *
 *                  
 *                 
 */
@FeignClient(value = "smart-house-permissions",fallbackFactory = ThirdAuthenticationFeignFallbackFactory.class)
public interface ThirdAuthenticationFeign {

    @RequestMapping("/render/{source}")
    @ResponseBody
    void renderAuth(@PathVariable("source") String source, HttpServletResponse response) throws IOException;

    @RequestMapping("/callback/{source}")
    ModelAndView login(@PathVariable("source") String source, AuthCallback callback, HttpServletRequest request);


}
