mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-05-10 07:38:01 +08:00
21 lines
497 B
C#
21 lines
497 B
C#
![]() |
using Microsoft.AspNetCore.Authorization;
|
|||
|
using Microsoft.AspNetCore.Mvc;
|
|||
|
|
|||
|
namespace OpenAuth.Mvc.Controllers
|
|||
|
{
|
|||
|
public class RedirectsController : Controller
|
|||
|
{
|
|||
|
/// <summary>
|
|||
|
/// oauth认证跳转页面
|
|||
|
/// </summary>
|
|||
|
/// <returns></returns>
|
|||
|
[Authorize]
|
|||
|
public ActionResult IdentityAuth()
|
|||
|
{
|
|||
|
if (User.Identity.IsAuthenticated)
|
|||
|
return Redirect("/Home/Index");
|
|||
|
return View();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|