mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-07-15 05:13:25 +08:00
update icon
This commit is contained in:
parent
9bcf88f405
commit
1c389af7b1
@ -182,6 +182,7 @@
|
|||||||
<Content Include="images\login\logo.png" />
|
<Content Include="images\login\logo.png" />
|
||||||
<Content Include="images\login\right_hand.png" />
|
<Content Include="images\login\right_hand.png" />
|
||||||
<Content Include="images\login\tou.png" />
|
<Content Include="images\login\tou.png" />
|
||||||
|
<Content Include="images\logo.png" />
|
||||||
<Content Include="js\bootstrap.js" />
|
<Content Include="js\bootstrap.js" />
|
||||||
<Content Include="js\flow\config.js" />
|
<Content Include="js\flow\config.js" />
|
||||||
<Content Include="js\flow\fonts\demo.css" />
|
<Content Include="js\flow\fonts\demo.css" />
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="logintop">
|
<div class="logintop">
|
||||||
<span>OpenAuth.Net</span>
|
<img src="/images/logo.png" style="width: 230px" />
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="http://www.firefox.com.cn/download/" target="_blank"><b><font color="#FFF">推荐Firefox浏览器</font></b></a></li>
|
<li><a href="http://www.firefox.com.cn/download/" target="_blank"><b><font color="#FFF">推荐Firefox浏览器</font></b></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 4.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 39 KiB |
@ -1,54 +1,54 @@
|
|||||||
// ***********************************************************************
|
// ***********************************************************************
|
||||||
// Assembly : OpenAuth.WebApi
|
// Assembly : OpenAuth.WebApi
|
||||||
// Author : yubaolee
|
// Author : yubaolee
|
||||||
// Created : 07-11-2016
|
// Created : 07-11-2016
|
||||||
//
|
//
|
||||||
// Last Modified By : yubaolee
|
// Last Modified By : yubaolee
|
||||||
// Last Modified On : 07-11-2016
|
// Last Modified On : 07-11-2016
|
||||||
// Contact :
|
// Contact :
|
||||||
// File: CheckController.cs
|
// File: CheckController.cs
|
||||||
// ***********************************************************************
|
// ***********************************************************************
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Web.Http;
|
using System.Web.Http;
|
||||||
using Infrastructure;
|
using Infrastructure;
|
||||||
using Infrastructure.Cache;
|
using Infrastructure.Cache;
|
||||||
using OpenAuth.App;
|
using OpenAuth.App;
|
||||||
using OpenAuth.App.SSO;
|
using OpenAuth.App.SSO;
|
||||||
using OpenAuth.App.Response;
|
using OpenAuth.App.Response;
|
||||||
|
|
||||||
namespace OpenAuth.WebApi.Areas.SSO.Controllers
|
namespace OpenAuth.WebApi.Areas.SSO.Controllers
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// sso验证
|
/// sso验证
|
||||||
/// <para>其他站点通过后台Post来认证</para>
|
/// <para>其他站点通过后台Post来认证</para>
|
||||||
/// <para>或使用静态类OpenAuth.App.SSO.AuthUtil访问</para>
|
/// <para>或使用静态类OpenAuth.App.SSO.AuthUtil访问</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class CheckController : ApiController
|
public class CheckController : ApiController
|
||||||
{
|
{
|
||||||
public AuthorizeApp _app { get; set; }
|
public AuthorizeApp _app { get; set; }
|
||||||
private ObjCacheProvider<UserAuthSession> _objCacheProvider = new ObjCacheProvider<UserAuthSession>();
|
private ObjCacheProvider<UserAuthSession> _objCacheProvider = new ObjCacheProvider<UserAuthSession>();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 检验token是否有效
|
/// 检验token是否有效
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="token">The token.</param>
|
/// <param name="token">The token.</param>
|
||||||
/// <param name="requestid">备用参数.</param>
|
/// <param name="requestid">备用参数.</param>
|
||||||
[System.Web.Mvc.HttpGet]
|
[System.Web.Mvc.HttpGet]
|
||||||
public Response<bool> GetStatus(string token, string requestid = "")
|
public Response<bool> GetStatus(string token, string requestid = "")
|
||||||
{
|
{
|
||||||
var result = new Response<bool>();
|
var result = new Response<bool>();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
result.Result = _objCacheProvider.GetCache(token) != null;
|
result.Result = _objCacheProvider.GetCache(token) != null;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
result.Code = 500;
|
result.Code = 500;
|
||||||
result.Message = ex.Message;
|
result.Message = ex.Message;
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -56,11 +56,11 @@ namespace OpenAuth.WebApi.Areas.SSO.Controllers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="token"></param>
|
/// <param name="token"></param>
|
||||||
/// <param name="requestid">备用参数.</param>
|
/// <param name="requestid">备用参数.</param>
|
||||||
[System.Web.Mvc.HttpGet]
|
[System.Web.Mvc.HttpGet]
|
||||||
public Response<UserWithAccessedCtrls> GetUser(string token, string requestid = "")
|
public Response<UserWithAccessedCtrls> GetUser(string token, string requestid = "")
|
||||||
{
|
{
|
||||||
var result = new Response<UserWithAccessedCtrls>();
|
var result = new Response<UserWithAccessedCtrls>();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var user = _objCacheProvider.GetCache(token);
|
var user = _objCacheProvider.GetCache(token);
|
||||||
if (user != null)
|
if (user != null)
|
||||||
@ -71,9 +71,9 @@ namespace OpenAuth.WebApi.Areas.SSO.Controllers
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
result.Code = 500;
|
result.Code = 500;
|
||||||
result.Message = ex.Message;
|
result.Message ="OpenAuth.WebAPI数据库访问失败:" + ex.Message;
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -83,37 +83,37 @@ namespace OpenAuth.WebApi.Areas.SSO.Controllers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="token"></param>
|
/// <param name="token"></param>
|
||||||
/// <param name="requestid">备用参数.</param>
|
/// <param name="requestid">备用参数.</param>
|
||||||
[System.Web.Mvc.HttpGet]
|
[System.Web.Mvc.HttpGet]
|
||||||
public Response<string> GetUserName(string token, string requestid = "")
|
public Response<string> GetUserName(string token, string requestid = "")
|
||||||
{
|
{
|
||||||
var result = new Response<string>();
|
var result = new Response<string>();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var user = _objCacheProvider.GetCache(token);
|
var user = _objCacheProvider.GetCache(token);
|
||||||
if (user != null)
|
if (user != null)
|
||||||
{
|
{
|
||||||
result.Result = user.Account;
|
result.Result = user.Account;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
result.Code = 500;
|
result.Code = 500;
|
||||||
result.Message = ex.Message;
|
result.Message = ex.Message;
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 登录接口
|
/// 登录接口
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="request">登录参数</param>
|
/// <param name="request">登录参数</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[System.Web.Mvc.HttpPost]
|
[System.Web.Mvc.HttpPost]
|
||||||
public LoginResult Login(PassportLoginRequest request)
|
public LoginResult Login(PassportLoginRequest request)
|
||||||
{
|
{
|
||||||
var result = new LoginResult();
|
var result = new LoginResult();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
result = SSOAuthUtil.Parse(request);
|
result = SSOAuthUtil.Parse(request);
|
||||||
}
|
}
|
||||||
@ -121,8 +121,8 @@ namespace OpenAuth.WebApi.Areas.SSO.Controllers
|
|||||||
{
|
{
|
||||||
result.Code = 500;
|
result.Code = 500;
|
||||||
result.Message = ex.Message;
|
result.Message = ex.Message;
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -131,18 +131,18 @@ namespace OpenAuth.WebApi.Areas.SSO.Controllers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="token"></param>
|
/// <param name="token"></param>
|
||||||
/// <param name="requestid">备用参数.</param>
|
/// <param name="requestid">备用参数.</param>
|
||||||
[System.Web.Mvc.HttpPost]
|
[System.Web.Mvc.HttpPost]
|
||||||
public bool Logout(string token, string requestid = "")
|
public bool Logout(string token, string requestid = "")
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_objCacheProvider.Remove(token);
|
_objCacheProvider.Remove(token);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user