mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-11-09 02:44:44 +08:00
修改部分文件结构,完善第三方登陆功能
This commit is contained in:
@@ -14,7 +14,7 @@ namespace OpenAuth.WebTest.Controllers
|
||||
[HttpPost]
|
||||
public ActionResult Index(string username, string password)
|
||||
{
|
||||
var result = AuthUtil.Login("670b14728ad9902aecba32e22fa4f6bd", username, password);
|
||||
var result = AuthUtil.Login("openauth", username, password);
|
||||
if (result.Success)
|
||||
return Redirect("/home/index?Token=" + result.Token);
|
||||
else
|
||||
|
||||
@@ -5,12 +5,16 @@
|
||||
}
|
||||
|
||||
<h2>OpenAuth.net测试站点登陆</h2>
|
||||
<div class="col-lg-12">
|
||||
@if (Model != null && !Model.Success)
|
||||
{
|
||||
<span class="alert alert-danger">@Model.ErrorMsg</span>
|
||||
}
|
||||
</div>
|
||||
|
||||
|
||||
@if (Model != null && !Model.Success)
|
||||
{
|
||||
<div class="alert alert-danger">
|
||||
<a href="#" class="close" data-dismiss="alert">×</a>
|
||||
<strong>Warning!</strong> @Model.ErrorMsg
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="col-lg-12">
|
||||
<form class="form-horizontal" method="POST">
|
||||
<div class="control-group">
|
||||
@@ -31,6 +35,7 @@
|
||||
<input type="checkbox"> Remember me
|
||||
</label>
|
||||
<button type="submit" class="btn btn-primary">登陆</button>
|
||||
<a href="http://localhost:52789/SSO/Login?appkey=openauthtest">或者使用OpenAuth.net第三方登陆功能</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -13,9 +13,7 @@
|
||||
<!--SSO单点登录主域-->
|
||||
<add key="SSOPassport" value="http://localhost:52789" />
|
||||
<!--AppKey唯一标识-->
|
||||
<add key="SSOAppKey" value="670b14728ad9902aecba32e22fa4f6bd" />
|
||||
<!--AppSecret安全私钥(未启用)-->
|
||||
<add key="SSOAppSecret" value="670b14728ad9902aecba32e22fa4f6bd" />
|
||||
<add key="SSOAppKey" value="openauthtest" />
|
||||
|
||||
<add key="OpenAuthURL" value="http://localhost:56813" />
|
||||
</appSettings>
|
||||
|
||||
Reference in New Issue
Block a user