You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deprecate BuildAuthorizationUrl string grant methods
This commit deprecates the `BuildAuthorizationUrl(..., IEnumerable<string>? grants =
null)` methods and provided guidance to use the
`BuildAuthorizationUrl(AuthorizationUrlOptions)` method instead. The goal is to
improve maintainability, as it's easier to add/remove/deprecate properties from a
record than it is to modify the parameters of a method without introducing breaking
changes.
Scope: oauth, deprecation
Copy file name to clipboardExpand all lines: ShopifySharp/Utilities/ShopifyOauthUtility.cs
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,10 @@ public interface IShopifyOauthUtility
24
24
/// <param name="redirectUrl">URL to redirect the user to after integration.</param>
25
25
/// <param name="state">An optional, random string value provided by your application which is unique for each authorization request. During the OAuth callback phase, your application should check that this value matches the one you provided to this method.</param>
26
26
/// <param name="grants">Requested grant types, which will change the type of access token granted upon OAuth completion.</param>
27
+
/// <remarks>
28
+
/// Use the <see cref="BuildAuthorizationUrl(AuthorizationUrlOptions)"/> overload instead.
29
+
/// </remarks>
30
+
[Obsolete("Use "+nameof(BuildAuthorizationUrl)+"("+nameof(AuthorizationUrlOptions)+") instead. This method will be removed in a future version of ShopifySharp.")]
27
31
UriBuildAuthorizationUrl(
28
32
IEnumerable<AuthorizationScope>scopes,
29
33
stringshopDomain,
@@ -42,6 +46,7 @@ Uri BuildAuthorizationUrl(
42
46
/// <param name="redirectUrl">URL to redirect the user to after integration.</param>
43
47
/// <param name="state">An optional, random string value provided by your application which is unique for each authorization request. During the OAuth callback phase, your application should check that this value matches the one you provided to this method.</param>
44
48
/// <param name="grants">Requested grant types, which will change the type of access token granted upon OAuth completion.</param>
49
+
[Obsolete("Use "+nameof(BuildAuthorizationUrl)+"("+nameof(AuthorizationUrlOptions)+") instead. This method will be removed in a future version of ShopifySharp.")]
[Obsolete("Use "+nameof(BuildAuthorizationUrl)+"("+nameof(AuthorizationUrlOptions)+") instead. This method will be removed in a future version of ShopifySharp.")]
143
149
publicUriBuildAuthorizationUrl(
144
150
IEnumerable<AuthorizationScope>scopes,
145
151
stringshopDomain,
@@ -160,6 +166,7 @@ public Uri BuildAuthorizationUrl(
160
166
});
161
167
162
168
/// <inheritdoc />
169
+
[Obsolete("Use "+nameof(BuildAuthorizationUrl)+"("+nameof(AuthorizationUrlOptions)+") instead. This method will be removed in a future version of ShopifySharp.")]
0 commit comments