修改第三方登录
This commit is contained in:
parent
9b31643e83
commit
356b603e55
|
@ -88,7 +88,7 @@ public class ThirdOauthController extends BaseController {
|
||||||
* 回调结果
|
* 回调结果
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@GetMapping("/auth/callback/{source}")
|
@GetMapping("/dingTalkLogin")
|
||||||
public Object callbackAuth(@PathVariable("source") String source, AuthCallback callback, HttpServletRequest request)
|
public Object callbackAuth(@PathVariable("source") String source, AuthCallback callback, HttpServletRequest request)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ public class ThirdOauthController extends BaseController {
|
||||||
/**
|
/**
|
||||||
* 检查是否授权
|
* 检查是否授权
|
||||||
*/
|
*/
|
||||||
@PostMapping("/auth/checkAuthUser")
|
@PostMapping("/checkAuthUser")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxResult checkAuthUser(SysAuthUser authUser)
|
public AjaxResult checkAuthUser(SysAuthUser authUser)
|
||||||
{
|
{
|
||||||
|
@ -162,7 +162,7 @@ public class ThirdOauthController extends BaseController {
|
||||||
/**
|
/**
|
||||||
* 取消授权
|
* 取消授权
|
||||||
*/
|
*/
|
||||||
@PostMapping("/auth/unlock")
|
@PostMapping("/unlock")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxResult unlockAuth(SysAuthUser authUser)
|
public AjaxResult unlockAuth(SysAuthUser authUser)
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,7 +6,7 @@ spring:
|
||||||
druid:
|
druid:
|
||||||
# 主库数据源
|
# 主库数据源
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://localhost:3306/snow?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
|
url: jdbc:mysql://localhost:3306/snow-dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
|
||||||
username: root
|
username: root
|
||||||
password: root
|
password: root
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
|
|
|
@ -150,12 +150,12 @@
|
||||||
<div id="authlist" class="user-bind">
|
<div id="authlist" class="user-bind">
|
||||||
<a class="third-app" href="#" onclick="authUrl('gitee');" title="使用 Gitee 账号授权登录">
|
<a class="third-app" href="#" onclick="authUrl('gitee');" title="使用 Gitee 账号授权登录">
|
||||||
<div class="git-other-login-icon"><img th:src="@{/img/gitee.svg}"></div>
|
<div class="git-other-login-icon"><img th:src="@{/img/gitee.svg}"></div>
|
||||||
<span class="app-name">Gitee</span></a>
|
<span class="app-name">DingTalk</span></a>
|
||||||
|
|
||||||
<a class="third-app" href="#" onclick="authUrl('github');" title="使用 GitHub 账号授权登录">
|
<!-- <a class="third-app" href="#" onclick="authUrl('github');" title="使用 GitHub 账号授权登录">
|
||||||
<div class="git-other-login-icon"><img th:src="@{/img/github.svg}"></div>
|
<div class="git-other-login-icon"><img th:src="@{/img/github.svg}"></div>
|
||||||
<span class="app-name">Github</span></a>
|
<span class="app-name">Github</span></a>
|
||||||
|
-->
|
||||||
<a class="third-app" href="#" title="功能开发中...">
|
<a class="third-app" href="#" title="功能开发中...">
|
||||||
<div class="git-other-login-icon"><img th:src="@{/img/weixin.svg}"></div>
|
<div class="git-other-login-icon"><img th:src="@{/img/weixin.svg}"></div>
|
||||||
<span class="app-name">WeiXin</span></a>
|
<span class="app-name">WeiXin</span></a>
|
||||||
|
@ -381,7 +381,7 @@
|
||||||
$.modal.confirm("您确定要解除" + source + "的账号绑定吗?", function() {
|
$.modal.confirm("您确定要解除" + source + "的账号绑定吗?", function() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "post",
|
type: "post",
|
||||||
url: ctx + "auth/unlock",
|
url: ctx + "/third/oauth/unlock",
|
||||||
data: { "authId": authId },
|
data: { "authId": authId },
|
||||||
success: function(r) {
|
success: function(r) {
|
||||||
if (r.code == web_status.SUCCESS) {
|
if (r.code == web_status.SUCCESS) {
|
||||||
|
@ -399,11 +399,11 @@
|
||||||
function authUrl(source) {
|
function authUrl(source) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "post",
|
type: "post",
|
||||||
url: ctx + "auth/checkAuthUser",
|
url: "/third/oauth/checkAuthUser",
|
||||||
data: { "source": source },
|
data: { "source": source },
|
||||||
success: function(r) {
|
success: function(r) {
|
||||||
if (r.code == web_status.SUCCESS) {
|
if (r.code == web_status.SUCCESS) {
|
||||||
var url = ctx + "auth/" + source;
|
var url = "/third/oauth/toDingPage/" + source;
|
||||||
top.location.href =url;
|
top.location.href =url;
|
||||||
} else {
|
} else {
|
||||||
$.modal.msgError(r.msg);
|
$.modal.msgError(r.msg);
|
||||||
|
|
Loading…
Reference in New Issue