feat(iam): 单点登录
This commit is contained in:
+35
@@ -0,0 +1,35 @@
|
||||
package com.jero.modules.docking.iam.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.system.entity.Oauth;
|
||||
import com.jero.modules.system.service.ILoginService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
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: 31318
|
||||
* @Date: 2023/10/17/10:09
|
||||
* @Description:
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/iam")
|
||||
@Slf4j
|
||||
public class IamLoginController {
|
||||
private final ILoginService loginService;
|
||||
|
||||
public IamLoginController(ILoginService loginService) {
|
||||
this.loginService = loginService;
|
||||
}
|
||||
|
||||
@ApiOperation("单点登录")
|
||||
@PostMapping("/loginByOauth2")
|
||||
public Result<JSONObject> loginByOauth2(@Validated @RequestBody Oauth oauth){
|
||||
return loginService.loginByOauth2(oauth);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user