From 4e7069d35f92464ffe25930d33f2500fb777db9b Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期三, 20 九月 2023 17:13:50 +0800
Subject: [PATCH] 整合代码
---
Source/UBCS/ubcs-auth/src/main/java/com/vci/ubcs/auth/endpoint/BladeSocialEndpoint.java | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/Source/UBCS/ubcs-auth/src/main/java/com/vci/ubcs/auth/endpoint/BladeSocialEndpoint.java b/Source/UBCS/ubcs-auth/src/main/java/com/vci/ubcs/auth/endpoint/BladeSocialEndpoint.java
index be06db7..e65b6aa 100644
--- a/Source/UBCS/ubcs-auth/src/main/java/com/vci/ubcs/auth/endpoint/BladeSocialEndpoint.java
+++ b/Source/UBCS/ubcs-auth/src/main/java/com/vci/ubcs/auth/endpoint/BladeSocialEndpoint.java
@@ -16,6 +16,7 @@
*/
package com.vci.ubcs.auth.endpoint;
+import com.vci.ubcs.starter.util.HttpUtils;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import me.zhyd.oauth.model.AuthCallback;
@@ -26,10 +27,13 @@
import org.springblade.core.social.utils.SocialUtil;
import org.springblade.core.tenant.annotation.NonDS;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.servlet.ModelAndView;
+import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@@ -58,6 +62,22 @@
}
/**
+ * 涓嶰A绯荤粺鐨勫崟鐐圭櫥褰�
+ */
+ @GetMapping("/oauth/oasso")
+ public ModelAndView require(HttpServletRequest request, ModelAndView model) {
+ // 1銆佹嬁鍒扮敤鎴风殑閴存潈淇℃伅
+ String userName = request.getParameter("username");
+ // 2銆佽皟鐢ㄩ壌鏉冪櫥褰曟帴鍙o紝杩欓噷閲囩敤鎺堟潈鐮佹ā寮�
+ // 3銆佹瀯寤鸿姹傚湴鍧�锛�
+ //HttpUtils.post();
+
+ model.setViewName("login");
+ return model;
+ }
+
+
+ /**
* 鑾峰彇璁よ瘉淇℃伅
*/
@RequestMapping("/oauth/callback/{source}")
--
Gitblit v1.9.3