forked from LoCyan-Team/LoCyanFrpCSDesktop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fully Compatible to API v2.2.0 and Added Some Performance Optimization.
- Loading branch information
1 parent
e9111dd
commit 7713610
Showing
14 changed files
with
246 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using Kairo.Utils; | ||
using Microsoft.AspNetCore.Mvc; | ||
using System; | ||
|
||
namespace Kairo.Components.OAuth.Controllers | ||
{ | ||
[ApiController] | ||
[Route("oauth")] | ||
public class MainController : Controller | ||
{ | ||
[HttpGet("callback")] | ||
public IActionResult Callback() { | ||
Access.MainWindow.Login(Request.Query["refresh_token"]); | ||
Console.WriteLine(Request.Query["refresh_token"]); | ||
return Ok(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using Microsoft.AspNetCore.Builder; | ||
using Microsoft.Extensions.DependencyInjection; | ||
using System.Threading.Tasks; | ||
|
||
namespace Kairo.Components.OAuth | ||
{ | ||
class OAuthCallbackHandler | ||
{ | ||
public OAuthCallbackHandler() { | ||
|
||
} | ||
public static void Init() | ||
{ | ||
Task.Run(() => { | ||
WebApplicationBuilder builder = WebApplication.CreateBuilder(["--urls=http://localhost:16092"]); | ||
builder.Services.AddControllers(); | ||
WebApplication app = builder.Build(); | ||
app.UseRouting(); | ||
app.MapControllers(); | ||
app.RunAsync(); | ||
}); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,7 +79,6 @@ public bool CheckIfFrpcInstalled() | |
} | ||
return false; | ||
} | ||
return false; | ||
} | ||
public void DownloadFrpc() | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.