Skip to content

Commit e01f695

Browse files
maxa92MaxaHunchmartincostello
authored
Add Snapchat provider (#706)
* add Snapchat provider * merge comments * added scope * adding snapchat.md * added row to README.md file * add to readme file * Removed the Google Analytics tracking gunk * Fix formatting Fix formatting by uses spaces not tabs. Co-authored-by: nikola.maksimovic <[email protected]> Co-authored-by: Martin Costello <[email protected]>
1 parent a86d82d commit e01f695

12 files changed

+392
-0
lines changed

AspNet.Security.OAuth.Providers.sln

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{C2CA4B38-A
209209
docs\reddit.md = docs\reddit.md
210210
docs\salesforce.md = docs\salesforce.md
211211
docs\sign-in-with-apple.md = docs\sign-in-with-apple.md
212+
docs\snapchat.md = docs\snapchat.md
212213
docs\stackexchange.md = docs\stackexchange.md
213214
docs\superoffice.md = docs\superoffice.md
214215
docs\trakt.md = docs\trakt.md
@@ -280,6 +281,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNet.Security.OAuth.Naver
280281
EndProject
281282
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNet.Security.OAuth.HubSpot", "src\AspNet.Security.OAuth.HubSpot\AspNet.Security.OAuth.HubSpot.csproj", "{23E576EB-6514-4617-8F04-FE7D5540136D}"
282283
EndProject
284+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNet.Security.OAuth.Snapchat", "src\AspNet.Security.OAuth.Snapchat\AspNet.Security.OAuth.Snapchat.csproj", "{ECD22287-9B9F-489A-84A7-E66D65A39D73}"
285+
EndProject
283286
Global
284287
GlobalSection(SolutionConfigurationPlatforms) = preSolution
285288
Debug|Any CPU = Debug|Any CPU
@@ -638,6 +641,10 @@ Global
638641
{23E576EB-6514-4617-8F04-FE7D5540136D}.Debug|Any CPU.Build.0 = Debug|Any CPU
639642
{23E576EB-6514-4617-8F04-FE7D5540136D}.Release|Any CPU.ActiveCfg = Release|Any CPU
640643
{23E576EB-6514-4617-8F04-FE7D5540136D}.Release|Any CPU.Build.0 = Release|Any CPU
644+
{ECD22287-9B9F-489A-84A7-E66D65A39D73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
645+
{ECD22287-9B9F-489A-84A7-E66D65A39D73}.Debug|Any CPU.Build.0 = Debug|Any CPU
646+
{ECD22287-9B9F-489A-84A7-E66D65A39D73}.Release|Any CPU.ActiveCfg = Release|Any CPU
647+
{ECD22287-9B9F-489A-84A7-E66D65A39D73}.Release|Any CPU.Build.0 = Release|Any CPU
641648
EndGlobalSection
642649
GlobalSection(SolutionProperties) = preSolution
643650
HideSolutionNode = FALSE
@@ -737,6 +744,7 @@ Global
737744
{FAE6E4C3-5A0D-45A5-9D17-57F4F6DA2593} = {C1352FD3-AE8B-43EE-B45B-F6E0B3FBAC6D}
738745
{289A91E9-81A9-422D-9CCD-12819081A29A} = {C1352FD3-AE8B-43EE-B45B-F6E0B3FBAC6D}
739746
{23E576EB-6514-4617-8F04-FE7D5540136D} = {C1352FD3-AE8B-43EE-B45B-F6E0B3FBAC6D}
747+
{ECD22287-9B9F-489A-84A7-E66D65A39D73} = {C1352FD3-AE8B-43EE-B45B-F6E0B3FBAC6D}
740748
EndGlobalSection
741749
GlobalSection(ExtensibilityGlobals) = postSolution
742750
SolutionGuid = {C7B54DE2-6407-4802-AD9C-CE54BF414C8C}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ If a provider you're looking for does not exist, consider making a PR to add one
179179
| ServiceChannel | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OAuth.ServiceChannel?includePreReleases=false)](https://www.nuget.org/packages/AspNet.Security.OAuth.ServiceChannel/ "Download AspNet.Security.OAuth.ServiceChannel from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OAuth.ServiceChannel?includePreReleases=true)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OAuth.ServiceChannel "Download AspNet.Security.OAuth.ServiceChannel from MyGet.org") | [Documentation](https://developer.servicechannel.com/basics/general/authentication "ServiceChannel developer documentation") |
180180
| Shopify | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OAuth.Shopify?includePreReleases=false)](https://www.nuget.org/packages/AspNet.Security.OAuth.Shopify/ "Download AspNet.Security.OAuth.Shopify from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OAuth.Shopify?includePreReleases=true)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OAuth.Shopify "Download AspNet.Security.OAuth.Shopify from MyGet.org") | [Documentation](https://help.shopify.com/en/api/getting-started/authentication/oauth "Shopify developer documentation") |
181181
| Slack | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OAuth.Slack?includePreReleases=false)](https://www.nuget.org/packages/AspNet.Security.OAuth.Slack/ "Download AspNet.Security.OAuth.Slack from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OAuth.Slack?includePreReleases=true)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OAuth.Slack "Download AspNet.Security.OAuth.Slack from MyGet.org") | [Documentation](https://api.slack.com/docs/oauth "Slack developer documentation") |
182+
| Snapchat | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OAuth.Snapchat?includePreReleases=false)](https://www.nuget.org/packages/AspNet.Security.OAuth.Snapchat/ "Download AspNet.Security.OAuth.Snapchat from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OAuth.Snapchat?includePreReleases=true)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OAuth.Snapchat "Download AspNet.Security.OAuth.Snapchat from MyGet.org") | [Documentation](https://marketingapi.snapchat.com/docs/#authentication "Snapchat developer documentation") |
182183
| SoundCloud | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OAuth.SoundCloud?includePreReleases=false)](https://www.nuget.org/packages/AspNet.Security.OAuth.SoundCloud/ "Download AspNet.Security.OAuth.SoundCloud from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OAuth.SoundCloud?includePreReleases=true)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OAuth.SoundCloud "Download AspNet.Security.OAuth.SoundCloud from MyGet.org") | [Documentation](https://developers.soundcloud.com/docs#authentication "SoundCloud developer documentation") |
183184
| Spotify | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OAuth.Spotify?includePreReleases=false)](https://www.nuget.org/packages/AspNet.Security.OAuth.Spotify/ "Download AspNet.Security.OAuth.Spotify from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OAuth.Spotify?includePreReleases=true)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OAuth.Spotify "Download AspNet.Security.OAuth.Spotify from MyGet.org") | [Documentation](https://developer.spotify.com/documentation/general/guides/authorization-guide/ "Spotify developer documentation") |
184185
| Stack Exchange | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OAuth.StackExchange?includePreReleases=false)](https://www.nuget.org/packages/AspNet.Security.OAuth.StackExchange/ "Download AspNet.Security.OAuth.StackExchange from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OAuth.StackExchange?includePreReleases=true)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OAuth.StackExchange "Download AspNet.Security.OAuth.StackExchange from MyGet.org") | [Documentation](https://api.stackexchange.com/docs/authentication "Stack Exchange developer documentation") |

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ covered by the section above.
6363
| QQ | _Optional_ | [Documentation](qq.md "QQ provider documentation") |
6464
| Reddit | _Optional_ | [Documentation](reddit.md "Reddit provider documentation") |
6565
| Salesforce | _Optional_ | [Documentation](salesforce.md "Salesforce provider documentation") |
66+
| Snapchat | _Optional_ | [Documentation](snapchat.md "Snapchat provider documentation") |
6667
| StackExchange | _Optional_ | [Documentation](stackexchange.md "StackExchange provider documentation") |
6768
| SuperOffice | **Required** | [Documentation](superoffice.md "SuperOffice provider documentation") |
6869
| Trakt | _Optional_ | [Documentation](trakt.md "Trakt provider documentation") |

docs/snapchat.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Integrating the Snapchat Provider
2+
3+
## Example
4+
5+
```csharp
6+
public void ConfigureServices(IServiceCollection services)
7+
{
8+
services.AddAuthentication(options => /* Auth configuration */)
9+
.AddSnapchat(options =>
10+
{
11+
options.ClientId = "my-client-id";
12+
options.ClientSecret = "my-client-secret";
13+
});
14+
}
15+
16+
public void Configure(IApplicationBuilder app)
17+
{
18+
app.UseAuthentication();
19+
app.UseAuthorization();
20+
}
21+
```
22+
23+
## Required Additional Settings
24+
25+
_None._
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFrameworks>$(DefaultNetCoreTargetFramework)</TargetFrameworks>
5+
<PackageValidationBaselineVersion>6.0.8</PackageValidationBaselineVersion>
6+
<DisablePackageBaselineValidation>true</DisablePackageBaselineValidation>
7+
</PropertyGroup>
8+
9+
<PropertyGroup>
10+
<Description>ASP.NET Core security middleware enabling Snapchat authentication.</Description>
11+
<Authors>Nikola Maksimovic</Authors>
12+
<PackageTags>aspnetcore;authentication;oauth;security;snapchat</PackageTags>
13+
</PropertyGroup>
14+
15+
<ItemGroup>
16+
<FrameworkReference Include="Microsoft.AspNetCore.App" />
17+
<PackageReference Include="JetBrains.Annotations" PrivateAssets="All" />
18+
</ItemGroup>
19+
20+
</Project>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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.Snapchat;
8+
9+
/// <summary>
10+
/// Contains constants specific to the <see cref="SnapchatAuthenticationHandler"/>.
11+
/// </summary>
12+
public static class SnapchatAuthenticationConstants
13+
{
14+
public static class Claims
15+
{
16+
public const string TeamId = "organization_id";
17+
public const string MemberStatus = "member_status";
18+
public const string UserId = "id";
19+
}
20+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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.Snapchat;
8+
9+
/// <summary>
10+
/// Default values used by the Snapchat authentication middleware.
11+
/// </summary>
12+
public static class SnapchatAuthenticationDefaults
13+
{
14+
/// <summary>
15+
/// Default value for <see cref="AuthenticationScheme.Name"/>.
16+
/// </summary>
17+
public const string AuthenticationScheme = "Snapchat";
18+
19+
/// <summary>
20+
/// Default value for <see cref="AuthenticationScheme.DisplayName"/>.
21+
/// </summary>
22+
public static readonly string DisplayName = "Snapchat";
23+
24+
/// <summary>
25+
/// Default value for <see cref="AuthenticationSchemeOptions.ClaimsIssuer"/>.
26+
/// </summary>
27+
public static readonly string Issuer = "Snapchat";
28+
29+
/// <summary>
30+
/// Default value for <see cref="RemoteAuthenticationOptions.CallbackPath"/>.
31+
/// </summary>
32+
public static readonly string CallbackPath = "/signin-snapchat";
33+
34+
/// <summary>
35+
/// Default value for <see cref="OAuthOptions.AuthorizationEndpoint"/>.
36+
/// </summary>
37+
public static readonly string AuthorizationEndpoint = "https://accounts.snapchat.com/login/oauth2/authorize";
38+
39+
/// <summary>
40+
/// Default value for <see cref="OAuthOptions.TokenEndpoint"/>.
41+
/// </summary>
42+
public static readonly string TokenEndpoint = "https://accounts.snapchat.com/login/oauth2/access_token";
43+
44+
/// <summary>
45+
/// Default value for <see cref="OAuthOptions.UserInformationEndpoint"/>.
46+
/// For more info about this endpoint, see <c>https://marketingapi.snapchat.com/docs/#user</c>.
47+
/// </summary>
48+
public static readonly string UserInformationEndpoint = "https://adsapi.snapchat.com/v1/me";
49+
}
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
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.Snapchat;
8+
9+
namespace Microsoft.Extensions.DependencyInjection;
10+
11+
/// <summary>
12+
/// Extension methods to add Snapchat authentication capabilities to an HTTP application pipeline.
13+
/// </summary>
14+
public static class SnapchatAuthenticationExtensions
15+
{
16+
/// <summary>
17+
/// Adds <see cref="SnapchatAuthenticationHandler"/> to the specified
18+
/// <see cref="AuthenticationBuilder"/>, which enables Snapchat authentication capabilities.
19+
/// </summary>
20+
/// <param name="builder">The authentication builder.</param>
21+
/// <returns>The <see cref="AuthenticationBuilder"/>.</returns>
22+
public static AuthenticationBuilder AddSnapchat([NotNull] this AuthenticationBuilder builder)
23+
{
24+
return builder.AddSnapchat(SnapchatAuthenticationDefaults.AuthenticationScheme, options => { });
25+
}
26+
27+
/// <summary>
28+
/// Adds <see cref="SnapchatAuthenticationHandler"/> to the specified
29+
/// <see cref="AuthenticationBuilder"/>, which enables Snapchat authentication capabilities.
30+
/// </summary>
31+
/// <param name="builder">The authentication builder.</param>
32+
/// <param name="configuration">The delegate used to configure the OpenID 2.0 options.</param>
33+
/// <returns>The <see cref="AuthenticationBuilder"/>.</returns>
34+
public static AuthenticationBuilder AddSnapchat(
35+
[NotNull] this AuthenticationBuilder builder,
36+
[NotNull] Action<SnapchatAuthenticationOptions> configuration)
37+
{
38+
return builder.AddSnapchat(SnapchatAuthenticationDefaults.AuthenticationScheme, configuration);
39+
}
40+
41+
/// <summary>
42+
/// Adds <see cref="SnapchatAuthenticationHandler"/> to the specified
43+
/// <see cref="AuthenticationBuilder"/>, which enables Snapchat authentication capabilities.
44+
/// </summary>
45+
/// <param name="builder">The authentication builder.</param>
46+
/// <param name="scheme">The authentication scheme associated with this instance.</param>
47+
/// <param name="configuration">The delegate used to configure the Snapchat options.</param>
48+
/// <returns>The <see cref="AuthenticationBuilder"/>.</returns>
49+
public static AuthenticationBuilder AddSnapchat(
50+
[NotNull] this AuthenticationBuilder builder,
51+
[NotNull] string scheme,
52+
[NotNull] Action<SnapchatAuthenticationOptions> configuration)
53+
{
54+
return builder.AddSnapchat(scheme, SnapchatAuthenticationDefaults.DisplayName, configuration);
55+
}
56+
57+
/// <summary>
58+
/// Adds <see cref="SnapchatAuthenticationHandler"/> to the specified
59+
/// <see cref="AuthenticationBuilder"/>, which enables Snapchat authentication capabilities.
60+
/// </summary>
61+
/// <param name="builder">The authentication builder.</param>
62+
/// <param name="scheme">The authentication scheme associated with this instance.</param>
63+
/// <param name="caption">The optional display name associated with this instance.</param>
64+
/// <param name="configuration">The delegate used to configure the Snapchat options.</param>
65+
/// <returns>The <see cref="AuthenticationBuilder"/>.</returns>
66+
public static AuthenticationBuilder AddSnapchat(
67+
[NotNull] this AuthenticationBuilder builder,
68+
[NotNull] string scheme,
69+
[CanBeNull] string caption,
70+
[NotNull] Action<SnapchatAuthenticationOptions> configuration)
71+
{
72+
return builder.AddOAuth<SnapchatAuthenticationOptions, SnapchatAuthenticationHandler>(scheme, caption, configuration);
73+
}
74+
}
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
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;
10+
using System.Text.Encodings.Web;
11+
using System.Text.Json;
12+
using Microsoft.AspNetCore.WebUtilities;
13+
using Microsoft.Extensions.Logging;
14+
using Microsoft.Extensions.Options;
15+
16+
namespace AspNet.Security.OAuth.Snapchat;
17+
18+
public partial class SnapchatAuthenticationHandler : OAuthHandler<SnapchatAuthenticationOptions>
19+
{
20+
public SnapchatAuthenticationHandler(
21+
[NotNull] IOptionsMonitor<SnapchatAuthenticationOptions> options,
22+
[NotNull] ILoggerFactory logger,
23+
[NotNull] UrlEncoder encoder,
24+
[NotNull] ISystemClock clock)
25+
: base(options, logger, encoder, clock)
26+
{
27+
}
28+
29+
protected override async Task<AuthenticationTicket> CreateTicketAsync(
30+
[NotNull] ClaimsIdentity identity,
31+
[NotNull] AuthenticationProperties properties,
32+
[NotNull] OAuthTokenResponse tokens)
33+
{
34+
string endpoint = Options.UserInformationEndpoint;
35+
36+
using var request = new HttpRequestMessage(HttpMethod.Get, endpoint);
37+
request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
38+
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", tokens.AccessToken);
39+
40+
using var response = await Backchannel.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, Context.RequestAborted);
41+
if (!response.IsSuccessStatusCode)
42+
{
43+
await Log.UserProfileErrorAsync(Logger, response, Context.RequestAborted);
44+
throw new HttpRequestException("An error occurred while retrieving the user profile from Snapchat.");
45+
}
46+
47+
using var payload = JsonDocument.Parse(await response.Content.ReadAsStringAsync(Context.RequestAborted));
48+
49+
var principal = new ClaimsPrincipal(identity);
50+
var context = new OAuthCreatingTicketContext(principal, properties, Context, Scheme, Options, Backchannel, tokens, payload.RootElement);
51+
context.RunClaimActions();
52+
53+
await Events.CreatingTicket(context);
54+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
55+
}
56+
57+
private static partial class Log
58+
{
59+
internal static async Task UserProfileErrorAsync(ILogger logger, HttpResponseMessage response, CancellationToken cancellationToken)
60+
{
61+
UserProfileError(
62+
logger,
63+
response.StatusCode,
64+
response.Headers.ToString(),
65+
await response.Content.ReadAsStringAsync(cancellationToken));
66+
}
67+
68+
[LoggerMessage(1, LogLevel.Error, "An error occurred while retrieving the user profile: the remote server returned a {Status} response with the following payload: {Headers} {Body}.")]
69+
private static partial void UserProfileError(
70+
ILogger logger,
71+
System.Net.HttpStatusCode status,
72+
string headers,
73+
string body);
74+
}
75+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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 Microsoft.AspNetCore.Authentication;
9+
using Microsoft.AspNetCore.Http;
10+
using static AspNet.Security.OAuth.Snapchat.SnapchatAuthenticationConstants;
11+
12+
namespace AspNet.Security.OAuth.Snapchat;
13+
14+
/// <summary>
15+
/// Defines a set of options used by <see cref="SnapchatAuthenticationHandler"/>.
16+
/// </summary>
17+
public class SnapchatAuthenticationOptions : OAuthOptions
18+
{
19+
public SnapchatAuthenticationOptions()
20+
{
21+
ClaimsIssuer = SnapchatAuthenticationDefaults.Issuer;
22+
23+
CallbackPath = SnapchatAuthenticationDefaults.CallbackPath;
24+
25+
AuthorizationEndpoint = SnapchatAuthenticationDefaults.AuthorizationEndpoint;
26+
TokenEndpoint = SnapchatAuthenticationDefaults.TokenEndpoint;
27+
UserInformationEndpoint = SnapchatAuthenticationDefaults.UserInformationEndpoint;
28+
29+
ClaimActions.MapJsonSubKey(ClaimTypes.NameIdentifier, "me", "id");
30+
ClaimActions.MapJsonSubKey(ClaimTypes.Name, "me", "display_name");
31+
ClaimActions.MapJsonSubKey(ClaimTypes.Email, "me", "email");
32+
ClaimActions.MapJsonSubKey(Claims.UserId, "me", "id");
33+
ClaimActions.MapJsonSubKey(Claims.TeamId, "me", "organization_id");
34+
ClaimActions.MapJsonSubKey(Claims.MemberStatus, "me", "member_status");
35+
Scope.Add("snapchat-marketing-api");
36+
}
37+
}

0 commit comments

Comments
 (0)