diff --git a/src/OpenIddict.Client/OpenIddictClientService.cs b/src/OpenIddict.Client/OpenIddictClientService.cs index 8798c12a..eba54eda 100644 --- a/src/OpenIddict.Client/OpenIddictClientService.cs +++ b/src/OpenIddict.Client/OpenIddictClientService.cs @@ -10,6 +10,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.IdentityModel.Tokens; using OpenIddict.Extensions; +using static OpenIddict.Abstractions.OpenIddictExceptions; namespace OpenIddict.Client; @@ -86,7 +87,7 @@ public class OpenIddictClientService if (context.IsRejected) { - throw new OpenIddictExceptions.ProtocolException( + throw new ProtocolException( SR.FormatID0148(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -108,7 +109,7 @@ public class OpenIddictClientService if (context.IsRejected) { - throw new OpenIddictExceptions.ProtocolException( + throw new ProtocolException( SR.FormatID0149(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -132,7 +133,7 @@ public class OpenIddictClientService if (context.IsRejected) { - throw new OpenIddictExceptions.ProtocolException( + throw new ProtocolException( SR.FormatID0150(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -159,7 +160,7 @@ public class OpenIddictClientService if (context.IsRejected) { - throw new OpenIddictExceptions.ProtocolException( + throw new ProtocolException( SR.FormatID0151(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -245,7 +246,7 @@ public class OpenIddictClientService if (context.IsRejected) { - throw new OpenIddictExceptions.ProtocolException( + throw new ProtocolException( SR.FormatID0152(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -267,7 +268,7 @@ public class OpenIddictClientService if (context.IsRejected) { - throw new OpenIddictExceptions.ProtocolException( + throw new ProtocolException( SR.FormatID0153(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -291,7 +292,7 @@ public class OpenIddictClientService if (context.IsRejected) { - throw new OpenIddictExceptions.ProtocolException( + throw new ProtocolException( SR.FormatID0154(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -318,7 +319,7 @@ public class OpenIddictClientService if (context.IsRejected) { - throw new OpenIddictExceptions.ProtocolException( + throw new ProtocolException( SR.FormatID0155(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -391,7 +392,7 @@ public class OpenIddictClientService if (context.IsRejected) { - throw new OpenIddictExceptions.ProtocolException( + throw new ProtocolException( SR.FormatID0319(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -483,7 +484,7 @@ public class OpenIddictClientService if (context.IsRejected) { - throw new OpenIddictExceptions.ProtocolException( + throw new ProtocolException( SR.FormatID0319(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -568,7 +569,7 @@ public class OpenIddictClientService if (context.IsRejected) { - throw new OpenIddictExceptions.ProtocolException( + throw new ProtocolException( SR.FormatID0319(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -668,7 +669,7 @@ public class OpenIddictClientService if (context.IsRejected) { - throw new OpenIddictExceptions.ProtocolException( + throw new ProtocolException( SR.FormatID0320(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -691,7 +692,7 @@ public class OpenIddictClientService if (context.IsRejected) { - throw new OpenIddictExceptions.ProtocolException( + throw new ProtocolException( SR.FormatID0321(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -716,7 +717,7 @@ public class OpenIddictClientService if (context.IsRejected) { - throw new OpenIddictExceptions.ProtocolException( + throw new ProtocolException( SR.FormatID0322(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -744,7 +745,7 @@ public class OpenIddictClientService if (context.IsRejected) { - throw new OpenIddictExceptions.ProtocolException( + throw new ProtocolException( SR.FormatID0323(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -839,7 +840,7 @@ public class OpenIddictClientService if (context.IsRejected) { - throw new OpenIddictExceptions.ProtocolException( + throw new ProtocolException( SR.FormatID0324(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -862,7 +863,7 @@ public class OpenIddictClientService if (context.IsRejected) { - throw new OpenIddictExceptions.ProtocolException( + throw new ProtocolException( SR.FormatID0325(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -887,7 +888,7 @@ public class OpenIddictClientService if (context.IsRejected) { - throw new OpenIddictExceptions.ProtocolException( + throw new ProtocolException( SR.FormatID0326(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -916,7 +917,7 @@ public class OpenIddictClientService if (context.IsRejected) { - throw new OpenIddictExceptions.ProtocolException( + throw new ProtocolException( SR.FormatID0327(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } diff --git a/src/OpenIddict.Core/Managers/OpenIddictApplicationManager.cs b/src/OpenIddict.Core/Managers/OpenIddictApplicationManager.cs index 344452b2..5170dbaa 100644 --- a/src/OpenIddict.Core/Managers/OpenIddictApplicationManager.cs +++ b/src/OpenIddict.Core/Managers/OpenIddictApplicationManager.cs @@ -16,6 +16,7 @@ using System.Text.Json; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using OpenIddict.Extensions; +using ValidationException = OpenIddict.Abstractions.OpenIddictExceptions.ValidationException; #if !SUPPORTS_KEY_DERIVATION_WITH_SPECIFIED_HASH_ALGORITHM using Org.BouncyCastle.Crypto; @@ -166,7 +167,7 @@ public class OpenIddictApplicationManager : IOpenIddictApplication builder.AppendLine(result.ErrorMessage); } - throw new OpenIddictExceptions.ValidationException(builder.ToString(), results); + throw new ValidationException(builder.ToString(), results); } await Store.CreateAsync(application, cancellationToken); @@ -1035,7 +1036,7 @@ public class OpenIddictApplicationManager : IOpenIddictApplication builder.AppendLine(result.ErrorMessage); } - throw new OpenIddictExceptions.ValidationException(builder.ToString(), results); + throw new ValidationException(builder.ToString(), results); } await Store.UpdateAsync(application, cancellationToken); @@ -1446,13 +1447,13 @@ public class OpenIddictApplicationManager : IOpenIddictApplication static bool VerifyHashedSecret(string hash, string secret) { var payload = new ReadOnlySpan(Convert.FromBase64String(hash)); - if (payload.Length == 0) + if (payload.Length is 0) { return false; } // Verify the hashing format version. - if (payload[0] != 0x01) + if (payload[0] is not 0x01) { return false; } diff --git a/src/OpenIddict.Core/Managers/OpenIddictAuthorizationManager.cs b/src/OpenIddict.Core/Managers/OpenIddictAuthorizationManager.cs index 5762d370..3b39109f 100644 --- a/src/OpenIddict.Core/Managers/OpenIddictAuthorizationManager.cs +++ b/src/OpenIddict.Core/Managers/OpenIddictAuthorizationManager.cs @@ -13,6 +13,7 @@ using System.Text.Json; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using static OpenIddict.Abstractions.OpenIddictExceptions; +using ValidationException = OpenIddict.Abstractions.OpenIddictExceptions.ValidationException; namespace OpenIddict.Core; @@ -124,7 +125,7 @@ public class OpenIddictAuthorizationManager : IOpenIddictAuthori builder.AppendLine(result.ErrorMessage); } - throw new OpenIddictExceptions.ValidationException(builder.ToString(), results); + throw new ValidationException(builder.ToString(), results); } await Store.CreateAsync(authorization, cancellationToken); @@ -1077,7 +1078,7 @@ public class OpenIddictAuthorizationManager : IOpenIddictAuthori builder.AppendLine(result.ErrorMessage); } - throw new OpenIddictExceptions.ValidationException(builder.ToString(), results); + throw new ValidationException(builder.ToString(), results); } await Store.UpdateAsync(authorization, cancellationToken); diff --git a/src/OpenIddict.Core/Managers/OpenIddictScopeManager.cs b/src/OpenIddict.Core/Managers/OpenIddictScopeManager.cs index a11cc491..c01c051a 100644 --- a/src/OpenIddict.Core/Managers/OpenIddictScopeManager.cs +++ b/src/OpenIddict.Core/Managers/OpenIddictScopeManager.cs @@ -12,6 +12,7 @@ using System.Text; using System.Text.Json; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; +using ValidationException = OpenIddict.Abstractions.OpenIddictExceptions.ValidationException; namespace OpenIddict.Core; @@ -117,7 +118,7 @@ public class OpenIddictScopeManager : IOpenIddictScopeManager where TSco builder.AppendLine(result.ErrorMessage); } - throw new OpenIddictExceptions.ValidationException(builder.ToString(), results); + throw new ValidationException(builder.ToString(), results); } await Store.CreateAsync(scope, cancellationToken); @@ -858,7 +859,7 @@ public class OpenIddictScopeManager : IOpenIddictScopeManager where TSco builder.AppendLine(result.ErrorMessage); } - throw new OpenIddictExceptions.ValidationException(builder.ToString(), results); + throw new ValidationException(builder.ToString(), results); } await Store.UpdateAsync(scope, cancellationToken); diff --git a/src/OpenIddict.Core/Managers/OpenIddictTokenManager.cs b/src/OpenIddict.Core/Managers/OpenIddictTokenManager.cs index 68080892..f9a0a44e 100644 --- a/src/OpenIddict.Core/Managers/OpenIddictTokenManager.cs +++ b/src/OpenIddict.Core/Managers/OpenIddictTokenManager.cs @@ -13,6 +13,7 @@ using System.Text.Json; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using static OpenIddict.Abstractions.OpenIddictExceptions; +using ValidationException = OpenIddict.Abstractions.OpenIddictExceptions.ValidationException; namespace OpenIddict.Core; @@ -132,7 +133,7 @@ public class OpenIddictTokenManager : IOpenIddictTokenManager where TTok builder.AppendLine(result.ErrorMessage); } - throw new OpenIddictExceptions.ValidationException(builder.ToString(), results); + throw new ValidationException(builder.ToString(), results); } await Store.CreateAsync(token, cancellationToken); @@ -1206,7 +1207,7 @@ public class OpenIddictTokenManager : IOpenIddictTokenManager where TTok builder.AppendLine(result.ErrorMessage); } - throw new OpenIddictExceptions.ValidationException(builder.ToString(), results); + throw new ValidationException(builder.ToString(), results); } await Store.UpdateAsync(token, cancellationToken); diff --git a/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkApplicationStore.cs b/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkApplicationStore.cs index 43225633..fb73a97e 100644 --- a/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkApplicationStore.cs +++ b/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkApplicationStore.cs @@ -16,6 +16,7 @@ using System.Text.Json; using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.Options; using OpenIddict.EntityFramework.Models; +using static OpenIddict.Abstractions.OpenIddictExceptions; namespace OpenIddict.EntityFramework; @@ -201,7 +202,7 @@ public class OpenIddictEntityFrameworkApplicationStore : IOpen // Reset the state of the entity to prevents future calls to SaveChangesAsync() from failing. Context.Entry(scope).State = EntityState.Unchanged; - throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0245), exception); + throw new ConcurrencyException(SR.GetResourceString(SR.ID0245), exception); } } @@ -686,7 +687,7 @@ public class OpenIddictEntityFrameworkScopeStore : IOpen // Reset the state of the entity to prevents future calls to SaveChangesAsync() from failing. Context.Entry(scope).State = EntityState.Unchanged; - throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0245), exception); + throw new ConcurrencyException(SR.GetResourceString(SR.ID0245), exception); } } diff --git a/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkTokenStore.cs b/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkTokenStore.cs index 75485a50..0d7bcd81 100644 --- a/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkTokenStore.cs +++ b/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkTokenStore.cs @@ -14,6 +14,7 @@ using System.Text.Json; using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.Options; using OpenIddict.EntityFramework.Models; +using static OpenIddict.Abstractions.OpenIddictExceptions; namespace OpenIddict.EntityFramework; @@ -139,7 +140,7 @@ public class OpenIddictEntityFrameworkTokenStore : I // Reset the state of the entity to prevents future calls to SaveChangesAsync() from failing. Context.Entry(scope).State = EntityState.Unchanged; - throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0245), exception); + throw new ConcurrencyException(SR.GetResourceString(SR.ID0245), exception); } } @@ -702,7 +703,7 @@ public class OpenIddictEntityFrameworkCoreScopeStore : I // Reset the state of the entity to prevents future calls to SaveChangesAsync() from failing. Context.Entry(scope).State = EntityState.Unchanged; - throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0245), exception); + throw new ConcurrencyException(SR.GetResourceString(SR.ID0245), exception); } } diff --git a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreTokenStore.cs b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreTokenStore.cs index 50ef2831..aa39b2f4 100644 --- a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreTokenStore.cs +++ b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreTokenStore.cs @@ -13,6 +13,7 @@ using System.Text.Json; using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.Options; using OpenIddict.EntityFrameworkCore.Models; +using static OpenIddict.Abstractions.OpenIddictExceptions; namespace OpenIddict.EntityFrameworkCore; @@ -159,7 +160,7 @@ public class OpenIddictEntityFrameworkCoreTokenStore : IOpenIddictApplic entity.Id == application.Id && entity.ConcurrencyToken == application.ConcurrencyToken, cancellationToken)).DeletedCount == 0) { - throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0239)); + throw new ConcurrencyException(SR.GetResourceString(SR.ID0239)); } // Delete the authorizations associated with the application. @@ -661,7 +662,7 @@ public class OpenIddictMongoDbApplicationStore : IOpenIddictApplic entity.Id == application.Id && entity.ConcurrencyToken == timestamp, application, null as ReplaceOptions, cancellationToken)).MatchedCount == 0) { - throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0239)); + throw new ConcurrencyException(SR.GetResourceString(SR.ID0239)); } } } diff --git a/src/OpenIddict.MongoDb/Stores/OpenIddictMongoDbAuthorizationStore.cs b/src/OpenIddict.MongoDb/Stores/OpenIddictMongoDbAuthorizationStore.cs index 21cf7f26..cb1c14eb 100644 --- a/src/OpenIddict.MongoDb/Stores/OpenIddictMongoDbAuthorizationStore.cs +++ b/src/OpenIddict.MongoDb/Stores/OpenIddictMongoDbAuthorizationStore.cs @@ -11,6 +11,7 @@ using System.Text.Encodings.Web; using System.Text.Json; using Microsoft.Extensions.Options; using OpenIddict.MongoDb.Models; +using static OpenIddict.Abstractions.OpenIddictExceptions; namespace OpenIddict.MongoDb; @@ -92,7 +93,7 @@ public class OpenIddictMongoDbAuthorizationStore : IOpenIddictAu entity.Id == authorization.Id && entity.ConcurrencyToken == authorization.ConcurrencyToken, cancellationToken)).DeletedCount == 0) { - throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0241)); + throw new ConcurrencyException(SR.GetResourceString(SR.ID0241)); } // Delete the tokens associated with the authorization. @@ -721,7 +722,7 @@ public class OpenIddictMongoDbAuthorizationStore : IOpenIddictAu entity.Id == authorization.Id && entity.ConcurrencyToken == timestamp, authorization, null as ReplaceOptions, cancellationToken)).MatchedCount == 0) { - throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0241)); + throw new ConcurrencyException(SR.GetResourceString(SR.ID0241)); } } } diff --git a/src/OpenIddict.MongoDb/Stores/OpenIddictMongoDbScopeStore.cs b/src/OpenIddict.MongoDb/Stores/OpenIddictMongoDbScopeStore.cs index d1e086fe..498fe29a 100644 --- a/src/OpenIddict.MongoDb/Stores/OpenIddictMongoDbScopeStore.cs +++ b/src/OpenIddict.MongoDb/Stores/OpenIddictMongoDbScopeStore.cs @@ -12,6 +12,7 @@ using System.Text.Encodings.Web; using System.Text.Json; using Microsoft.Extensions.Options; using OpenIddict.MongoDb.Models; +using static OpenIddict.Abstractions.OpenIddictExceptions; namespace OpenIddict.MongoDb; @@ -93,7 +94,7 @@ public class OpenIddictMongoDbScopeStore : IOpenIddictScopeStore entity.Id == scope.Id && entity.ConcurrencyToken == scope.ConcurrencyToken, cancellationToken)).DeletedCount == 0) { - throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0245)); + throw new ConcurrencyException(SR.GetResourceString(SR.ID0245)); } } @@ -513,7 +514,7 @@ public class OpenIddictMongoDbScopeStore : IOpenIddictScopeStore entity.Id == scope.Id && entity.ConcurrencyToken == timestamp, scope, null as ReplaceOptions, cancellationToken)).MatchedCount == 0) { - throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0245)); + throw new ConcurrencyException(SR.GetResourceString(SR.ID0245)); } } } diff --git a/src/OpenIddict.MongoDb/Stores/OpenIddictMongoDbTokenStore.cs b/src/OpenIddict.MongoDb/Stores/OpenIddictMongoDbTokenStore.cs index 19041271..68881a20 100644 --- a/src/OpenIddict.MongoDb/Stores/OpenIddictMongoDbTokenStore.cs +++ b/src/OpenIddict.MongoDb/Stores/OpenIddictMongoDbTokenStore.cs @@ -11,6 +11,7 @@ using System.Text.Encodings.Web; using System.Text.Json; using Microsoft.Extensions.Options; using OpenIddict.MongoDb.Models; +using static OpenIddict.Abstractions.OpenIddictExceptions; namespace OpenIddict.MongoDb; @@ -92,7 +93,7 @@ public class OpenIddictMongoDbTokenStore : IOpenIddictTokenStore entity.Id == token.Id && entity.ConcurrencyToken == token.ConcurrencyToken, cancellationToken)).DeletedCount == 0) { - throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0247)); + throw new ConcurrencyException(SR.GetResourceString(SR.ID0247)); } } @@ -808,7 +809,7 @@ public class OpenIddictMongoDbTokenStore : IOpenIddictTokenStore entity.Id == token.Id && entity.ConcurrencyToken == timestamp, token, null as ReplaceOptions, cancellationToken)).MatchedCount == 0) { - throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0247)); + throw new ConcurrencyException(SR.GetResourceString(SR.ID0247)); } } } diff --git a/src/OpenIddict.Validation/OpenIddictValidationService.cs b/src/OpenIddict.Validation/OpenIddictValidationService.cs index 441cd941..0568ec8b 100644 --- a/src/OpenIddict.Validation/OpenIddictValidationService.cs +++ b/src/OpenIddict.Validation/OpenIddictValidationService.cs @@ -9,6 +9,7 @@ using System.Security.Claims; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.IdentityModel.Tokens; +using static OpenIddict.Abstractions.OpenIddictExceptions; namespace OpenIddict.Validation; @@ -76,7 +77,7 @@ public class OpenIddictValidationService if (context.IsRejected) { - throw new OpenIddictExceptions.ProtocolException( + throw new ProtocolException( SR.FormatID0148(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -96,7 +97,7 @@ public class OpenIddictValidationService if (context.IsRejected) { - throw new OpenIddictExceptions.ProtocolException( + throw new ProtocolException( SR.FormatID0149(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -118,7 +119,7 @@ public class OpenIddictValidationService if (context.IsRejected) { - throw new OpenIddictExceptions.ProtocolException( + throw new ProtocolException( SR.FormatID0150(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -143,7 +144,7 @@ public class OpenIddictValidationService if (context.IsRejected) { - throw new OpenIddictExceptions.ProtocolException( + throw new ProtocolException( SR.FormatID0151(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -220,7 +221,7 @@ public class OpenIddictValidationService if (context.IsRejected) { - throw new OpenIddictExceptions.ProtocolException( + throw new ProtocolException( SR.FormatID0152(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -240,7 +241,7 @@ public class OpenIddictValidationService if (context.IsRejected) { - throw new OpenIddictExceptions.ProtocolException( + throw new ProtocolException( SR.FormatID0153(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -262,7 +263,7 @@ public class OpenIddictValidationService if (context.IsRejected) { - throw new OpenIddictExceptions.ProtocolException( + throw new ProtocolException( SR.FormatID0154(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -286,7 +287,7 @@ public class OpenIddictValidationService if (context.IsRejected) { - throw new OpenIddictExceptions.ProtocolException( + throw new ProtocolException( SR.FormatID0155(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -382,7 +383,7 @@ public class OpenIddictValidationService if (context.IsRejected) { - throw new OpenIddictExceptions.ProtocolException( + throw new ProtocolException( SR.FormatID0158(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -402,7 +403,7 @@ public class OpenIddictValidationService if (context.IsRejected) { - throw new OpenIddictExceptions.ProtocolException( + throw new ProtocolException( SR.FormatID0159(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -424,7 +425,7 @@ public class OpenIddictValidationService if (context.IsRejected) { - throw new OpenIddictExceptions.ProtocolException( + throw new ProtocolException( SR.FormatID0160(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -450,7 +451,7 @@ public class OpenIddictValidationService if (context.IsRejected) { - throw new OpenIddictExceptions.ProtocolException( + throw new ProtocolException( SR.FormatID0161(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -513,7 +514,7 @@ public class OpenIddictValidationService if (context.IsRejected) { - throw new OpenIddictExceptions.ProtocolException( + throw new ProtocolException( SR.FormatID0163(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); }