update icon

This commit is contained in:
yubaolee@163.com 2018-05-03 17:26:23 +08:00
parent 9bcf88f405
commit 1c389af7b1
5 changed files with 87 additions and 86 deletions

View File

@ -182,6 +182,7 @@
<Content Include="images\login\logo.png" />
<Content Include="images\login\right_hand.png" />
<Content Include="images\login\tou.png" />
<Content Include="images\logo.png" />
<Content Include="js\bootstrap.js" />
<Content Include="js\flow\config.js" />
<Content Include="js\flow\fonts\demo.css" />

View File

@ -24,7 +24,7 @@
</div>
<div class="logintop">
<span>OpenAuth.Net</span>
<img src="/images/logo.png" style="width: 230px" />
<ul>
<li><a href="http://www.firefox.com.cn/download/" target="_blank"><b><font color="#FFF">推荐Firefox浏览器</font></b></a></li>
</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

View File

@ -1,54 +1,54 @@
// ***********************************************************************
// Assembly : OpenAuth.WebApi
// Author : yubaolee
// Created : 07-11-2016
//
// Last Modified By : yubaolee
// Last Modified On : 07-11-2016
// Contact :
// File: CheckController.cs
// ***********************************************************************
using System;
using System.Web.Http;
using Infrastructure;
using Infrastructure.Cache;
using OpenAuth.App;
using OpenAuth.App.SSO;
using OpenAuth.App.Response;
namespace OpenAuth.WebApi.Areas.SSO.Controllers
{
/// <summary>
/// sso验证
/// <para>其他站点通过后台Post来认证</para>
/// <para>或使用静态类OpenAuth.App.SSO.AuthUtil访问</para>
/// </summary>
public class CheckController : ApiController
{
public AuthorizeApp _app { get; set; }
private ObjCacheProvider<UserAuthSession> _objCacheProvider = new ObjCacheProvider<UserAuthSession>();
/// <summary>
/// 检验token是否有效
/// </summary>
/// <param name="token">The token.</param>
/// <param name="requestid">备用参数.</param>
[System.Web.Mvc.HttpGet]
public Response<bool> GetStatus(string token, string requestid = "")
{
var result = new Response<bool>();
try
{
result.Result = _objCacheProvider.GetCache(token) != null;
// ***********************************************************************
// Assembly : OpenAuth.WebApi
// Author : yubaolee
// Created : 07-11-2016
//
// Last Modified By : yubaolee
// Last Modified On : 07-11-2016
// Contact :
// File: CheckController.cs
// ***********************************************************************
using System;
using System.Web.Http;
using Infrastructure;
using Infrastructure.Cache;
using OpenAuth.App;
using OpenAuth.App.SSO;
using OpenAuth.App.Response;
namespace OpenAuth.WebApi.Areas.SSO.Controllers
{
/// <summary>
/// sso验证
/// <para>其他站点通过后台Post来认证</para>
/// <para>或使用静态类OpenAuth.App.SSO.AuthUtil访问</para>
/// </summary>
public class CheckController : ApiController
{
public AuthorizeApp _app { get; set; }
private ObjCacheProvider<UserAuthSession> _objCacheProvider = new ObjCacheProvider<UserAuthSession>();
/// <summary>
/// 检验token是否有效
/// </summary>
/// <param name="token">The token.</param>
/// <param name="requestid">备用参数.</param>
[System.Web.Mvc.HttpGet]
public Response<bool> GetStatus(string token, string requestid = "")
{
var result = new Response<bool>();
try
{
result.Result = _objCacheProvider.GetCache(token) != null;
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.Message;
}
return result;
}
return result;
}
/// <summary>
@ -56,11 +56,11 @@ namespace OpenAuth.WebApi.Areas.SSO.Controllers
/// </summary>
/// <param name="token"></param>
/// <param name="requestid">备用参数.</param>
[System.Web.Mvc.HttpGet]
public Response<UserWithAccessedCtrls> GetUser(string token, string requestid = "")
{
var result = new Response<UserWithAccessedCtrls>();
try
[System.Web.Mvc.HttpGet]
public Response<UserWithAccessedCtrls> GetUser(string token, string requestid = "")
{
var result = new Response<UserWithAccessedCtrls>();
try
{
var user = _objCacheProvider.GetCache(token);
if (user != null)
@ -71,9 +71,9 @@ namespace OpenAuth.WebApi.Areas.SSO.Controllers
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.Message;
}
result.Message ="OpenAuth.WebAPI数据库访问失败:" + ex.Message;
}
return result;
}
@ -83,37 +83,37 @@ namespace OpenAuth.WebApi.Areas.SSO.Controllers
/// </summary>
/// <param name="token"></param>
/// <param name="requestid">备用参数.</param>
[System.Web.Mvc.HttpGet]
public Response<string> GetUserName(string token, string requestid = "")
{
var result = new Response<string>();
try
[System.Web.Mvc.HttpGet]
public Response<string> GetUserName(string token, string requestid = "")
{
var result = new Response<string>();
try
{
var user = _objCacheProvider.GetCache(token);
if (user != null)
{
result.Result = user.Account;
}
}
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.Message;
}
return result;
}
}
return result;
}
/// <summary>
/// 登录接口
/// </summary>
/// <param name="request">登录参数</param>
/// <returns></returns>
[System.Web.Mvc.HttpPost]
public LoginResult Login(PassportLoginRequest request)
[System.Web.Mvc.HttpPost]
public LoginResult Login(PassportLoginRequest request)
{
var result = new LoginResult();
try
var result = new LoginResult();
try
{
result = SSOAuthUtil.Parse(request);
}
@ -121,8 +121,8 @@ namespace OpenAuth.WebApi.Areas.SSO.Controllers
{
result.Code = 500;
result.Message = ex.Message;
}
}
return result;
}
@ -131,18 +131,18 @@ namespace OpenAuth.WebApi.Areas.SSO.Controllers
/// </summary>
/// <param name="token"></param>
/// <param name="requestid">备用参数.</param>
[System.Web.Mvc.HttpPost]
public bool Logout(string token, string requestid = "")
{
try
{
_objCacheProvider.Remove(token);
return true;
}
catch (Exception)
{
return false;
}
}
}
[System.Web.Mvc.HttpPost]
public bool Logout(string token, string requestid = "")
{
try
{
_objCacheProvider.Remove(token);
return true;
}
catch (Exception)
{
return false;
}
}
}
}