黑道世家的半路新娘,有阴气动漫网,实践论 读后感
具体实现:
1,添加SingleSingOn.cs(这个cs文件可以网上下载,然后SSOHost更改为自己的地址)
2,Controller中添加Login方法:
SingleSingOn sso = new SingleSingOn();// New a sso object
public ActionResult Login()
{
string identity = sso.SignIn(); //如果登陆成功,返回工号
if (identity != null)
{
return RedirectToAction("Index"); //登陆成功跳转到Index页面
}
else
{
return RedirectToAction("Login"); //登陆失败,返回登录页面
}
}
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
Net Core Web Api项目与在NginX下发布的方法
asp.net core3.1 引用的元包dll版本兼容性问题解决方案
IdentityServer4实现.Net Core API接口权限认证(快速入门)
ASP.NET Core MVC通过IViewLocationExpander扩展视图搜索路径的实现
网友评论