Skip to content

Commit 26d4c6d

Browse files
authored
Add Miro provider (#1046)
Add Miro provider.
1 parent 9c3cf46 commit 26d4c6d

12 files changed

+368
-0
lines changed

AspNet.Security.OAuth.Providers.sln

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{C2CA4B38-A
221221
docs\workweixin.md = docs\workweixin.md
222222
docs\xumm.md = docs\xumm.md
223223
docs\zendesk.md = docs\zendesk.md
224+
docs\miro.md = docs\miro.md
224225
docs\linear.md = docs\linear.md
225226
EndProjectSection
226227
EndProject
@@ -319,6 +320,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AspNet.Security.OAuth.GitCo
319320
EndProject
320321
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AspNet.Security.OAuth.Atlassian", "src\AspNet.Security.OAuth.Atlassian\AspNet.Security.OAuth.Atlassian.csproj", "{D2110C1B-6FE1-4D9A-81ED-93FB2AC85049}"
321322
EndProject
323+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AspNet.Security.OAuth.Miro", "src\AspNet.Security.OAuth.Miro\AspNet.Security.OAuth.Miro.csproj", "{7F22DE22-FDE8-4A14-AA65-D5B36098533E}"
324+
EndProject
322325
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AspNet.Security.OAuth.Linear", "src\AspNet.Security.OAuth.Linear\AspNet.Security.OAuth.Linear.csproj", "{B1167108-CA36-4C6B-85B0-1C7F5A24E4A4}"
323326
EndProject
324327
Global
@@ -743,6 +746,10 @@ Global
743746
{D2110C1B-6FE1-4D9A-81ED-93FB2AC85049}.Debug|Any CPU.Build.0 = Debug|Any CPU
744747
{D2110C1B-6FE1-4D9A-81ED-93FB2AC85049}.Release|Any CPU.ActiveCfg = Release|Any CPU
745748
{D2110C1B-6FE1-4D9A-81ED-93FB2AC85049}.Release|Any CPU.Build.0 = Release|Any CPU
749+
{7F22DE22-FDE8-4A14-AA65-D5B36098533E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
750+
{7F22DE22-FDE8-4A14-AA65-D5B36098533E}.Debug|Any CPU.Build.0 = Debug|Any CPU
751+
{7F22DE22-FDE8-4A14-AA65-D5B36098533E}.Release|Any CPU.ActiveCfg = Release|Any CPU
752+
{7F22DE22-FDE8-4A14-AA65-D5B36098533E}.Release|Any CPU.Build.0 = Release|Any CPU
746753
{B1167108-CA36-4C6B-85B0-1C7F5A24E4A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
747754
{B1167108-CA36-4C6B-85B0-1C7F5A24E4A4}.Debug|Any CPU.Build.0 = Debug|Any CPU
748755
{B1167108-CA36-4C6B-85B0-1C7F5A24E4A4}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -862,6 +869,7 @@ Global
862869
{F3E62C24-5F82-4CF5-A994-0E10D04FB495} = {C1352FD3-AE8B-43EE-B45B-F6E0B3FBAC6D}
863870
{668833D5-DB6A-475F-B0FD-A03462B037B8} = {C1352FD3-AE8B-43EE-B45B-F6E0B3FBAC6D}
864871
{D2110C1B-6FE1-4D9A-81ED-93FB2AC85049} = {C1352FD3-AE8B-43EE-B45B-F6E0B3FBAC6D}
872+
{7F22DE22-FDE8-4A14-AA65-D5B36098533E} = {C1352FD3-AE8B-43EE-B45B-F6E0B3FBAC6D}
865873
{B1167108-CA36-4C6B-85B0-1C7F5A24E4A4} = {C1352FD3-AE8B-43EE-B45B-F6E0B3FBAC6D}
866874
EndGlobalSection
867875
GlobalSection(ExtensibilityGlobals) = postSolution

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ If a provider you're looking for does not exist, consider making a PR to add one
205205
| LinkedIn | [![NuGet](https://img.shields.io/nuget/v/AspNet.Security.OAuth.LinkedIn?logo=nuget&label=NuGet&color=blue)](https://www.nuget.org/packages/AspNet.Security.OAuth.LinkedIn/ "Download AspNet.Security.OAuth.LinkedIn from NuGet.org") | [![MyGet](https://img.shields.io/myget/aspnet-contrib/vpre/AspNet.Security.OAuth.LinkedIn?logo=nuget&label=MyGet&color=blue)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OAuth.LinkedIn "Download AspNet.Security.OAuth.LinkedIn from MyGet.org") | [Documentation](https://docs.microsoft.com/en-us/linkedin/shared/authentication/authentication "LinkedIn developer documentation") |
206206
| MailChimp | [![NuGet](https://img.shields.io/nuget/v/AspNet.Security.OAuth.MailChimp?logo=nuget&label=NuGet&color=blue)](https://www.nuget.org/packages/AspNet.Security.OAuth.MailChimp/ "Download AspNet.Security.OAuth.MailChimp from NuGet.org") | [![MyGet](https://img.shields.io/myget/aspnet-contrib/vpre/AspNet.Security.OAuth.MailChimp?logo=nuget&label=MyGet&color=blue)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OAuth.MailChimp "Download AspNet.Security.OAuth.MailChimp from MyGet.org") | [Documentation](https://developer.mailchimp.com/documentation/mailchimp/guides/how-to-use-oauth2/ "MailChimp developer documentation") |
207207
| MailRu | [![NuGet](https://img.shields.io/nuget/v/AspNet.Security.OAuth.MailRu?logo=nuget&label=NuGet&color=blue)](https://www.nuget.org/packages/AspNet.Security.OAuth.MailRu/ "Download AspNet.Security.OAuth.MailRu from NuGet.org") | [![MyGet](https://img.shields.io/myget/aspnet-contrib/vpre/AspNet.Security.OAuth.MailRu?logo=nuget&label=MyGet&color=blue)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OAuth.MailRu "Download AspNet.Security.OAuth.MailRu from MyGet.org") | [Documentation](https://o2.mail.ru/docs#web "MailRu developer documentation") |
208+
| Miro | [![NuGet](https://img.shields.io/nuget/v/AspNet.Security.OAuth.Miro?logo=nuget&label=NuGet&color=blue)](https://www.nuget.org/packages/AspNet.Security.OAuth.Miro/ "Download AspNet.Security.OAuth.Miro from NuGet.org") | [![MyGet](https://img.shields.io/myget/aspnet-contrib/vpre/AspNet.Security.OAuth.Miro?logo=nuget&label=MyGet&color=blue)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OAuth.Miro "Download AspNet.Security.OAuth.Miro from MyGet.org") | [Documentation](https://developers.miro.com/docs/getting-started-with-oauth "Miro developer documentation") |
208209
| Mixcloud | [![NuGet](https://img.shields.io/nuget/v/AspNet.Security.OAuth.Mixcloud?logo=nuget&label=NuGet&color=blue)](https://www.nuget.org/packages/AspNet.Security.OAuth.Mixcloud/ "Download AspNet.Security.OAuth.Mixcloud from NuGet.org") | [![MyGet](https://img.shields.io/myget/aspnet-contrib/vpre/AspNet.Security.OAuth.Mixcloud?logo=nuget&label=MyGet&color=blue)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OAuth.Mixcloud "Download AspNet.Security.OAuth.Mixcloud from MyGet.org") | [Documentation](https://www.mixcloud.com/developers/#authorization "Mixcloud developer documentation") |
209210
| Moodle | [![NuGet](https://img.shields.io/nuget/v/AspNet.Security.OAuth.Moodle?logo=nuget&label=NuGet&color=blue)](https://www.nuget.org/packages/AspNet.Security.OAuth.Moodle/ "Download AspNet.Security.OAuth.Moodle from NuGet.org") | [![MyGet](https://img.shields.io/myget/aspnet-contrib/vpre/AspNet.Security.OAuth.Moodle?logo=nuget&label=MyGet&color=blue)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OAuth.Moodle "Download AspNet.Security.OAuth.Moodle from MyGet.org") | [Documentation](https://github.com/HIT-ReFreSH/moodle-local_oauth "Moodle OAuth2 plugin developer documentation") |
210211
| Myob | [![NuGet](https://img.shields.io/nuget/v/AspNet.Security.OAuth.Myob?logo=nuget&label=NuGet&color=blue)](https://www.nuget.org/packages/AspNet.Security.OAuth.Myob/ "Download AspNet.Security.OAuth.Myob from NuGet.org") | [![MyGet](https://img.shields.io/myget/aspnet-contrib/vpre/AspNet.Security.OAuth.Myob?logo=nuget&label=MyGet&color=blue)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OAuth.Myob "Download AspNet.Security.OAuth.Myob from MyGet.org") | [Documentation](https://developer.myob.com/api/accountright/api-overview/authentication/ "Myob developer documentation") |

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ covered by the section above.
6161
| Line | _Optional_ | [Documentation](line.md "Line provider documentation") |
6262
| Linear | _Optional_ | [Documentation](linear.md "Linear provider documentation") |
6363
| LinkedIn | _Optional_ | [Documentation](linkedin.md "LinkedIn provider documentation") |
64+
| Miro | _Optional_ | [Documentation](miro.md "Miro provider documentation") |
6465
| Odnoklassniki | _Optional_ | [Documentation](odnoklassniki.md "Odnoklassniki provider documentation") |
6566
| Okta | **Required** | [Documentation](okta.md "Okta provider documentation") |
6667
| Patreon | _Optional_ | [Documentation](patreon.md "Patreon provider documentation") |

docs/miro.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Integrating the Miro Provider
2+
3+
## Example
4+
5+
```csharp
6+
services.AddAuthentication(options => /* Auth configuration */)
7+
.AddMiro(options =>
8+
{
9+
options.ClientId = configuration["Miro:ClientId"] ?? string.Empty;
10+
options.ClientSecret = configuration["Miro:ClientSecret"] ?? string.Empty;
11+
})
12+
```
13+
14+
## Required Additional Settings
15+
16+
_None._
17+
18+
## Optional Settings
19+
20+
_None._
21+
22+
## Retrieving the user's email address
23+
24+
The Miro provider does not return the user's email address, since the API endpoints to do that is available only on the Miro Enterprise plan. If you are on the Miro Enterprise plan, you can use the access token returned by the authentication flow to retrieve the user's email address yourself by following the Miro documentation for [getting the user info and email](https://developers.miro.com/docs/get-user-info-and-email).
25+
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<PackageValidationBaselineVersion>9.2.0</PackageValidationBaselineVersion>
5+
<!-- TODO Remove once published to NuGet.org -->
6+
<DisablePackageBaselineValidation>true</DisablePackageBaselineValidation>
7+
<TargetFrameworks>$(DefaultNetCoreTargetFramework)</TargetFrameworks>
8+
</PropertyGroup>
9+
10+
<PropertyGroup>
11+
<Description>ASP.NET Core security middleware enabling Miro authentication.</Description>
12+
<Authors>Jerrie Pelser</Authors>
13+
<PackageTags>aspnetcore;authentication;miro;oauth;security</PackageTags>
14+
</PropertyGroup>
15+
16+
<ItemGroup>
17+
<FrameworkReference Include="Microsoft.AspNetCore.App" />
18+
<PackageReference Include="JetBrains.Annotations" PrivateAssets="All" />
19+
</ItemGroup>
20+
21+
</Project>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
3+
* See https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers
4+
* for more information concerning the license and the contributors participating to this project.
5+
*/
6+
7+
namespace AspNet.Security.OAuth.Miro;
8+
9+
/// <summary>
10+
/// Contains constants specific to the <see cref="MiroAuthenticationHandler"/>.
11+
/// </summary>
12+
public static class MiroAuthenticationConstants
13+
{
14+
public static class Claims
15+
{
16+
public const string OrganizationId = "urn:miro:organization_id";
17+
18+
public const string OrganizationName = "urn:miro:organization_name";
19+
20+
public const string TeamId = "urn:miro:team_id";
21+
22+
public const string TeamName = "urn:miro:team_name";
23+
}
24+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
3+
* See https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers
4+
* for more information concerning the license and the contributors participating to this project.
5+
*/
6+
7+
namespace AspNet.Security.OAuth.Miro;
8+
9+
/// <summary>
10+
/// Default values used by the Miro authentication middleware.
11+
/// </summary>
12+
public class MiroAuthenticationDefaults
13+
{
14+
/// <summary>
15+
/// Default value for <see cref="AuthenticationScheme.Name"/>.
16+
/// </summary>
17+
public const string AuthenticationScheme = "Miro";
18+
19+
/// <summary>
20+
/// Default value for <see cref="AuthenticationScheme.DisplayName"/>.
21+
/// </summary>
22+
public static readonly string DisplayName = "Miro";
23+
24+
/// <summary>
25+
/// Default value for <see cref="AuthenticationSchemeOptions.ClaimsIssuer"/>.
26+
/// </summary>
27+
public static readonly string Issuer = "Miro";
28+
29+
/// <summary>
30+
/// Default value for <see cref="RemoteAuthenticationOptions.CallbackPath"/>.
31+
/// </summary>
32+
public static readonly string CallbackPath = "/signin-miro";
33+
34+
/// <summary>
35+
/// Default value for <see cref="OAuthOptions.AuthorizationEndpoint"/>.
36+
/// </summary>
37+
public static readonly string AuthorizationEndpoint = "https://miro.com/oauth/authorize";
38+
39+
/// <summary>
40+
/// Default value for <see cref="OAuthOptions.TokenEndpoint"/>.
41+
/// </summary>
42+
public static readonly string TokenEndpointFormat = "https://api.miro.com/v1/oauth/token";
43+
44+
/// <summary>
45+
/// Default value <see cref="OAuthOptions.UserInformationEndpoint"/>.
46+
/// </summary>
47+
public static readonly string UserInformationEndpoint = "https://api.miro.com/v1/oauth-token";
48+
}
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
3+
* See https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers
4+
* for more information concerning the license and the contributors participating to this project.
5+
*/
6+
7+
using AspNet.Security.OAuth.Miro;
8+
9+
namespace Microsoft.Extensions.DependencyInjection;
10+
11+
public static class MiroAuthenticationExtensions
12+
{
13+
/// <summary>
14+
/// Adds <see cref="MiroAuthenticationHandler"/> to the specified
15+
/// <see cref="AuthenticationBuilder"/>, which enables Miro authentication capabilities.
16+
/// </summary>
17+
/// <param name="builder">The authentication builder.</param>
18+
/// <returns>A reference to this instance after the operation has completed.</returns>
19+
public static AuthenticationBuilder AddMiro([NotNull] this AuthenticationBuilder builder)
20+
{
21+
return builder.AddMiro(MiroAuthenticationDefaults.AuthenticationScheme, options => { });
22+
}
23+
24+
/// <summary>
25+
/// Adds <see cref="MiroAuthenticationHandler"/> to the specified
26+
/// <see cref="AuthenticationBuilder"/>, which enables Miro authentication capabilities.
27+
/// </summary>
28+
/// <param name="builder">The authentication builder.</param>
29+
/// <param name="configuration">The delegate used to configure the Miro authentication options.</param>
30+
/// <returns>A reference to this instance after the operation has completed.</returns>
31+
public static AuthenticationBuilder AddMiro(
32+
[NotNull] this AuthenticationBuilder builder,
33+
[NotNull] Action<MiroAuthenticationOptions> configuration)
34+
{
35+
return builder.AddMiro(MiroAuthenticationDefaults.AuthenticationScheme, configuration);
36+
}
37+
38+
/// <summary>
39+
/// Adds <see cref="AspNet.Security.OAuth.Miro.MiroAuthenticationHandler"/> to the specified
40+
/// <see cref="AuthenticationBuilder"/>, which enables Miro authentication capabilities.
41+
/// </summary>
42+
/// <param name="builder">The authentication builder.</param>
43+
/// <param name="scheme">The authentication scheme associated with this instance.</param>
44+
/// <param name="configuration">The delegate used to configure the Miro authentication options.</param>
45+
/// <returns>The <see cref="AuthenticationBuilder"/>.</returns>
46+
public static AuthenticationBuilder AddMiro(
47+
[NotNull] this AuthenticationBuilder builder,
48+
[NotNull] string scheme,
49+
[NotNull] Action<MiroAuthenticationOptions> configuration)
50+
{
51+
return builder.AddMiro(scheme, MiroAuthenticationDefaults.DisplayName, configuration);
52+
}
53+
54+
/// <summary>
55+
/// Adds <see cref="AspNet.Security.OAuth.Miro.MiroAuthenticationHandler"/> to the specified
56+
/// <see cref="AuthenticationBuilder"/>, which enables Miro authentication capabilities.
57+
/// </summary>
58+
/// <param name="builder">The authentication builder.</param>
59+
/// <param name="scheme">The authentication scheme associated with this instance.</param>
60+
/// <param name="caption">The optional display name associated with this instance.</param>
61+
/// <param name="configuration">The delegate used to configure the Miro authentication options.</param>
62+
/// <returns>The <see cref="AuthenticationBuilder"/>.</returns>
63+
public static AuthenticationBuilder AddMiro(
64+
[NotNull] this AuthenticationBuilder builder,
65+
[NotNull] string scheme,
66+
[NotNull] string caption,
67+
[NotNull] Action<MiroAuthenticationOptions> configuration)
68+
{
69+
return builder.AddOAuth<MiroAuthenticationOptions, MiroAuthenticationHandler>(scheme, caption, configuration);
70+
}
71+
}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
3+
* See https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers
4+
* for more information concerning the license and the contributors participating to this project.
5+
*/
6+
7+
using System.Net.Http.Headers;
8+
using System.Security.Claims;
9+
using System.Text.Encodings.Web;
10+
using System.Text.Json;
11+
using Microsoft.Extensions.Logging;
12+
using Microsoft.Extensions.Options;
13+
14+
namespace AspNet.Security.OAuth.Miro;
15+
16+
public partial class MiroAuthenticationHandler(
17+
[NotNull] IOptionsMonitor<MiroAuthenticationOptions> options,
18+
[NotNull] ILoggerFactory logger,
19+
[NotNull] UrlEncoder encoder)
20+
: OAuthHandler<MiroAuthenticationOptions>(options, logger, encoder)
21+
{
22+
protected override async Task<AuthenticationTicket> CreateTicketAsync(
23+
[NotNull] ClaimsIdentity identity,
24+
[NotNull] AuthenticationProperties properties,
25+
[NotNull] OAuthTokenResponse tokens)
26+
{
27+
using var request = new HttpRequestMessage(HttpMethod.Get, Options.UserInformationEndpoint);
28+
request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
29+
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", tokens.AccessToken);
30+
31+
using var response = await Backchannel.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, Context.RequestAborted);
32+
if (!response.IsSuccessStatusCode)
33+
{
34+
await Log.UserProfileErrorAsync(Logger, response, Context.RequestAborted);
35+
throw new HttpRequestException("An error occurred while retrieving the user profile from Miro.");
36+
}
37+
38+
using var payload = JsonDocument.Parse(await response.Content.ReadAsStringAsync(Context.RequestAborted));
39+
40+
var principal = new ClaimsPrincipal(identity);
41+
var context = new OAuthCreatingTicketContext(principal, properties, Context, Scheme, Options, Backchannel, tokens, payload.RootElement);
42+
context.RunClaimActions();
43+
44+
await Events.CreatingTicket(context);
45+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
46+
}
47+
48+
private static partial class Log
49+
{
50+
internal static async Task UserProfileErrorAsync(ILogger logger, HttpResponseMessage response, CancellationToken cancellationToken)
51+
{
52+
UserProfileError(
53+
logger,
54+
response.StatusCode,
55+
response.Headers.ToString(),
56+
await response.Content.ReadAsStringAsync(cancellationToken));
57+
}
58+
59+
[LoggerMessage(1,
60+
LogLevel.Error,
61+
"An error occurred while retrieving the user profile: the remote server returned a {Status} response with the following payload: {Headers} {Body}.")]
62+
private static partial void UserProfileError(
63+
ILogger logger,
64+
System.Net.HttpStatusCode status,
65+
string headers,
66+
string body);
67+
}
68+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
3+
* See https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers
4+
* for more information concerning the license and the contributors participating to this project.
5+
*/
6+
7+
using System.Security.Claims;
8+
using static AspNet.Security.OAuth.Miro.MiroAuthenticationConstants;
9+
10+
namespace AspNet.Security.OAuth.Miro;
11+
12+
public class MiroAuthenticationOptions : OAuthOptions
13+
{
14+
public MiroAuthenticationOptions()
15+
{
16+
ClaimsIssuer = MiroAuthenticationDefaults.Issuer;
17+
CallbackPath = MiroAuthenticationDefaults.CallbackPath;
18+
19+
AuthorizationEndpoint = MiroAuthenticationDefaults.AuthorizationEndpoint;
20+
TokenEndpoint = MiroAuthenticationDefaults.TokenEndpointFormat;
21+
UserInformationEndpoint = MiroAuthenticationDefaults.UserInformationEndpoint;
22+
23+
ClaimActions.MapJsonSubKey(ClaimTypes.NameIdentifier, "user", "id");
24+
ClaimActions.MapJsonSubKey(ClaimTypes.Name, "user", "name");
25+
ClaimActions.MapJsonSubKey(Claims.OrganizationId, "organization", "id");
26+
ClaimActions.MapJsonSubKey(Claims.OrganizationName, "organization", "name");
27+
ClaimActions.MapJsonSubKey(Claims.TeamId, "team", "id");
28+
ClaimActions.MapJsonSubKey(Claims.TeamName, "team", "name");
29+
}
30+
}

0 commit comments

Comments
 (0)