-
Notifications
You must be signed in to change notification settings - Fork 540
/
Copy pathXummAuthenticationOptions.cs
34 lines (27 loc) · 1.23 KB
/
XummAuthenticationOptions.cs
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
33
34
/*
* Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
* See https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers
* for more information concerning the license and the contributors participating to this project.
*/
using System.Security.Claims;
using static AspNet.Security.OAuth.Xumm.XummAuthenticationConstants;
namespace AspNet.Security.OAuth.Xumm;
/// <summary>
/// Defines a set of options used by <see cref="XummAuthenticationHandler"/>.
/// </summary>
public class XummAuthenticationOptions : OAuthOptions
{
public XummAuthenticationOptions()
{
ClaimsIssuer = XummAuthenticationDefaults.Issuer;
CallbackPath = XummAuthenticationDefaults.CallbackPath;
AuthorizationEndpoint = XummAuthenticationDefaults.AuthorizationEndpoint;
TokenEndpoint = XummAuthenticationDefaults.TokenEndpoint;
UserInformationEndpoint = XummAuthenticationDefaults.UserInformationEndpoint;
UsePkce = true;
ClaimActions.MapJsonKey(ClaimTypes.NameIdentifier, "sub");
ClaimActions.MapJsonKey(ClaimTypes.Email, "email");
ClaimActions.MapJsonKey(ClaimTypes.Name, "name");
ClaimActions.MapJsonKey(Claims.Picture, "picture");
}
}