Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
a3e4fe5
Add shopify provider (#326)
sbiaudet Jul 21, 2019
6807cf1
Shopify - Fix TokenEndpoint format (#330)
sbiaudet Jul 22, 2019
86f0878
Gitlab (#329)
twsl Jul 23, 2019
81d383e
incorrect LoginPath
mgroves Sep 3, 2019
a652881
Basic Apple provider
martincostello Jun 6, 2019
c78b5e5
Implement Apple provider
martincostello Jun 8, 2019
b4b76d0
Enable Sign In with Apple
martincostello Jun 8, 2019
62d4e79
Update tests
martincostello Jun 8, 2019
06dfc7b
Enable token lifetime validation
martincostello Jun 8, 2019
4a9f230
Add null annotations
martincostello Jun 9, 2019
2c6a89c
Improve exception handling
martincostello Jun 9, 2019
cf3705a
Extend integration tests
martincostello Jun 9, 2019
c65e54f
Move expiry period to options
martincostello Jun 9, 2019
58e642c
Add ClientSecretExpiresAfter validation
martincostello Jun 9, 2019
93965e3
Add tests for options validation
martincostello Jun 9, 2019
fc95923
Add unit tests for client secret
martincostello Jun 9, 2019
38e71ab
Make KeyId required
martincostello Jun 9, 2019
0a55575
Fix test
martincostello Jun 9, 2019
991356d
Fix Linux and macOS secret generation
martincostello Jun 9, 2019
b660372
Add password option for pfx files
martincostello Jun 9, 2019
938e9ad
Fix flaky test
martincostello Jun 9, 2019
56abbbf
Add UsePrivateKey() method
martincostello Jun 9, 2019
d2e2f24
Bump System.IdentityModel.Tokens.Jwt
martincostello Jun 9, 2019
0d2f184
Set response_mode to form_post
martincostello Sep 8, 2019
2dcfb65
Use latest C# version
martincostello Sep 8, 2019
d083871
Retrieve user details after sign-in
martincostello Sep 8, 2019
88c8faa
Update branding
martincostello Sep 15, 2019
221bfeb
Access events via options
martincostello Sep 15, 2019
8ee2f76
Resolve logging TODO
martincostello Sep 15, 2019
15078f4
Comment out Apple option
martincostello Sep 20, 2019
bb83201
Merge branch 'dev' into Sign-In-With-Apple-300
martincostello Sep 20, 2019
99e3185
Update Sign in with Apple provider for ASP.NET Core 3.0
martincostello Sep 20, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add shopify provider (#326)
* Add shopify provider

* Revert sln changes

* Apply code review

* Fix second core review

* Fix ChallentAsync param comment

* Fix scope summary

* Done pull request review #3

* Revert whitespace

* Update ShopifyLoopbackRedirectHandler.cs

* Update ShopifyAuthenticationExtensions.cs

* Update ShopifyAuthenticationHandler.cs

* Update ShopifyAuthenticationOptions.cs

* Update ShopifyTests.cs

* Update README.md

* Update README.md
  • Loading branch information
sbiaudet authored and martincostello committed Jul 21, 2019
commit a3e4fe5ad05a9cb4a8d85f178bc6da29927b753c
21 changes: 14 additions & 7 deletions AspNet.Security.OAuth.Providers.sln
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{BAC7
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNet.Security.OAuth.GitHub", "src\AspNet.Security.OAuth.GitHub\AspNet.Security.OAuth.GitHub.csproj", "{9DFEE19E-C170-4F20-93F3-EC952B1532F2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mvc.Client", "samples\Mvc.Client\Mvc.Client.csproj", "{68631868-902A-46FB-9A44-BACF1812FBDE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNet.Security.OAuth.LinkedIn", "src\AspNet.Security.OAuth.LinkedIn\AspNet.Security.OAuth.LinkedIn.csproj", "{0351689C-EAB7-42D0-966F-4021B89EF553}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNet.Security.OAuth.WordPress", "src\AspNet.Security.OAuth.WordPress\AspNet.Security.OAuth.WordPress.csproj", "{38E5DB77-7F35-4E3C-9719-8A25CE4130CA}"
Expand Down Expand Up @@ -161,6 +159,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNet.Security.OAuth.Odnok
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AspNet.Security.OAuth.Trakt", "src\AspNet.Security.OAuth.Trakt\AspNet.Security.OAuth.Trakt.csproj", "{5325536E-8E3A-4611-AB92-B03369493354}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AspNet.Security.OAuth.Shopify", "src\AspNet.Security.OAuth.Shopify\AspNet.Security.OAuth.Shopify.csproj", "{112F6B50-0FD3-45AA-992E-72D7B873BF00}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mvc.Client", "samples\Mvc.Client\Mvc.Client.csproj", "{4F389BF3-30B7-43A2-9E14-6450D57D53DB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -171,10 +173,6 @@ Global
{9DFEE19E-C170-4F20-93F3-EC952B1532F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9DFEE19E-C170-4F20-93F3-EC952B1532F2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9DFEE19E-C170-4F20-93F3-EC952B1532F2}.Release|Any CPU.Build.0 = Release|Any CPU
{68631868-902A-46FB-9A44-BACF1812FBDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{68631868-902A-46FB-9A44-BACF1812FBDE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{68631868-902A-46FB-9A44-BACF1812FBDE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{68631868-902A-46FB-9A44-BACF1812FBDE}.Release|Any CPU.Build.0 = Release|Any CPU
{0351689C-EAB7-42D0-966F-4021B89EF553}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0351689C-EAB7-42D0-966F-4021B89EF553}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0351689C-EAB7-42D0-966F-4021B89EF553}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -383,13 +381,20 @@ Global
{5325536E-8E3A-4611-AB92-B03369493354}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5325536E-8E3A-4611-AB92-B03369493354}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5325536E-8E3A-4611-AB92-B03369493354}.Release|Any CPU.Build.0 = Release|Any CPU
{112F6B50-0FD3-45AA-992E-72D7B873BF00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{112F6B50-0FD3-45AA-992E-72D7B873BF00}.Debug|Any CPU.Build.0 = Debug|Any CPU
{112F6B50-0FD3-45AA-992E-72D7B873BF00}.Release|Any CPU.ActiveCfg = Release|Any CPU
{112F6B50-0FD3-45AA-992E-72D7B873BF00}.Release|Any CPU.Build.0 = Release|Any CPU
{4F389BF3-30B7-43A2-9E14-6450D57D53DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4F389BF3-30B7-43A2-9E14-6450D57D53DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4F389BF3-30B7-43A2-9E14-6450D57D53DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4F389BF3-30B7-43A2-9E14-6450D57D53DB}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{9DFEE19E-C170-4F20-93F3-EC952B1532F2} = {C1352FD3-AE8B-43EE-B45B-F6E0B3FBAC6D}
{68631868-902A-46FB-9A44-BACF1812FBDE} = {BAC7067D-88FE-4385-8AC9-1A325FFBDE69}
{0351689C-EAB7-42D0-966F-4021B89EF553} = {C1352FD3-AE8B-43EE-B45B-F6E0B3FBAC6D}
{38E5DB77-7F35-4E3C-9719-8A25CE4130CA} = {C1352FD3-AE8B-43EE-B45B-F6E0B3FBAC6D}
{F79E8D15-F296-424C-A50E-AE39EB2C609F} = {C1352FD3-AE8B-43EE-B45B-F6E0B3FBAC6D}
Expand Down Expand Up @@ -444,6 +449,8 @@ Global
{CC1E9908-075D-4138-852A-6EA3B5F32E88} = {C1352FD3-AE8B-43EE-B45B-F6E0B3FBAC6D}
{27DB335F-5012-4276-98C5-EAEA335C8C7B} = {C1352FD3-AE8B-43EE-B45B-F6E0B3FBAC6D}
{5325536E-8E3A-4611-AB92-B03369493354} = {C1352FD3-AE8B-43EE-B45B-F6E0B3FBAC6D}
{112F6B50-0FD3-45AA-992E-72D7B873BF00} = {C1352FD3-AE8B-43EE-B45B-F6E0B3FBAC6D}
{4F389BF3-30B7-43A2-9E14-6450D57D53DB} = {BAC7067D-88FE-4385-8AC9-1A325FFBDE69}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C7B54DE2-6407-4802-AD9C-CE54BF414C8C}
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,10 @@ If a provider you're looking for does not exist, consider making a PR to add one
| Onshape | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OAuth.Onshape?includePreReleases=false)](https://www.nuget.org/packages/AspNet.Security.OAuth.Onshape/ "Download AspNet.Security.OAuth.Onshape from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OAuth.Onshape?includePreReleases=false)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OAuth.Onshape "Download AspNet.Security.OAuth.Onshape from MyGet.org") | N/A |
| Patreon | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OAuth.Patreon?includePreReleases=false)](https://www.nuget.org/packages/AspNet.Security.OAuth.Patreon/ "Download AspNet.Security.OAuth.Patreon from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OAuth.Patreon?includePreReleases=false)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OAuth.Patreon "Download AspNet.Security.OAuth.Patreon from MyGet.org") | [Documentation](https://docs.patreon.com/#oauth "Patreon developer documentation") |
| Paypal | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OAuth.Paypal?includePreReleases=false)](https://www.nuget.org/packages/AspNet.Security.OAuth.Paypal/ "Download AspNet.Security.OAuth.Paypal from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OAuth.Paypal?includePreReleases=false)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OAuth.Paypal "Download AspNet.Security.OAuth.Paypal from MyGet.org") | [Documentation](https://developer.paypal.com/docs/api-basics/#oauth-20-authorization-protocol "Paypal developer documentation") |
| QQ | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OAuth.QQ?includePreReleases=false)](https://www.nuget.org/packages/AspNet.Security.OAuth.QQ/ "Download AspNet.Security.OAuth.CHANGEME from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OAuth.QQ?includePreReleases=false)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OAuth.QQ "Download AspNet.Security.OAuth.QQ from MyGet.org") | [Documentation](https://developers.e.qq.com/docs/apilist/auth/oauth2 "QQ developer documentation") |
| QQ | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OAuth.QQ?includePreReleases=false)](https://www.nuget.org/packages/AspNet.Security.OAuth.QQ/ "Download AspNet.Security.OAuth.QQ from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OAuth.QQ?includePreReleases=false)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OAuth.QQ "Download AspNet.Security.OAuth.QQ from MyGet.org") | [Documentation](https://developers.e.qq.com/docs/apilist/auth/oauth2 "QQ developer documentation") |
| Reddit | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OAuth.Reddit?includePreReleases=false)](https://www.nuget.org/packages/AspNet.Security.OAuth.Reddit/ "Download AspNet.Security.OAuth.Reddit from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OAuth.Reddit?includePreReleases=false)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OAuth.Reddit "Download AspNet.Security.OAuth.Reddit from MyGet.org") | [Documentation](https://github.com/reddit-archive/reddit/wiki/oauth2 "Reddit developer documentation") |
| Salesforce | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OAuth.Salesforce?includePreReleases=false)](https://www.nuget.org/packages/AspNet.Security.OAuth.Salesforce/ "Download AspNet.Security.OAuth.Salesforce from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OAuth.Salesforce?includePreReleases=false)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OAuth.Salesforce "Download AspNet.Security.OAuth.Salesforce from MyGet.org") | [Documentation](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_understanding_web_server_oauth_flow.htm "Salesforce developer documentation") |
| 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=false)](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") |
| 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=false)](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") |
| 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=false)](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") |
| 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=false)](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") |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">

<Import Project="..\..\build\packages.props" />

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>

<PropertyGroup>
<Description>ASP.NET Core security middleware enabling Shopify authentication.</Description>
<Authors>Chris Boaro;Sebastien Biaudet</Authors>
<PackageTags>aspnetcore;authentication;oauth;salesforce;security</PackageTags>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="$(JetBrainsVersion)" PrivateAssets="All" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OAuth" Version="$(AspNetCoreVersion)" />
</ItemGroup>

</Project>
95 changes: 95 additions & 0 deletions src/AspNet.Security.OAuth.Shopify/ShopifyAuthenticationDefaults.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
/*
* 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 Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.OAuth;

namespace AspNet.Security.OAuth.Shopify
{
/// <summary>
/// Default values used by the Shopify authentication middleware.
/// </summary>
public static class ShopifyAuthenticationDefaults
{
/// <summary>
/// Default value for <see cref="AuthenticationScheme.Name"/>.
/// </summary>
public const string AuthenticationScheme = "Shopify";

/// <summary>
/// Default value for <see cref="AuthenticationScheme.DisplayName"/>.
/// </summary>
public const string DisplayName = "Shopify";

/// <summary>
/// Default value for <see cref="AuthenticationSchemeOptions.ClaimsIssuer"/>.
/// </summary>
public const string Issuer = "Shopify";

/// <summary>
/// Default value for <see cref="RemoteAuthenticationOptions.CallbackPath"/>.
/// </summary>
public const string CallbackPath = "/signin-shopify";

/// <summary>
/// Format value for <see cref="OAuthOptions.AuthorizationEndpoint"/>.
/// </summary>
public const string AuthorizationEndpointFormat = "https://{0}.myshopify.com/admin/oauth/authorize";

/// <summary>
/// Format value for <see cref="OAuthOptions.TokenEndpoint"/>.
/// </summary>
public const string TokenEndpointFormat = "https://{0}.myshopify.com/admin/oauth/access_token";

/// <summary>
/// Format value for <see cref="OAuthOptions.UserInformationEndpoint"/>.
/// </summary>
public const string UserInformationEndpointFormat = "https://{0}.myshopify.com/admin/shop";

/// <summary>
/// Name of dictionary entry in <see cref="AuthenticationProperties.Items"/> that contains
/// the name of the shop.
/// </summary>
public const string ShopNameAuthenticationProperty = "ShopName";

/// <summary>
/// Set this authentication property to override the scope set in <see cref="OAuthOptions.Scope"/>. Note - if this
/// override is used, it must be fully formatted.
/// </summary>
public const string ShopScopeAuthenticationProperty = "Scope";

/// <summary>
/// Additional grant options. The only acceptable value is "per-user"
/// </summary>
public const string GrantOptionsAuthenticationProperty = "GrantOptions";

/// <summary>
/// Per user is the only acceptable grant option at this time.
/// </summary>
public const string PerUserAuthenticationPropertyValue = "per-user";

/// <summary>
/// The claim type which contains the permission scope returned by Shopify during authorization.
/// This may not be the same scope requested, so apps should verify they have the scope they need.
/// </summary>
public const string ShopifyScopeClaimType = "urn:shopify:scope";

/// <summary>
/// The plan name that this shop is using.
/// </summary>
public const string ShopifyPlanNameClaimType = "urn:shopify:plan_name";

/// <summary>
/// Claim type indicating whether or not this shop if eligible to make payments.
/// </summary>
public const string ShopifyEligibleForPaymentsClaimType = "urn:shopify:eligible_for_payments";

/// <summary>
/// The timezone that that the shop is using.
/// </summary>
public const string ShopifyTimezoneClaimType = "urn:shopify:timezone";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
/*
* 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;
using AspNet.Security.OAuth.Shopify;
using JetBrains.Annotations;
using Microsoft.AspNetCore.Authentication;

namespace Microsoft.Extensions.DependencyInjection
{
/// <summary>
/// Extension methods to add Shopify authentication capabilities to an HTTP application pipeline.
/// </summary>
public static class ShopifyAuthenticationExtensions
{
/// <summary>
/// Adds <see cref="ShopifyAuthenticationHandler"/> to the specified
/// <see cref="AuthenticationBuilder"/>, which enables Shopify authentication capabilities.
/// </summary>
/// <param name="builder">The authentication builder.</param>
/// <returns>A reference to this instance after the operation has completed.</returns>
public static AuthenticationBuilder AddShopify([NotNull] this AuthenticationBuilder builder)
{
return builder.AddShopify(ShopifyAuthenticationDefaults.AuthenticationScheme, options => { });
}

/// <summary>
/// Adds <see cref="ShopifyAuthenticationHandler"/> to the specified
/// <see cref="AuthenticationBuilder"/>, which enables Shopify authentication capabilities.
/// </summary>
/// <param name="builder">The authentication builder.</param>
/// <param name="configuration">The delegate used to configure the OpenID 2.0 options.</param>
/// <returns>A reference to this instance after the operation has completed.</returns>
public static AuthenticationBuilder AddShopify(
[NotNull] this AuthenticationBuilder builder,
[NotNull] Action<ShopifyAuthenticationOptions> configuration)
{
return builder.AddShopify(ShopifyAuthenticationDefaults.AuthenticationScheme, configuration);
}

/// <summary>
/// Adds <see cref="ShopifyAuthenticationHandler"/> to the specified
/// <see cref="AuthenticationBuilder"/>, which enables Shopify authentication capabilities.
/// </summary>
/// <param name="builder">The authentication builder.</param>
/// <param name="scheme">The authentication scheme associated with this instance.</param>
/// <param name="configuration">The delegate used to configure the Shopify options.</param>
/// <returns>The <see cref="AuthenticationBuilder"/>.</returns>
public static AuthenticationBuilder AddShopify(
[NotNull] this AuthenticationBuilder builder,
[NotNull] string scheme,
[NotNull] Action<ShopifyAuthenticationOptions> configuration)
{
return builder.AddShopify(scheme, ShopifyAuthenticationDefaults.DisplayName, configuration);
}

/// <summary>
/// Adds <see cref="ShopifyAuthenticationHandler"/> to the specified
/// <see cref="AuthenticationBuilder"/>, which enables Shopify authentication capabilities.
/// </summary>
/// <param name="builder">The authentication builder.</param>
/// <param name="scheme">The authentication scheme associated with this instance.</param>
/// <param name="caption">The optional display name associated with this instance.</param>
/// <param name="configuration">The delegate used to configure the Shopify options.</param>
/// <returns>The <see cref="AuthenticationBuilder"/>.</returns>
public static AuthenticationBuilder AddShopify(
[NotNull] this AuthenticationBuilder builder,
[NotNull] string scheme,
[CanBeNull] string caption,
[NotNull] Action<ShopifyAuthenticationOptions> configuration)
{
return builder.AddOAuth<ShopifyAuthenticationOptions, ShopifyAuthenticationHandler>(scheme, caption, configuration);
}
}
}
Loading