DTcms.API/DTcms.API.OAuth/oauth_helper.cs

(完整代码) 919B

using DTcms.BLL;
using DTcms.Model;
using System;
using System.Web;

namespace DTcms.API.OAuth
{
	public class oauth_helper
	{
		public static oauth_config get_config(string oauth_name)
		{
			DTcms.Model.user_oauth_app model = new DTcms.BLL.user_oauth_app().GetModel(oauth_name);
			oauth_config result;
			if (model != null)
			{
				DTcms.Model.siteconfig siteConfig = new DTcms.BLL.siteconfig().loadConfig();
				result = new oauth_config
				{
					oauth_name = model.api_path.Trim(),
					oauth_app_id = model.app_id.Trim(),
					oauth_app_key = model.app_key.Trim(),
					return_uri = string.Concat(new string[]
					{
						"http://",
						HttpContext.Current.Request.Url.Authority.ToLower(),
						siteConfig.webpath,
						"api/oauth/",
						model.api_path,
						"/return_url.aspx"
					})
				};
			}
			else
			{
				result = null;
			}
			return result;
		}
	}
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。