mirror of
https://github.com/zfile-dev/zfile.git
synced 2025-04-19 05:34:52 +00:00
✨ 支持自定义 client_id 和 client_secret
This commit is contained in:
@@ -31,6 +31,13 @@ public class OneDriveCallbackController {
|
||||
return "callback";
|
||||
}
|
||||
|
||||
@GetMapping("/authorize")
|
||||
public String authorize() {
|
||||
return "redirect:https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=" + oneDriveServiceImpl.getClientId() +
|
||||
"&response_type=code&redirect_uri=" + oneDriveServiceImpl.getRedirectUri() +
|
||||
"&scope=" + oneDriveServiceImpl.getScope();
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/china-callback")
|
||||
public String oneDriveChinaCallback(String code, Model model) {
|
||||
@@ -40,4 +47,11 @@ public class OneDriveCallbackController {
|
||||
return "callback";
|
||||
}
|
||||
|
||||
@GetMapping("/china-authorize")
|
||||
public String authorizeChina() {
|
||||
return "redirect:https://login.chinacloudapi.cn/common/oauth2/v2.0/authorize?client_id=" + oneDriveChinaServiceImpl.getClientId() +
|
||||
"&response_type=code&redirect_uri=" + oneDriveChinaServiceImpl.getRedirectUri() +
|
||||
"&scope=" + oneDriveChinaServiceImpl.getScope();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user