Skip to content

Commit 5c150f2

Browse files
Add HubSpot Provider (#704)
* - Implemented HubSpot OAuth. * Update readme and package validation baseline * Update UserInformationEndpoint to UserInformationEndpointFormat * Save user info in NameIdentifier instead of Name. * UrlEncode the accessToken before formatting it. * Move coment out. * Update base line version and add metadata * readability * - Add basic test for claim compare - remove whitespace from url. * reformat * Apply suggestions from code review Use literals in tests for HubSpot. Co-authored-by: Martin Costello <[email protected]>
1 parent 5f31108 commit 5c150f2

10 files changed

+368
-0
lines changed

AspNet.Security.OAuth.Providers.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNet.Security.OAuth.Digit
278278
EndProject
279279
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNet.Security.OAuth.Naver", "src\AspNet.Security.OAuth.Naver\AspNet.Security.OAuth.Naver.csproj", "{289A91E9-81A9-422D-9CCD-12819081A29A}"
280280
EndProject
281+
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}"
282+
EndProject
281283
Global
282284
GlobalSection(SolutionConfigurationPlatforms) = preSolution
283285
Debug|Any CPU = Debug|Any CPU
@@ -632,6 +634,10 @@ Global
632634
{289A91E9-81A9-422D-9CCD-12819081A29A}.Debug|Any CPU.Build.0 = Debug|Any CPU
633635
{289A91E9-81A9-422D-9CCD-12819081A29A}.Release|Any CPU.ActiveCfg = Release|Any CPU
634636
{289A91E9-81A9-422D-9CCD-12819081A29A}.Release|Any CPU.Build.0 = Release|Any CPU
637+
{23E576EB-6514-4617-8F04-FE7D5540136D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
638+
{23E576EB-6514-4617-8F04-FE7D5540136D}.Debug|Any CPU.Build.0 = Debug|Any CPU
639+
{23E576EB-6514-4617-8F04-FE7D5540136D}.Release|Any CPU.ActiveCfg = Release|Any CPU
640+
{23E576EB-6514-4617-8F04-FE7D5540136D}.Release|Any CPU.Build.0 = Release|Any CPU
635641
EndGlobalSection
636642
GlobalSection(SolutionProperties) = preSolution
637643
HideSolutionNode = FALSE
@@ -730,6 +736,7 @@ Global
730736
{1F869094-FAC8-49B5-92A4-706C028CDF93} = {C1352FD3-AE8B-43EE-B45B-F6E0B3FBAC6D}
731737
{FAE6E4C3-5A0D-45A5-9D17-57F4F6DA2593} = {C1352FD3-AE8B-43EE-B45B-F6E0B3FBAC6D}
732738
{289A91E9-81A9-422D-9CCD-12819081A29A} = {C1352FD3-AE8B-43EE-B45B-F6E0B3FBAC6D}
739+
{23E576EB-6514-4617-8F04-FE7D5540136D} = {C1352FD3-AE8B-43EE-B45B-F6E0B3FBAC6D}
733740
EndGlobalSection
734741
GlobalSection(ExtensibilityGlobals) = postSolution
735742
SolutionGuid = {C7B54DE2-6407-4802-AD9C-CE54BF414C8C}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ If a provider you're looking for does not exist, consider making a PR to add one
149149
| Gitter | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OAuth.Gitter?includePreReleases=false)](https://www.nuget.org/packages/AspNet.Security.OAuth.Gitter/ "Download AspNet.Security.OAuth.Gitter from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OAuth.Gitter?includePreReleases=true)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OAuth.Gitter "Download AspNet.Security.OAuth.Gitter from MyGet.org") | [Documentation](https://developer.gitter.im/docs/authentication "Gitter developer documentation") |
150150
| Harvest | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OAuth.Harvest?includePreReleases=false)](https://www.nuget.org/packages/AspNet.Security.OAuth.Harvest/ "Download AspNet.Security.OAuth.Harvest from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OAuth.Harvest?includePreReleases=true)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OAuth.Harvest "Download AspNet.Security.OAuth.Harvest from MyGet.org") | [Documentation](https://help.getharvest.com/api-v1/authentication/authentication/oauth/ "Harvest developer documentation") |
151151
| HealthGraph (Runkeeper) | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OAuth.HealthGraph?includePreReleases=false)](https://www.nuget.org/packages/AspNet.Security.OAuth.HealthGraph/ "Download AspNet.Security.OAuth.HealthGraph from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OAuth.HealthGraph?includePreReleases=true)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OAuth.HealthGraph "Download AspNet.Security.OAuth.HealthGraph from MyGet.org") | N/A |
152+
| HubSpot | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OAuth.HubSpot?includePreReleases=false)](https://www.nuget.org/packages/AspNet.Security.OAuth.HubSpot/ "Download AspNet.Security.OAuth.HubSpot from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OAuth.HubSpot?includePreReleases=true)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OAuth.HubSpot "Download AspNet.Security.OAuth.HubSpot from MyGet.org") | [Documentation](https://developers.hubspot.com/docs "HubSpot developer documentation") |
152153
| Imgur | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OAuth.Imgur?includePreReleases=false)](https://www.nuget.org/packages/AspNet.Security.OAuth.Imgur/ "Download AspNet.Security.OAuth.Imgur from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OAuth.Imgur?includePreReleases=true)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OAuth.Imgur "Download AspNet.Security.OAuth.Imgur from MyGet.org") | [Documentation](https://apidocs.imgur.com/?version=latest#authorization-and-oauth "Imgur developer documentation") |
153154
| Instagram | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OAuth.Instagram?includePreReleases=false)](https://www.nuget.org/packages/AspNet.Security.OAuth.Instagram/ "Download AspNet.Security.OAuth.Instagram from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OAuth.Instagram?includePreReleases=true)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OAuth.Instagram "Download AspNet.Security.OAuth.Instagram from MyGet.org") | [Documentation](https://www.instagram.com/developer/authentication/ "Instagram developer documentation") |
154155
| KakaoTalk | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OAuth.KakaoTalk?includePreReleases=false)](https://www.nuget.org/packages/AspNet.Security.OAuth.KakaoTalk/ "Download AspNet.Security.OAuth.KakaoTalk from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OAuth.KakaoTalk?includePreReleases=true)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OAuth.KakaoTalk "Download AspNet.Security.OAuth.KakaoTalk from MyGet.org") | [Documentation](https://developers.kakao.com/docs/latest/en/kakaologin/common "KakaoTalk developer documentation") |
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<PackageValidationBaselineVersion>6.0.7</PackageValidationBaselineVersion>
5+
<TargetFrameworks>$(DefaultNetCoreTargetFramework)</TargetFrameworks>
6+
</PropertyGroup>
7+
8+
<PropertyGroup>
9+
<DisablePackageBaselineValidation>true</DisablePackageBaselineValidation>
10+
</PropertyGroup>
11+
12+
<PropertyGroup>
13+
<Description>ASP.NET Core security middleware enabling HubSpot authentication.</Description>
14+
<Authors>Shayaan Ahmed Farooqi</Authors>
15+
<PackageTags>hubspot;aspnetcore;authentication;oauth;security</PackageTags>
16+
</PropertyGroup>
17+
18+
<ItemGroup>
19+
<FrameworkReference Include="Microsoft.AspNetCore.App" />
20+
<PackageReference Include="JetBrains.Annotations" PrivateAssets="All" />
21+
</ItemGroup>
22+
23+
</Project>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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.HubSpot;
8+
9+
/// <summary>
10+
/// Contains constants specific to the <see cref="HubSpotAuthenticationHandler"/>.
11+
/// </summary>
12+
public static class HubSpotAuthenticationConstants
13+
{
14+
public static class Claims
15+
{
16+
public const string HubId = "urn:HubSpot:hub_id";
17+
public const string UserId = "urn:HubSpot:user_id";
18+
public const string AppId = "urn:HubSpot:app_id";
19+
public const string HubDomain = "urn:HubSpot:hub_domain";
20+
}
21+
}
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.HubSpot;
8+
9+
/// <summary>
10+
/// Default values used by the HubSpot authentication middleware.
11+
/// </summary>
12+
public static class HubSpotAuthenticationDefaults
13+
{
14+
/// <summary>
15+
/// Default value for <see cref="AuthenticationScheme.Name"/>.
16+
/// </summary>
17+
public const string AuthenticationScheme = "HubSpot";
18+
19+
/// <summary>
20+
/// Default value for <see cref="AuthenticationScheme.DisplayName"/>.
21+
/// </summary>
22+
public static readonly string DisplayName = "HubSpot";
23+
24+
/// <summary>
25+
/// Default value for <see cref="AuthenticationSchemeOptions.ClaimsIssuer"/>.
26+
/// </summary>
27+
public static readonly string Issuer = "HubSpot";
28+
29+
/// <summary>
30+
/// Default value for <see cref="RemoteAuthenticationOptions.CallbackPath"/>.
31+
/// </summary>
32+
public static readonly string CallbackPath = "/signin-hubspot";
33+
34+
/// <summary>
35+
/// Default value for <see cref="OAuthOptions.AuthorizationEndpoint"/>.
36+
/// </summary>
37+
public static readonly string AuthorizationEndpoint = "https://app.hubspot.com/oauth/authorize";
38+
39+
/// <summary>
40+
/// Default value for <see cref="OAuthOptions.TokenEndpoint"/>.
41+
/// </summary>
42+
public static readonly string TokenEndpoint = "https://api.hubapi.com/oauth/v1/token";
43+
44+
/// <summary>
45+
/// Default value for <see cref="OAuthOptions.UserInformationEndpoint"/>.
46+
/// </summary>
47+
public static readonly string UserInformationEndpointFormat = "https://api.hubapi.com/oauth/v1/access-tokens/{0}";
48+
}
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.HubSpot;
8+
9+
namespace Microsoft.Extensions.DependencyInjection;
10+
11+
/// <summary>
12+
/// Extension methods to add HubSpot authentication capabilities to an HTTP application pipeline.
13+
/// </summary>
14+
public static class HubSpotAuthenticationExtensions
15+
{
16+
/// <summary>
17+
/// Adds <see cref="HubSpotAuthenticationHandler"/> to the specified
18+
/// <see cref="AuthenticationBuilder"/>, which enables HubSpot authentication capabilities.
19+
/// </summary>
20+
/// <param name="builder">The authentication builder.</param>
21+
/// <returns>The <see cref="AuthenticationBuilder"/>.</returns>
22+
public static AuthenticationBuilder AddHubSpot([NotNull] this AuthenticationBuilder builder)
23+
{
24+
return builder.AddHubSpot(HubSpotAuthenticationDefaults.AuthenticationScheme, options => { });
25+
}
26+
27+
/// <summary>
28+
/// Adds <see cref="HubSpotAuthenticationHandler"/> to the specified
29+
/// <see cref="AuthenticationBuilder"/>, which enables HubSpot 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 AddHubSpot(
35+
[NotNull] this AuthenticationBuilder builder,
36+
[NotNull] Action<HubSpotAuthenticationOptions> configuration)
37+
{
38+
return builder.AddHubSpot(HubSpotAuthenticationDefaults.AuthenticationScheme, configuration);
39+
}
40+
41+
/// <summary>
42+
/// Adds <see cref="HubSpotAuthenticationHandler"/> to the specified
43+
/// <see cref="AuthenticationBuilder"/>, which enables HubSpot 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 HubSpot options.</param>
48+
/// <returns>The <see cref="AuthenticationBuilder"/>.</returns>
49+
public static AuthenticationBuilder AddHubSpot(
50+
[NotNull] this AuthenticationBuilder builder,
51+
[NotNull] string scheme,
52+
[NotNull] Action<HubSpotAuthenticationOptions> configuration)
53+
{
54+
return builder.AddHubSpot(scheme, HubSpotAuthenticationDefaults.DisplayName, configuration);
55+
}
56+
57+
/// <summary>
58+
/// Adds <see cref="HubSpotAuthenticationHandler"/> to the specified
59+
/// <see cref="AuthenticationBuilder"/>, which enables HubSpot 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 HubSpot options.</param>
65+
/// <returns>The <see cref="AuthenticationBuilder"/>.</returns>
66+
public static AuthenticationBuilder AddHubSpot(
67+
[NotNull] this AuthenticationBuilder builder,
68+
[NotNull] string scheme,
69+
[CanBeNull] string caption,
70+
[NotNull] Action<HubSpotAuthenticationOptions> configuration)
71+
{
72+
return builder.AddOAuth<HubSpotAuthenticationOptions, HubSpotAuthenticationHandler>(scheme, caption, configuration);
73+
}
74+
}
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
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.Globalization;
8+
using System.Net.Http.Headers;
9+
using System.Security.Claims;
10+
using System.Text.Encodings.Web;
11+
using System.Text.Json;
12+
using System.Web;
13+
using Microsoft.Extensions.Logging;
14+
using Microsoft.Extensions.Options;
15+
16+
namespace AspNet.Security.OAuth.HubSpot;
17+
18+
public partial class HubSpotAuthenticationHandler : OAuthHandler<HubSpotAuthenticationOptions>
19+
{
20+
public HubSpotAuthenticationHandler(
21+
[NotNull] IOptionsMonitor<HubSpotAuthenticationOptions> 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+
using JsonDocument userProfile = await GetUserProfileAsync(tokens);
35+
var principal = new ClaimsPrincipal(identity);
36+
var context = new OAuthCreatingTicketContext(principal, properties, Context, Scheme, Options, Backchannel, tokens, userProfile.RootElement);
37+
context.RunClaimActions();
38+
await Events.CreatingTicket(context);
39+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
40+
}
41+
42+
private async Task<JsonDocument> GetUserProfileAsync(
43+
[NotNull] OAuthTokenResponse tokens)
44+
{
45+
// Get the meta data for an access or refresh token.This
46+
// can be used to get the email address of the HubSpot user
47+
// that the token was created for, as well as the Hub ID that the token is associated with.
48+
// https://developers.hubspot.com/docs/api/oauth/tokens
49+
var accessToken = HttpUtility.UrlEncode(tokens.AccessToken);
50+
var url = string.Format(CultureInfo.InvariantCulture, Options.UserInformationEndpoint, accessToken);
51+
52+
using var request = new HttpRequestMessage(HttpMethod.Get, url);
53+
request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
54+
using var response = await Backchannel.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, Context.RequestAborted);
55+
if (!response.IsSuccessStatusCode)
56+
{
57+
await Log.UserProfileErrorAsync(Logger, response, Context.RequestAborted);
58+
throw new HttpRequestException("An error occurred while retrieving the user profile.");
59+
}
60+
61+
return JsonDocument.Parse(await response.Content.ReadAsStringAsync(Context.RequestAborted));
62+
}
63+
64+
private static partial class Log
65+
{
66+
internal static async Task UserProfileErrorAsync(ILogger logger, HttpResponseMessage response, CancellationToken cancellationToken)
67+
{
68+
UserProfileError(
69+
logger,
70+
response.StatusCode,
71+
response.Headers.ToString(),
72+
await response.Content.ReadAsStringAsync(cancellationToken));
73+
}
74+
75+
[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}.")]
76+
private static partial void UserProfileError(
77+
ILogger logger,
78+
System.Net.HttpStatusCode status,
79+
string headers,
80+
string body);
81+
}
82+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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.HubSpot.HubSpotAuthenticationConstants;
9+
10+
namespace AspNet.Security.OAuth.HubSpot;
11+
12+
/// <summary>
13+
/// Defines a set of options used by <see cref="HubSpotAuthenticationHandler"/>.
14+
/// </summary>
15+
public class HubSpotAuthenticationOptions : OAuthOptions
16+
{
17+
public HubSpotAuthenticationOptions()
18+
{
19+
ClaimsIssuer = HubSpotAuthenticationDefaults.Issuer;
20+
CallbackPath = HubSpotAuthenticationDefaults.CallbackPath;
21+
22+
AuthorizationEndpoint = HubSpotAuthenticationDefaults.AuthorizationEndpoint;
23+
TokenEndpoint = HubSpotAuthenticationDefaults.TokenEndpoint;
24+
UserInformationEndpoint = HubSpotAuthenticationDefaults.UserInformationEndpointFormat;
25+
26+
ClaimActions.MapJsonKey(ClaimTypes.NameIdentifier, "user");
27+
ClaimActions.MapJsonKey(ClaimTypes.Email, "user");
28+
ClaimActions.MapJsonKey(Claims.HubId, "hub_id");
29+
ClaimActions.MapJsonKey(Claims.UserId, "user_id");
30+
ClaimActions.MapJsonKey(Claims.AppId, "app_id");
31+
ClaimActions.MapJsonKey(Claims.HubDomain, "hub_domain");
32+
}
33+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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.HubSpot;
8+
9+
public class HubSpotTests : OAuthTests<HubSpotAuthenticationOptions>
10+
{
11+
public HubSpotTests(ITestOutputHelper outputHelper)
12+
{
13+
OutputHelper = outputHelper;
14+
}
15+
16+
public override string DefaultScheme => HubSpotAuthenticationDefaults.AuthenticationScheme;
17+
18+
protected internal override void RegisterAuthentication(AuthenticationBuilder builder)
19+
{
20+
builder.AddHubSpot(options => ConfigureDefaults(builder, options));
21+
}
22+
23+
[Theory]
24+
[InlineData(ClaimTypes.NameIdentifier, "[email protected]")]
25+
[InlineData(ClaimTypes.Email, "[email protected]")]
26+
[InlineData("urn:HubSpot:hub_id", "13371337")]
27+
[InlineData("urn:HubSpot:user_id", "123123")]
28+
[InlineData("urn:HubSpot:app_id", "696969")]
29+
[InlineData("urn:HubSpot:hub_domain", "dev-13371337.com")]
30+
public async Task Can_Sign_In_Using_HubSpot(string claimType, string claimValue)
31+
{
32+
// Arrange
33+
using var server = CreateTestServer();
34+
35+
// Act
36+
var claims = await AuthenticateUserAsync(server);
37+
38+
// Assert
39+
AssertClaim(claims, claimType, claimValue);
40+
}
41+
}

0 commit comments

Comments
 (0)