修改部分文件结构,完善第三方登陆功能

This commit is contained in:
yubaolee
2016-07-12 12:28:54 +08:00
parent 994ab81ebb
commit 5f08a59f27
45 changed files with 10078 additions and 246 deletions

View File

@@ -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

View File

@@ -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">&times;</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>

View File

@@ -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>