From a5007f5cb8a0381a6cf8720f9fc993b924965a92 Mon Sep 17 00:00:00 2001 From: Jarl Gullberg Date: Sun, 31 Mar 2024 14:37:11 +0200 Subject: [PATCH] Remove redundant class bodies. --- ...IAuthorizationCodeAccessTokenErrorResponse.cs | 4 +--- ...uthorizationCodeAuthorizationErrorResponse.cs | 4 +--- .../IAuthorizationCodeAuthorizationResponse.cs | 4 +--- ...IClientCredentialsAccessTokenErrorResponse.cs | 4 +--- .../IClientCredentialsAccessTokenResponse.cs | 4 +--- .../Grants/IRefreshAccessTokenErrorResponse.cs | 4 +--- ...asswordCredentialsAccessTokenErrorResponse.cs | 4 +--- ...eviceAuthorizationAccessTokenErrorResponse.cs | 4 +--- ...iceAuthorizationAuthorizationErrorResponse.cs | 4 +--- .../OAuthExtensions/IRequestExtension.cs | 4 +--- .../ITokenRevocationErrorResponse.cs | 4 +--- .../Grants/AuthorizationCodeGrantTests.cs | 8 ++------ .../Grants/ClientCredentialsGrantTests.cs | 8 ++------ .../Grants/RefreshAccessTokenTests.cs | 8 ++------ ...ResourceOwnerPasswordCredentialsGrantTests.cs | 8 ++------ .../DeviceAuthorizationGrantTests.cs | 16 ++++------------ .../OAuth2Extensions/TokenRevocationTests.cs | 4 +--- 17 files changed, 24 insertions(+), 72 deletions(-) diff --git a/Remora.OAuth2.Abstractions/Grants/AuthorizationCode/IAuthorizationCodeAccessTokenErrorResponse.cs b/Remora.OAuth2.Abstractions/Grants/AuthorizationCode/IAuthorizationCodeAccessTokenErrorResponse.cs index 4ea35a7..b13ac03 100644 --- a/Remora.OAuth2.Abstractions/Grants/AuthorizationCode/IAuthorizationCodeAccessTokenErrorResponse.cs +++ b/Remora.OAuth2.Abstractions/Grants/AuthorizationCode/IAuthorizationCodeAccessTokenErrorResponse.cs @@ -29,6 +29,4 @@ namespace Remora.OAuth2.Abstractions; /// access token. /// [PublicAPI] -public interface IAuthorizationCodeAccessTokenErrorResponse : IAccessTokenErrorResponse -{ -} +public interface IAuthorizationCodeAccessTokenErrorResponse : IAccessTokenErrorResponse; diff --git a/Remora.OAuth2.Abstractions/Grants/AuthorizationCode/IAuthorizationCodeAuthorizationErrorResponse.cs b/Remora.OAuth2.Abstractions/Grants/AuthorizationCode/IAuthorizationCodeAuthorizationErrorResponse.cs index 0446977..f300d1d 100644 --- a/Remora.OAuth2.Abstractions/Grants/AuthorizationCode/IAuthorizationCodeAuthorizationErrorResponse.cs +++ b/Remora.OAuth2.Abstractions/Grants/AuthorizationCode/IAuthorizationCodeAuthorizationErrorResponse.cs @@ -26,6 +26,4 @@ namespace Remora.OAuth2.Abstractions; /// [PublicAPI] -public interface IAuthorizationCodeAuthorizationErrorResponse : IAuthorizationErrorResponse -{ -} +public interface IAuthorizationCodeAuthorizationErrorResponse : IAuthorizationErrorResponse; diff --git a/Remora.OAuth2.Abstractions/Grants/AuthorizationCode/IAuthorizationCodeAuthorizationResponse.cs b/Remora.OAuth2.Abstractions/Grants/AuthorizationCode/IAuthorizationCodeAuthorizationResponse.cs index 30f129d..290d206 100644 --- a/Remora.OAuth2.Abstractions/Grants/AuthorizationCode/IAuthorizationCodeAuthorizationResponse.cs +++ b/Remora.OAuth2.Abstractions/Grants/AuthorizationCode/IAuthorizationCodeAuthorizationResponse.cs @@ -29,6 +29,4 @@ namespace Remora.OAuth2.Abstractions; /// response. /// [PublicAPI] -public interface IAuthorizationCodeAuthorizationResponse : IAuthorizationResponse -{ -} +public interface IAuthorizationCodeAuthorizationResponse : IAuthorizationResponse; diff --git a/Remora.OAuth2.Abstractions/Grants/ClientCredentials/IClientCredentialsAccessTokenErrorResponse.cs b/Remora.OAuth2.Abstractions/Grants/ClientCredentials/IClientCredentialsAccessTokenErrorResponse.cs index 4f54257..da55e50 100644 --- a/Remora.OAuth2.Abstractions/Grants/ClientCredentials/IClientCredentialsAccessTokenErrorResponse.cs +++ b/Remora.OAuth2.Abstractions/Grants/ClientCredentials/IClientCredentialsAccessTokenErrorResponse.cs @@ -29,6 +29,4 @@ namespace Remora.OAuth2.Abstractions; /// access token. /// [PublicAPI] -public interface IClientCredentialsAccessTokenErrorResponse : IAccessTokenErrorResponse -{ -} +public interface IClientCredentialsAccessTokenErrorResponse : IAccessTokenErrorResponse; diff --git a/Remora.OAuth2.Abstractions/Grants/ClientCredentials/IClientCredentialsAccessTokenResponse.cs b/Remora.OAuth2.Abstractions/Grants/ClientCredentials/IClientCredentialsAccessTokenResponse.cs index 07b841b..00268de 100644 --- a/Remora.OAuth2.Abstractions/Grants/ClientCredentials/IClientCredentialsAccessTokenResponse.cs +++ b/Remora.OAuth2.Abstractions/Grants/ClientCredentials/IClientCredentialsAccessTokenResponse.cs @@ -29,6 +29,4 @@ namespace Remora.OAuth2.Abstractions; /// response. /// [PublicAPI] -public interface IClientCredentialsAccessTokenResponse : IAccessTokenResponse -{ -} +public interface IClientCredentialsAccessTokenResponse : IAccessTokenResponse; diff --git a/Remora.OAuth2.Abstractions/Grants/IRefreshAccessTokenErrorResponse.cs b/Remora.OAuth2.Abstractions/Grants/IRefreshAccessTokenErrorResponse.cs index b8279ff..eaaf961 100644 --- a/Remora.OAuth2.Abstractions/Grants/IRefreshAccessTokenErrorResponse.cs +++ b/Remora.OAuth2.Abstractions/Grants/IRefreshAccessTokenErrorResponse.cs @@ -29,6 +29,4 @@ namespace Remora.OAuth2.Abstractions; /// access token. /// [PublicAPI] -public interface IRefreshAccessTokenErrorResponse : IAccessTokenErrorResponse -{ -} +public interface IRefreshAccessTokenErrorResponse : IAccessTokenErrorResponse; diff --git a/Remora.OAuth2.Abstractions/Grants/ResourceOwnerPasswordCredentials/IResourceOwnerPasswordCredentialsAccessTokenErrorResponse.cs b/Remora.OAuth2.Abstractions/Grants/ResourceOwnerPasswordCredentials/IResourceOwnerPasswordCredentialsAccessTokenErrorResponse.cs index 51b7508..c603488 100644 --- a/Remora.OAuth2.Abstractions/Grants/ResourceOwnerPasswordCredentials/IResourceOwnerPasswordCredentialsAccessTokenErrorResponse.cs +++ b/Remora.OAuth2.Abstractions/Grants/ResourceOwnerPasswordCredentials/IResourceOwnerPasswordCredentialsAccessTokenErrorResponse.cs @@ -29,6 +29,4 @@ namespace Remora.OAuth2.Abstractions; /// access token. /// [PublicAPI] -public interface IResourceOwnerPasswordCredentialsAccessTokenErrorResponse : IAccessTokenErrorResponse -{ -} +public interface IResourceOwnerPasswordCredentialsAccessTokenErrorResponse : IAccessTokenErrorResponse; diff --git a/Remora.OAuth2.Abstractions/OAuthExtensions/DeviceAuthorizationGrant/IDeviceAuthorizationAccessTokenErrorResponse.cs b/Remora.OAuth2.Abstractions/OAuthExtensions/DeviceAuthorizationGrant/IDeviceAuthorizationAccessTokenErrorResponse.cs index b858985..858e04a 100644 --- a/Remora.OAuth2.Abstractions/OAuthExtensions/DeviceAuthorizationGrant/IDeviceAuthorizationAccessTokenErrorResponse.cs +++ b/Remora.OAuth2.Abstractions/OAuthExtensions/DeviceAuthorizationGrant/IDeviceAuthorizationAccessTokenErrorResponse.cs @@ -28,6 +28,4 @@ namespace Remora.OAuth2.Abstractions.OAuthExtensions.DeviceAuthorizationGrant; /// Represents a failure to perform some remote operation when requesting a token. /// [PublicAPI] -public interface IDeviceAuthorizationAccessTokenErrorResponse : IAccessTokenErrorResponse -{ -} +public interface IDeviceAuthorizationAccessTokenErrorResponse : IAccessTokenErrorResponse; diff --git a/Remora.OAuth2.Abstractions/OAuthExtensions/DeviceAuthorizationGrant/IDeviceAuthorizationAuthorizationErrorResponse.cs b/Remora.OAuth2.Abstractions/OAuthExtensions/DeviceAuthorizationGrant/IDeviceAuthorizationAuthorizationErrorResponse.cs index e3ef3d2..b6690bb 100644 --- a/Remora.OAuth2.Abstractions/OAuthExtensions/DeviceAuthorizationGrant/IDeviceAuthorizationAuthorizationErrorResponse.cs +++ b/Remora.OAuth2.Abstractions/OAuthExtensions/DeviceAuthorizationGrant/IDeviceAuthorizationAuthorizationErrorResponse.cs @@ -28,6 +28,4 @@ namespace Remora.OAuth2.Abstractions.OAuthExtensions.DeviceAuthorizationGrant; /// Represents a failure to perform some remote operation when requesting a token. /// [PublicAPI] -public interface IDeviceAuthorizationAuthorizationErrorResponse : IAccessTokenErrorResponse -{ -} +public interface IDeviceAuthorizationAuthorizationErrorResponse : IAccessTokenErrorResponse; diff --git a/Remora.OAuth2.Abstractions/OAuthExtensions/IRequestExtension.cs b/Remora.OAuth2.Abstractions/OAuthExtensions/IRequestExtension.cs index 0a4c5ac..fcdcebb 100644 --- a/Remora.OAuth2.Abstractions/OAuthExtensions/IRequestExtension.cs +++ b/Remora.OAuth2.Abstractions/OAuthExtensions/IRequestExtension.cs @@ -33,9 +33,7 @@ namespace Remora.OAuth2.Abstractions.OAuthExtensions; /// flow. /// [PublicAPI] -public interface IRequestExtension -{ -} +public interface IRequestExtension; /// /// Marks a type as being an authorization request extension. diff --git a/Remora.OAuth2.Abstractions/OAuthExtensions/TokenRevocation/ITokenRevocationErrorResponse.cs b/Remora.OAuth2.Abstractions/OAuthExtensions/TokenRevocation/ITokenRevocationErrorResponse.cs index 796062b..6c3826d 100644 --- a/Remora.OAuth2.Abstractions/OAuthExtensions/TokenRevocation/ITokenRevocationErrorResponse.cs +++ b/Remora.OAuth2.Abstractions/OAuthExtensions/TokenRevocation/ITokenRevocationErrorResponse.cs @@ -28,6 +28,4 @@ namespace Remora.OAuth2.Abstractions.OAuthExtensions.TokenRevocation; /// Represents a failure to perform some remote operation when revoking a token. /// [PublicAPI] -public interface ITokenRevocationErrorResponse : IAccessTokenErrorResponse -{ -} +public interface ITokenRevocationErrorResponse : IAccessTokenErrorResponse; diff --git a/Tests/Remora.OAuth.Tests/Grants/AuthorizationCodeGrantTests.cs b/Tests/Remora.OAuth.Tests/Grants/AuthorizationCodeGrantTests.cs index 3c3198e..40eae4f 100644 --- a/Tests/Remora.OAuth.Tests/Grants/AuthorizationCodeGrantTests.cs +++ b/Tests/Remora.OAuth.Tests/Grants/AuthorizationCodeGrantTests.cs @@ -504,15 +504,11 @@ public static void DoesNotRequireState() /// Tests the class. /// public class AuthorizationCodeAccessTokenErrorResponseTests : - JsonBackedTypeTestBase - { - } + JsonBackedTypeTestBase; /// /// Tests the class. /// public class AuthorizationCodeAccessTokenResponseTests : - JsonBackedTypeTestBase - { - } + JsonBackedTypeTestBase; } diff --git a/Tests/Remora.OAuth.Tests/Grants/ClientCredentialsGrantTests.cs b/Tests/Remora.OAuth.Tests/Grants/ClientCredentialsGrantTests.cs index 81527a3..f395ee1 100644 --- a/Tests/Remora.OAuth.Tests/Grants/ClientCredentialsGrantTests.cs +++ b/Tests/Remora.OAuth.Tests/Grants/ClientCredentialsGrantTests.cs @@ -100,15 +100,11 @@ public static void CreatesRequestWithNoAdditionalProperties() /// Tests the class. /// public class ClientCredentialsAccessTokenErrorResponseTests : - JsonBackedTypeTestBase - { - } + JsonBackedTypeTestBase; /// /// Tests the class. /// public class ClientCredentialsAccessTokenResponseTests : - JsonBackedTypeTestBase - { - } + JsonBackedTypeTestBase; } diff --git a/Tests/Remora.OAuth.Tests/Grants/RefreshAccessTokenTests.cs b/Tests/Remora.OAuth.Tests/Grants/RefreshAccessTokenTests.cs index d5c5c45..9df2667 100644 --- a/Tests/Remora.OAuth.Tests/Grants/RefreshAccessTokenTests.cs +++ b/Tests/Remora.OAuth.Tests/Grants/RefreshAccessTokenTests.cs @@ -122,15 +122,11 @@ public static void CreatesRequestWithNoAdditionalProperties() /// Tests the class. /// public class RefreshAccessTokenErrorResponseTests : - JsonBackedTypeTestBase - { - } + JsonBackedTypeTestBase; /// /// Tests the class. /// public class RefreshAccessTokenResponseTests : - JsonBackedTypeTestBase - { - } + JsonBackedTypeTestBase; } diff --git a/Tests/Remora.OAuth.Tests/Grants/ResourceOwnerPasswordCredentialsGrantTests.cs b/Tests/Remora.OAuth.Tests/Grants/ResourceOwnerPasswordCredentialsGrantTests.cs index e74bcdb..2633509 100644 --- a/Tests/Remora.OAuth.Tests/Grants/ResourceOwnerPasswordCredentialsGrantTests.cs +++ b/Tests/Remora.OAuth.Tests/Grants/ResourceOwnerPasswordCredentialsGrantTests.cs @@ -136,15 +136,11 @@ public static void CreatesRequestWithNoAdditionalProperties() /// Tests the class. /// public class ResourceOwnerPasswordCredentialsAccessTokenErrorResponseTests : - JsonBackedTypeTestBase - { - } + JsonBackedTypeTestBase; /// /// Tests the class. /// public class ResourceOwnerPasswordCredentialsAccessTokenResponseTests : - JsonBackedTypeTestBase - { - } + JsonBackedTypeTestBase; } diff --git a/Tests/Remora.OAuth.Tests/OAuth2Extensions/DeviceAuthorizationGrantTests.cs b/Tests/Remora.OAuth.Tests/OAuth2Extensions/DeviceAuthorizationGrantTests.cs index 83d151a..9f65531 100644 --- a/Tests/Remora.OAuth.Tests/OAuth2Extensions/DeviceAuthorizationGrantTests.cs +++ b/Tests/Remora.OAuth.Tests/OAuth2Extensions/DeviceAuthorizationGrantTests.cs @@ -152,31 +152,23 @@ public static void CreatesRequestWithCorrectScope() /// Tests the class. /// public class DeviceAuthorizationAccessTokenErrorResponseTests : - JsonBackedTypeTestBase - { - } + JsonBackedTypeTestBase; /// /// Tests the class. /// public class DeviceAuthorizationAccessTokenResponseTests : - JsonBackedTypeTestBase - { - } + JsonBackedTypeTestBase; /// /// Tests the class. /// public class DeviceAuthorizationAuthorizationErrorResponseTests : - JsonBackedTypeTestBase - { - } + JsonBackedTypeTestBase; /// /// Tests the class. /// public class DeviceAuthorizationAuthorizationResponseTests : - JsonBackedTypeTestBase - { - } + JsonBackedTypeTestBase; } diff --git a/Tests/Remora.OAuth.Tests/OAuth2Extensions/TokenRevocationTests.cs b/Tests/Remora.OAuth.Tests/OAuth2Extensions/TokenRevocationTests.cs index 9f840db..888616a 100644 --- a/Tests/Remora.OAuth.Tests/OAuth2Extensions/TokenRevocationTests.cs +++ b/Tests/Remora.OAuth.Tests/OAuth2Extensions/TokenRevocationTests.cs @@ -93,7 +93,5 @@ public static void CreatesRequestWithCorrectTokenTypeHint() /// Tests the class. /// public class DeviceAuthorizationAuthorizationResponseTests : - JsonBackedTypeTestBase - { - } + JsonBackedTypeTestBase; }