46 lines
1.5 KiB
C#
46 lines
1.5 KiB
C#
|
|
/*
|
|||
|
|
<xml>
|
|||
|
|
<AppId>第三方平台appid</AppId>
|
|||
|
|
<CreateTime>1413192760</CreateTime>
|
|||
|
|
<InfoType>authorized</InfoType>
|
|||
|
|
<AuthorizerAppid>公众号appid</AuthorizerAppid>
|
|||
|
|
<AuthorizationCode>授权码(code)</AuthorizationCode>
|
|||
|
|
<AuthorizationCodeExpiredTime>过期时间</AuthorizationCodeExpiredTime>
|
|||
|
|
</xml>
|
|||
|
|
*/
|
|||
|
|
using System;
|
|||
|
|
using System.Xml.Linq;
|
|||
|
|
|
|||
|
|
namespace Hncore.Wx.Open
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
/// 授权成功通知
|
|||
|
|
/// </summary>
|
|||
|
|
public class MessageAuthorized : MessageOpenBase
|
|||
|
|
{
|
|||
|
|
public MessageAuthorized(XDocument doc) : base(doc)
|
|||
|
|
{
|
|||
|
|
this.AuthorizerAppid = doc.Root.Element("AuthorizerAppid").Value;
|
|||
|
|
this.AuthorizationCode = doc.Root.Element("AuthorizationCode").Value;
|
|||
|
|
this.AuthorizationCodeExpiredTime = DateTimeOffset.Parse(doc.Root.Element("AuthorizationCodeExpiredTime").Value);
|
|||
|
|
}
|
|||
|
|
public override RequestInfoType InfoType
|
|||
|
|
{
|
|||
|
|
get { return RequestInfoType.authorized; }
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 公众号appid
|
|||
|
|
/// </summary>
|
|||
|
|
public string AuthorizerAppid { get; set; }
|
|||
|
|
/// <summary>
|
|||
|
|
/// 授权码(code)
|
|||
|
|
/// </summary>
|
|||
|
|
public string AuthorizationCode { get; set; }
|
|||
|
|
/// <summary>
|
|||
|
|
/// 过期时间
|
|||
|
|
/// </summary>
|
|||
|
|
public DateTimeOffset AuthorizationCodeExpiredTime { get; set; }
|
|||
|
|
}
|
|||
|
|
}
|