package cn.com.poc.user.wecom.rest;

import cn.com.poc.user.dto.MemberLoginResponseDto;
import cn.com.poc.user.wecom.domain.WecomLoginUrlDto;
import cn.com.yict.framemax.core.rest.BaseRest;
import cn.com.yict.framemax.web.permission.Access;
import cn.com.yict.framemax.web.permission.Permission;
import org.springframework.web.bind.annotation.RequestParam;

@Permission(Access.Anonymous)
public interface WecomLoginRest extends BaseRest {

    WecomLoginUrlDto getOauthUrl(@RequestParam(required = false, name = "requesturl") String requestUrl,
                                 @RequestParam(required = false, name = "scope") String scope,
                                 @RequestParam(required = false, name = "state") String state) throws Exception;

    WecomLoginUrlDto getQrConnectUrl(@RequestParam(required = false, name = "requesturl") String requestUrl,
                                     @RequestParam(required = false, name = "userType") String userType,
                                     @RequestParam(required = false, name = "state") String state) throws Exception;

    MemberLoginResponseDto toLogin(@RequestParam String code, @RequestParam String loginType) throws Exception;
}
