zhaolei
2020-11-20 921de2254ff5712a44ed8575ee8efe34252f6603
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using Prow.OAuth;
using Microsoft.AspNetCore.Authentication.OAuth.Claims;
using System.Security.Claims;
 
namespace Prow.WeChatAuth
{
    /// <summary>
    /// Gitee 认证配置实体类
    /// </summary>
    public class WeChatOptions : LgbOAuthOptions
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        public WeChatOptions() : base()
        {
            AuthorizationEndpoint = WeChatDefaults.AuthorizationEndpoint;
            TokenEndpoint = WeChatDefaults.TokenEndpoint;
            UserInformationEndpoint = WeChatDefaults.UserInformationEndpoint;
            HomePath = WeChatDefaults.HomePath;
 
            // 设置登陆信息
            ClaimActions.Remove(ClaimTypes.Name);
            ClaimActions.Add(new JsonKeyClaimAction(ClaimTypes.Name, ClaimValueTypes.String, "unionid"));
        }
    }
}