zhaolei
8 days ago 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
28
29
30
31
32
using Prow.OAuth;
using Microsoft.AspNetCore.Authentication.OAuth.Claims;
using System.Security.Claims;
 
namespace Prow.AlipayAuth
{
    /// <summary>
    /// Gitee 认证配置实体类
    /// </summary>
    public class AlipayOptions : LgbOAuthOptions
    {
        /// <summary>
        /// 获得/设置 Alipay Sign 私钥
        /// </summary>
        public string SignKey { get; set; } = "";
 
        /// <summary>
        /// 构造函数
        /// </summary>
        public AlipayOptions() : base()
        {
            AuthorizationEndpoint = AlipayDefaults.AuthorizationEndpoint;
            TokenEndpoint = AlipayDefaults.TokenEndpoint;
            UserInformationEndpoint = AlipayDefaults.UserInformationEndpoint;
            HomePath = AlipayDefaults.HomePath;
 
            // 设置登陆信息
            ClaimActions.Remove(ClaimTypes.Name);
            ClaimActions.Add(new JsonKeyClaimAction(ClaimTypes.Name, ClaimValueTypes.String, "user_id"));
        }
    }
}