You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
package com.epmet.controller;
|
|
|
|
|
|
|
|
import com.epmet.commons.tools.utils.Result;
|
|
|
|
import com.epmet.commons.tools.validator.ValidatorUtils;
|
|
|
|
import com.epmet.dto.form.SsoLoginFormDTO;
|
|
|
|
import com.epmet.dto.result.SsoLoginResultDTO;
|
|
|
|
import com.epmet.service.SsoService;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @Author zxc
|
|
|
|
* @DateTime 2021/1/18 下午4:33
|
|
|
|
*/
|
|
|
|
@RestController
|
|
|
|
@RequestMapping("sso/resi")
|
|
|
|
public class SsoController {
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
private SsoService ssoService;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @Description 0、入口:得到token
|
|
|
|
* @Param formDTO
|
|
|
|
* @author zxc
|
|
|
|
* @date 2021/1/18 下午4:59
|
|
|
|
*/
|
|
|
|
@PostMapping("login")
|
|
|
|
public Result<SsoLoginResultDTO> ssoLogin(@RequestBody SsoLoginFormDTO formDTO){
|
|
|
|
ValidatorUtils.validateEntity(formDTO, SsoLoginFormDTO.SsoLoginForm.class);
|
|
|
|
return new Result<SsoLoginResultDTO>().ok(ssoService.ssoLogin(formDTO));
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|