package org.security.trans.common.controller;

import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.security.trans.common.service.Oauth2Service;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * @author zj 2022/6/27
 */
@Slf4j
@AllArgsConstructor
@Controller
public class Oauth2Controller {

	private final Oauth2Service oauth2Service;

	/**
	 * app单点登录
	 */
	@GetMapping("/app/oauth")
	public String assOauth(HttpServletRequest request) {
		return oauth2Service.appOauth(request);
	}

	/**
	 * pc端单点登录
	 */
	@GetMapping("/pc/oauth")
	public String pcOauth() {
		return null;
	}
}
