mirror of
https://github.com/dotnetcore/AgileConfig.git
synced 2026-10-29 04:56:55 +08:00
add a oidc controller
This commit is contained in:
@@ -41,12 +41,6 @@ namespace AgileConfig.Server.Apisite.Controllers
|
||||
return Redirect(Request.PathBase + "/ui");
|
||||
}
|
||||
|
||||
[AllowAnonymous]
|
||||
public async Task<IActionResult> OIDC(string code)
|
||||
{
|
||||
return Redirect("http://localhost:8000/ui/#/oidc/login?code=" + code);
|
||||
}
|
||||
|
||||
public async Task<IActionResult> Current()
|
||||
{
|
||||
string userName = this.GetCurrentUserName();
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace AgileConfig.Server.Apisite.Controllers
|
||||
{
|
||||
public class OIDCController : Controller
|
||||
{
|
||||
/// <summary>
|
||||
/// pass the oidc code to frontend
|
||||
/// </summary>
|
||||
/// <param name="code"></param>
|
||||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
public IActionResult Index(string code)
|
||||
{
|
||||
return Redirect("http://localhost:8000/ui/#/oidc/login?code=" + code);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -42,8 +42,8 @@
|
||||
},
|
||||
"OIDC": {
|
||||
"clientId": "64a925a9642cc515dceccdfb",
|
||||
"clientSecret": "e7c908f12ff64ab35de93bbd6973f5ed",
|
||||
"redirectUri": "http://localhost:5000/home/oidc",
|
||||
"clientSecret": "",
|
||||
"redirectUri": "http://localhost:5000/oidc",
|
||||
"tokenEndpoint": "https://agileconfig.authing.cn/oidc/token",
|
||||
"authorizationEndpoint": "https://agileconfig.authing.cn"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user