From 29f88f4b439a44c8c383cd66b54a5f45a5e9ab70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Chalet?= Date: Fri, 18 Sep 2020 18:33:21 +0200 Subject: [PATCH] Change the resource identifiers naming scheme --- .../Helpers/OpenIddictHelpers.cs | 2 +- .../Primitives/OpenIddictConverter.cs | 2 +- .../Primitives/OpenIddictExtensions.cs | 70 +- .../Primitives/OpenIddictMessage.cs | 16 +- .../Primitives/OpenIddictParameter.cs | 12 +- .../Resources/OpenIddictResources.resx | 1174 ++++++++--------- .../Resources/xlf/OpenIddictResources.ar.xlf | 238 ++-- .../Resources/xlf/OpenIddictResources.de.xlf | 238 ++-- .../Resources/xlf/OpenIddictResources.es.xlf | 238 ++-- .../Resources/xlf/OpenIddictResources.fr.xlf | 238 ++-- .../Resources/xlf/OpenIddictResources.gu.xlf | 238 ++-- .../Resources/xlf/OpenIddictResources.hi.xlf | 238 ++-- .../Resources/xlf/OpenIddictResources.it.xlf | 238 ++-- .../Resources/xlf/OpenIddictResources.tr.xlf | 238 ++-- .../xlf/OpenIddictResources.zh-Hans.xlf | 238 ++-- .../xlf/OpenIddictResources.zh-Hant.xlf | 238 ++-- .../Caches/OpenIddictApplicationCache.cs | 16 +- .../Caches/OpenIddictAuthorizationCache.cs | 40 +- .../Caches/OpenIddictScopeCache.cs | 16 +- .../Caches/OpenIddictTokenCache.cs | 36 +- .../Managers/OpenIddictApplicationManager.cs | 76 +- .../OpenIddictAuthorizationManager.cs | 64 +- .../Managers/OpenIddictScopeManager.cs | 20 +- .../Managers/OpenIddictTokenManager.cs | 72 +- src/OpenIddict.Core/OpenIddictCoreBuilder.cs | 50 +- .../OpenIddictCoreExtensions.cs | 8 +- .../OpenIddictApplicationStoreResolver.cs | 2 +- .../OpenIddictAuthorizationStoreResolver.cs | 2 +- .../Resolvers/OpenIddictScopeStoreResolver.cs | 2 +- .../Resolvers/OpenIddictTokenStoreResolver.cs | 2 +- .../OpenIddictEntityFrameworkBuilder.cs | 4 +- ...EntityFrameworkApplicationStoreResolver.cs | 4 +- ...tityFrameworkAuthorizationStoreResolver.cs | 4 +- ...IddictEntityFrameworkScopeStoreResolver.cs | 4 +- ...IddictEntityFrameworkTokenStoreResolver.cs | 4 +- ...enIddictEntityFrameworkApplicationStore.cs | 14 +- ...IddictEntityFrameworkAuthorizationStore.cs | 42 +- .../OpenIddictEntityFrameworkScopeStore.cs | 14 +- .../OpenIddictEntityFrameworkTokenStore.cs | 40 +- .../OpenIddictEntityFrameworkCoreBuilder.cs | 2 +- ...tyFrameworkCoreApplicationStoreResolver.cs | 4 +- ...FrameworkCoreAuthorizationStoreResolver.cs | 4 +- ...ctEntityFrameworkCoreScopeStoreResolver.cs | 4 +- ...ctEntityFrameworkCoreTokenStoreResolver.cs | 4 +- ...dictEntityFrameworkCoreApplicationStore.cs | 14 +- ...ctEntityFrameworkCoreAuthorizationStore.cs | 42 +- ...OpenIddictEntityFrameworkCoreScopeStore.cs | 14 +- ...OpenIddictEntityFrameworkCoreTokenStore.cs | 40 +- .../OpenIddictMongoDbBuilder.cs | 8 +- .../OpenIddictMongoDbContext.cs | 2 +- ...enIddictMongoDbApplicationStoreResolver.cs | 2 +- ...IddictMongoDbAuthorizationStoreResolver.cs | 2 +- .../OpenIddictMongoDbScopeStoreResolver.cs | 2 +- .../OpenIddictMongoDbTokenStoreResolver.cs | 2 +- .../OpenIddictMongoDbApplicationStore.cs | 14 +- .../OpenIddictMongoDbAuthorizationStore.cs | 38 +- .../Stores/OpenIddictMongoDbScopeStore.cs | 14 +- .../Stores/OpenIddictMongoDbTokenStore.cs | 34 +- .../OpenIddictServerAspNetCoreBuilder.cs | 2 +- ...OpenIddictServerAspNetCoreConfiguration.cs | 6 +- .../OpenIddictServerAspNetCoreHandler.cs | 24 +- ...ServerAspNetCoreHandlers.Authentication.cs | 34 +- ...nIddictServerAspNetCoreHandlers.Session.cs | 26 +- .../OpenIddictServerAspNetCoreHandlers.cs | 108 +- .../OpenIddictServerDataProtectionHandlers.cs | 28 +- .../OpenIddictServerOwinBuilder.cs | 2 +- .../OpenIddictServerOwinConfiguration.cs | 2 +- .../OpenIddictServerOwinHandler.cs | 26 +- ...IddictServerOwinHandlers.Authentication.cs | 34 +- .../OpenIddictServerOwinHandlers.Session.cs | 26 +- .../OpenIddictServerOwinHandlers.cs | 100 +- .../OpenIddictServerOwinMiddlewareFactory.cs | 4 +- .../OpenIddictServerQuartzBuilder.cs | 6 +- .../OpenIddictServerQuartzExtensions.cs | 4 +- .../OpenIddictServerQuartzJob.cs | 6 +- .../OpenIddictServerBuilder.cs | 114 +- .../OpenIddictServerConfiguration.cs | 46 +- .../OpenIddictServerDispatcher.cs | 14 +- .../OpenIddictServerEvents.Authentication.cs | 4 +- .../OpenIddictServerEvents.Session.cs | 4 +- .../OpenIddictServerHandlerDescriptor.cs | 6 +- ...OpenIddictServerHandlers.Authentication.cs | 176 +-- .../OpenIddictServerHandlers.Device.cs | 82 +- .../OpenIddictServerHandlers.Discovery.cs | 36 +- .../OpenIddictServerHandlers.Exchange.cs | 190 +-- .../OpenIddictServerHandlers.Introspection.cs | 90 +- .../OpenIddictServerHandlers.Revocation.cs | 94 +- .../OpenIddictServerHandlers.Session.cs | 26 +- .../OpenIddictServerHandlers.Userinfo.cs | 18 +- .../OpenIddictServerHandlers.cs | 412 +++--- .../OpenIddictServerHelpers.cs | 4 +- .../OpenIddictServerOptions.cs | 6 +- .../OpenIddictValidationAspNetCoreBuilder.cs | 2 +- ...IddictValidationAspNetCoreConfiguration.cs | 4 +- .../OpenIddictValidationAspNetCoreHandler.cs | 16 +- .../OpenIddictValidationAspNetCoreHandlers.cs | 32 +- ...nIddictValidationDataProtectionHandlers.cs | 10 +- .../OpenIddictValidationOwinBuilder.cs | 2 +- .../OpenIddictValidationOwinHandler.cs | 18 +- .../OpenIddictValidationOwinHandlers.cs | 32 +- ...enIddictValidationOwinMiddlewareFactory.cs | 4 +- ...alidationServerIntegrationConfiguration.cs | 6 +- ...tionSystemNetHttpHandlers.Introspection.cs | 6 +- ...enIddictValidationSystemNetHttpHandlers.cs | 16 +- .../OpenIddictValidationBuilder.cs | 34 +- .../OpenIddictValidationConfiguration.cs | 24 +- .../OpenIddictValidationDispatcher.cs | 14 +- .../OpenIddictValidationHandlerDescriptor.cs | 6 +- .../OpenIddictValidationHandlers.Discovery.cs | 20 +- ...nIddictValidationHandlers.Introspection.cs | 12 +- .../OpenIddictValidationHandlers.cs | 88 +- .../OpenIddictValidationHelpers.cs | 4 +- .../OpenIddictValidationOptions.cs | 6 +- .../OpenIddictValidationRetriever.cs | 10 +- .../OpenIddictValidationService.cs | 52 +- .../Primitives/OpenIddictConverterTests.cs | 2 +- .../Primitives/OpenIddictExtensionsTests.cs | 32 +- .../Primitives/OpenIddictMessageTests.cs | 18 +- .../Primitives/OpenIddictParameterTests.cs | 8 +- .../OpenIddictCoreBuilderTests.cs | 24 +- .../OpenIddictCoreExtensionsTests.cs | 8 +- ...OpenIddictApplicationStoreResolverTests.cs | 2 +- ...enIddictAuthorizationStoreResolverTests.cs | 2 +- .../OpenIddictScopeStoreResolverTests.cs | 2 +- .../OpenIddictTokenStoreResolverTests.cs | 2 +- .../OpenIddictEntityFrameworkBuilderTests.cs | 2 +- ...yFrameworkApplicationStoreResolverTests.cs | 4 +- ...rameworkAuthorizationStoreResolverTests.cs | 4 +- ...tEntityFrameworkScopeStoreResolverTests.cs | 4 +- ...tEntityFrameworkTokenStoreResolverTests.cs | 4 +- ...enIddictEntityFrameworkCoreBuilderTests.cs | 2 +- ...meworkCoreApplicationStoreResolverTests.cs | 4 +- ...workCoreAuthorizationStoreResolverTests.cs | 4 +- ...ityFrameworkCoreScopeStoreResolverTests.cs | 4 +- ...ityFrameworkCoreTokenStoreResolverTests.cs | 4 +- .../OpenIddictMongoDbBuilderTests.cs | 8 +- .../OpenIddictMongoDbContextTests.cs | 2 +- ...ictMongoDbApplicationStoreResolverTests.cs | 2 +- ...tMongoDbAuthorizationStoreResolverTests.cs | 2 +- ...penIddictMongoDbScopeStoreResolverTests.cs | 2 +- ...penIddictMongoDbTokenStoreResolverTests.cs | 2 +- ...pNetCoreIntegrationTests.Authentication.cs | 4 +- ...rverAspNetCoreIntegrationTests.Exchange.cs | 2 +- ...spNetCoreIntegrationTests.Introspection.cs | 2 +- ...erAspNetCoreIntegrationTests.Revocation.cs | 2 +- ...erverAspNetCoreIntegrationTests.Session.cs | 4 +- ...nIddictServerAspNetCoreIntegrationTests.cs | 2 +- ...ctServerIntegrationTests.Authentication.cs | 92 +- ...nIddictServerIntegrationTests.Discovery.cs | 4 +- ...enIddictServerIntegrationTests.Exchange.cs | 104 +- ...ictServerIntegrationTests.Introspection.cs | 32 +- ...IddictServerIntegrationTests.Revocation.cs | 26 +- ...penIddictServerIntegrationTests.Session.cs | 14 +- ...enIddictServerIntegrationTests.Userinfo.cs | 6 +- .../OpenIddictServerIntegrationTests.cs | 38 +- ...rverOwinIntegrationTests.Authentication.cs | 4 +- ...dictServerOwinIntegrationTests.Exchange.cs | 2 +- ...erverOwinIntegrationTests.Introspection.cs | 2 +- ...ctServerOwinIntegrationTests.Revocation.cs | 2 +- ...ddictServerOwinIntegrationTests.Session.cs | 4 +- .../OpenIddictServerOwinIntegrationTests.cs | 2 +- .../OpenIddictServerQuartzBuilderTests.cs | 6 +- .../OpenIddictServerQuartzJobTests.cs | 6 +- .../OpenIddictServerBuilderTests.cs | 40 +- 164 files changed, 3585 insertions(+), 3585 deletions(-) diff --git a/shared/OpenIddict.Extensions/Helpers/OpenIddictHelpers.cs b/shared/OpenIddict.Extensions/Helpers/OpenIddictHelpers.cs index 32c9d30f..65624a72 100644 --- a/shared/OpenIddict.Extensions/Helpers/OpenIddictHelpers.cs +++ b/shared/OpenIddict.Extensions/Helpers/OpenIddictHelpers.cs @@ -39,7 +39,7 @@ namespace OpenIddict.Extensions if (!definition.IsGenericTypeDefinition) { - throw new ArgumentException(SR.GetResourceString(SR.ID1262), nameof(definition)); + throw new ArgumentException(SR.GetResourceString(SR.ID0263), nameof(definition)); } if (definition.IsInterface) diff --git a/src/OpenIddict.Abstractions/Primitives/OpenIddictConverter.cs b/src/OpenIddict.Abstractions/Primitives/OpenIddictConverter.cs index 5932cfad..a6c63f02 100644 --- a/src/OpenIddict.Abstractions/Primitives/OpenIddictConverter.cs +++ b/src/OpenIddict.Abstractions/Primitives/OpenIddictConverter.cs @@ -52,7 +52,7 @@ namespace OpenIddict.Abstractions return typeToConvert == typeof(OpenIddictMessage) ? new OpenIddictMessage(document.RootElement.Clone()) : typeToConvert == typeof(OpenIddictRequest) ? new OpenIddictRequest(document.RootElement.Clone()) : typeToConvert == typeof(OpenIddictResponse) ? new OpenIddictResponse(document.RootElement.Clone()) : - throw new ArgumentException(SR.GetResourceString(SR.ID1175), nameof(typeToConvert)); + throw new ArgumentException(SR.GetResourceString(SR.ID0176), nameof(typeToConvert)); } /// diff --git a/src/OpenIddict.Abstractions/Primitives/OpenIddictExtensions.cs b/src/OpenIddict.Abstractions/Primitives/OpenIddictExtensions.cs index 4eae7074..db688500 100644 --- a/src/OpenIddict.Abstractions/Primitives/OpenIddictExtensions.cs +++ b/src/OpenIddict.Abstractions/Primitives/OpenIddictExtensions.cs @@ -97,7 +97,7 @@ namespace OpenIddict.Abstractions if (string.IsNullOrEmpty(value)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1176), nameof(value)); + throw new ArgumentException(SR.GetResourceString(SR.ID0177), nameof(value)); } return HasValue(request.AcrValues, value, Separators.Space); @@ -117,7 +117,7 @@ namespace OpenIddict.Abstractions if (string.IsNullOrEmpty(prompt)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1177), nameof(prompt)); + throw new ArgumentException(SR.GetResourceString(SR.ID0178), nameof(prompt)); } return HasValue(request.Prompt, prompt, Separators.Space); @@ -137,7 +137,7 @@ namespace OpenIddict.Abstractions if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1178), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0179), nameof(type)); } return HasValue(request.ResponseType, type, Separators.Space); @@ -157,7 +157,7 @@ namespace OpenIddict.Abstractions if (string.IsNullOrEmpty(scope)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1179), nameof(scope)); + throw new ArgumentException(SR.GetResourceString(SR.ID0180), nameof(scope)); } return HasValue(request.Scope, scope, Separators.Space); @@ -550,7 +550,7 @@ namespace OpenIddict.Abstractions if (string.IsNullOrEmpty(destination)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1180), nameof(destination)); + throw new ArgumentException(SR.GetResourceString(SR.ID0181), nameof(destination)); } claim.Properties.TryGetValue(Properties.Destinations, out string? destinations); @@ -595,7 +595,7 @@ namespace OpenIddict.Abstractions if (destinations.Any(destination => string.IsNullOrEmpty(destination))) { - throw new ArgumentException(SR.GetResourceString(SR.ID1181), nameof(destinations)); + throw new ArgumentException(SR.GetResourceString(SR.ID0182), nameof(destinations)); } using var stream = new MemoryStream(); @@ -662,7 +662,7 @@ namespace OpenIddict.Abstractions { if (!destinations.SetEquals(claims[index].GetDestinations())) { - throw new InvalidOperationException(SR.FormatID1182(group.Key)); + throw new InvalidOperationException(SR.FormatID0183(group.Key)); } } @@ -787,12 +787,12 @@ namespace OpenIddict.Abstractions if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1183), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0184), nameof(type)); } if (string.IsNullOrEmpty(value)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1184), nameof(value)); + throw new ArgumentException(SR.GetResourceString(SR.ID0185), nameof(value)); } identity.AddClaim(new Claim(type, value)); @@ -815,12 +815,12 @@ namespace OpenIddict.Abstractions if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1183), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0184), nameof(type)); } if (string.IsNullOrEmpty(value)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1184), nameof(value)); + throw new ArgumentException(SR.GetResourceString(SR.ID0185), nameof(value)); } identity.AddClaim(new Claim(type, value).SetDestinations(destinations)); @@ -852,7 +852,7 @@ namespace OpenIddict.Abstractions if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1183), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0184), nameof(type)); } return identity.FindFirst(type)?.Value; @@ -873,7 +873,7 @@ namespace OpenIddict.Abstractions if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1183), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0184), nameof(type)); } return principal.FindFirst(type)?.Value; @@ -894,7 +894,7 @@ namespace OpenIddict.Abstractions if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1183), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0184), nameof(type)); } return identity.FindAll(type).Select(claim => claim.Value).Distinct(StringComparer.Ordinal).ToImmutableArray(); @@ -915,7 +915,7 @@ namespace OpenIddict.Abstractions if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1183), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0184), nameof(type)); } return identity.FindAll(type).Any(); @@ -936,7 +936,7 @@ namespace OpenIddict.Abstractions if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1183), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0184), nameof(type)); } return principal.FindAll(type).Select(claim => claim.Value).Distinct(StringComparer.Ordinal).ToImmutableArray(); @@ -957,7 +957,7 @@ namespace OpenIddict.Abstractions if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1183), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0184), nameof(type)); } return principal.FindAll(type).Any(); @@ -978,7 +978,7 @@ namespace OpenIddict.Abstractions if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1183), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0184), nameof(type)); } foreach (var claim in identity.FindAll(type).ToList()) @@ -1004,7 +1004,7 @@ namespace OpenIddict.Abstractions if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1183), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0184), nameof(type)); } foreach (var identity in principal.Identities) @@ -1034,7 +1034,7 @@ namespace OpenIddict.Abstractions if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1183), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0184), nameof(type)); } identity.RemoveClaims(type); @@ -1063,7 +1063,7 @@ namespace OpenIddict.Abstractions if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1183), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0184), nameof(type)); } principal.RemoveClaims(type); @@ -1092,7 +1092,7 @@ namespace OpenIddict.Abstractions if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1183), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0184), nameof(type)); } identity.RemoveClaims(type); @@ -1121,7 +1121,7 @@ namespace OpenIddict.Abstractions if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1183), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0184), nameof(type)); } principal.RemoveClaims(type); @@ -1313,7 +1313,7 @@ namespace OpenIddict.Abstractions if (string.IsNullOrEmpty(audience)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1185), nameof(audience)); + throw new ArgumentException(SR.GetResourceString(SR.ID0186), nameof(audience)); } return principal.HasClaim(Claims.Private.Audience, audience); @@ -1342,7 +1342,7 @@ namespace OpenIddict.Abstractions if (string.IsNullOrEmpty(presenter)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1186), nameof(presenter)); + throw new ArgumentException(SR.GetResourceString(SR.ID0187), nameof(presenter)); } return principal.HasClaim(Claims.Private.Presenter, presenter); @@ -1371,7 +1371,7 @@ namespace OpenIddict.Abstractions if (string.IsNullOrEmpty(resource)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1061), nameof(resource)); + throw new ArgumentException(SR.GetResourceString(SR.ID0062), nameof(resource)); } return principal.HasClaim(Claims.Private.Resource, resource); @@ -1400,7 +1400,7 @@ namespace OpenIddict.Abstractions if (string.IsNullOrEmpty(scope)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1179), nameof(scope)); + throw new ArgumentException(SR.GetResourceString(SR.ID0180), nameof(scope)); } return principal.HasClaim(Claims.Private.Scope, scope); @@ -1421,7 +1421,7 @@ namespace OpenIddict.Abstractions if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1187), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0188), nameof(type)); } return string.Equals(principal.GetTokenType(), type, StringComparison.OrdinalIgnoreCase); @@ -1648,7 +1648,7 @@ namespace OpenIddict.Abstractions private static ImmutableArray GetValues(string? source, char[] separators) { - Debug.Assert(separators is not null && separators.Length != 0, SR.GetResourceString(SR.ID5001)); + Debug.Assert(separators is not null && separators.Length != 0, SR.GetResourceString(SR.ID4001)); if (string.IsNullOrEmpty(source)) { @@ -1678,8 +1678,8 @@ namespace OpenIddict.Abstractions private static bool HasValue(string? source, string value, char[] separators) { - Debug.Assert(!string.IsNullOrEmpty(value), SR.GetResourceString(SR.ID5002)); - Debug.Assert(separators is not null && separators.Length != 0, SR.GetResourceString(SR.ID5001)); + Debug.Assert(!string.IsNullOrEmpty(value), SR.GetResourceString(SR.ID4002)); + Debug.Assert(separators is not null && separators.Length != 0, SR.GetResourceString(SR.ID4001)); if (string.IsNullOrEmpty(source)) { @@ -1705,7 +1705,7 @@ namespace OpenIddict.Abstractions private static StringSegment TrimStart(StringSegment segment, char[] separators) { - Debug.Assert(separators is not null && separators.Length != 0, SR.GetResourceString(SR.ID5001)); + Debug.Assert(separators is not null && separators.Length != 0, SR.GetResourceString(SR.ID4001)); var index = segment.Offset; @@ -1724,7 +1724,7 @@ namespace OpenIddict.Abstractions private static StringSegment TrimEnd(StringSegment segment, char[] separators) { - Debug.Assert(separators is not null && separators.Length != 0, SR.GetResourceString(SR.ID5001)); + Debug.Assert(separators is not null && separators.Length != 0, SR.GetResourceString(SR.ID4001)); var index = segment.Offset + segment.Length - 1; @@ -1743,14 +1743,14 @@ namespace OpenIddict.Abstractions private static StringSegment Trim(StringSegment segment, char[] separators) { - Debug.Assert(separators is not null && separators.Length != 0, SR.GetResourceString(SR.ID5001)); + Debug.Assert(separators is not null && separators.Length != 0, SR.GetResourceString(SR.ID4001)); return TrimEnd(TrimStart(segment, separators), separators); } private static bool IsSeparator(char character, char[] separators) { - Debug.Assert(separators is not null && separators.Length != 0, SR.GetResourceString(SR.ID5001)); + Debug.Assert(separators is not null && separators.Length != 0, SR.GetResourceString(SR.ID4001)); for (var index = 0; index < separators!.Length; index++) { diff --git a/src/OpenIddict.Abstractions/Primitives/OpenIddictMessage.cs b/src/OpenIddict.Abstractions/Primitives/OpenIddictMessage.cs index 12a259d7..fa14dadd 100644 --- a/src/OpenIddict.Abstractions/Primitives/OpenIddictMessage.cs +++ b/src/OpenIddict.Abstractions/Primitives/OpenIddictMessage.cs @@ -46,7 +46,7 @@ namespace OpenIddict.Abstractions { if (parameters.ValueKind != JsonValueKind.Object) { - throw new ArgumentException(SR.GetResourceString(SR.ID1188), nameof(parameters)); + throw new ArgumentException(SR.GetResourceString(SR.ID0189), nameof(parameters)); } foreach (var parameter in parameters.EnumerateObject()) @@ -192,12 +192,12 @@ namespace OpenIddict.Abstractions { if (string.IsNullOrEmpty(name)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1189), nameof(name)); + throw new ArgumentException(SR.GetResourceString(SR.ID0190), nameof(name)); } if (Parameters.ContainsKey(name)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1190), nameof(name)); + throw new ArgumentException(SR.GetResourceString(SR.ID0191), nameof(name)); } Parameters.Add(name, value); @@ -214,7 +214,7 @@ namespace OpenIddict.Abstractions { if (string.IsNullOrEmpty(name)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1189), nameof(name)); + throw new ArgumentException(SR.GetResourceString(SR.ID0190), nameof(name)); } if (Parameters.TryGetValue(name, out OpenIddictParameter value)) @@ -241,7 +241,7 @@ namespace OpenIddict.Abstractions { if (string.IsNullOrEmpty(name)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1189), nameof(name)); + throw new ArgumentException(SR.GetResourceString(SR.ID0190), nameof(name)); } return Parameters.ContainsKey(name); @@ -256,7 +256,7 @@ namespace OpenIddict.Abstractions { if (string.IsNullOrEmpty(name)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1189), nameof(name)); + throw new ArgumentException(SR.GetResourceString(SR.ID0190), nameof(name)); } Parameters.Remove(name); @@ -275,7 +275,7 @@ namespace OpenIddict.Abstractions { if (string.IsNullOrEmpty(name)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1189), nameof(name)); + throw new ArgumentException(SR.GetResourceString(SR.ID0190), nameof(name)); } // If the parameter value is null or empty, remove the corresponding entry from the collection. @@ -302,7 +302,7 @@ namespace OpenIddict.Abstractions { if (string.IsNullOrEmpty(name)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1189), nameof(name)); + throw new ArgumentException(SR.GetResourceString(SR.ID0190), nameof(name)); } return Parameters.TryGetValue(name, out value); diff --git a/src/OpenIddict.Abstractions/Primitives/OpenIddictParameter.cs b/src/OpenIddict.Abstractions/Primitives/OpenIddictParameter.cs index 3582fef3..94821be8 100644 --- a/src/OpenIddict.Abstractions/Primitives/OpenIddictParameter.cs +++ b/src/OpenIddict.Abstractions/Primitives/OpenIddictParameter.cs @@ -300,7 +300,7 @@ namespace OpenIddict.Abstractions { if (string.IsNullOrEmpty(name)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1191), nameof(name)); + throw new ArgumentException(SR.GetResourceString(SR.ID0192), nameof(name)); } if (Value is JsonElement element && element.ValueKind == JsonValueKind.Object) @@ -326,7 +326,7 @@ namespace OpenIddict.Abstractions { if (index < 0) { - throw new ArgumentOutOfRangeException(nameof(index), SR.GetResourceString(SR.ID1192)); + throw new ArgumentOutOfRangeException(nameof(index), SR.GetResourceString(SR.ID0193)); } if (Value is string?[] array) @@ -439,7 +439,7 @@ namespace OpenIddict.Abstractions { if (string.IsNullOrEmpty(name)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1191), nameof(name)); + throw new ArgumentException(SR.GetResourceString(SR.ID0192), nameof(name)); } if (Value is JsonElement element && element.ValueKind == JsonValueKind.Object && @@ -465,7 +465,7 @@ namespace OpenIddict.Abstractions { if (index < 0) { - throw new ArgumentOutOfRangeException(nameof(index), SR.GetResourceString(SR.ID1192)); + throw new ArgumentOutOfRangeException(nameof(index), SR.GetResourceString(SR.ID0193)); } if (Value is string?[] array) @@ -547,7 +547,7 @@ namespace OpenIddict.Abstractions value.WriteTo(writer); break; - default: throw new InvalidOperationException(SR.GetResourceString(SR.ID1193)); + default: throw new InvalidOperationException(SR.GetResourceString(SR.ID0194)); } } @@ -680,7 +680,7 @@ namespace OpenIddict.Abstractions writer.WriteEndArray(); break; - default: throw new InvalidOperationException(SR.GetResourceString(SR.ID1193)); + default: throw new InvalidOperationException(SR.GetResourceString(SR.ID0194)); } writer.Flush(); diff --git a/src/OpenIddict.Abstractions/Resources/OpenIddictResources.resx b/src/OpenIddict.Abstractions/Resources/OpenIddictResources.resx index 7be55fc5..f22b2404 100644 --- a/src/OpenIddict.Abstractions/Resources/OpenIddictResources.resx +++ b/src/OpenIddict.Abstractions/Resources/OpenIddictResources.resx @@ -117,2384 +117,2384 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + An identity cannot be extracted from this token request. This generally indicates that the OpenIddict server stack was asked to validate a token for an invalid grant type (e.g password). {Locked} - + An identity cannot be extracted from this request. This generally indicates that the OpenIddict server stack was asked to validate a token for an endpoint it doesn't manage. To validate tokens received by custom API endpoints, the OpenIddict validation handler (e.g OpenIddictValidationAspNetCoreDefaults.AuthenticationScheme or OpenIddictValidationOwinDefaults.AuthenticationType) must be used instead. {Locked} - + The token type is not supported. {Locked} - + The deserialized principal doesn't contain the mandatory 'oi_tkn_typ' claim. When implementing custom token deserialization, a 'oi_tkn_typ' claim containing the type of the token being processed must be added to the security principal. {Locked} - + The type of token associated with the deserialized principal ({0}) doesn't match the expected token type ({1}). {Locked} - + A challenge response cannot be returned from this endpoint. {Locked} - + The authentication context cannot be found. {Locked} - + The device code identifier cannot be extracted from the principal. {Locked} - + The token identifier cannot be extracted from the principal. {Locked} - + A sign-in response cannot be returned from this endpoint. {Locked} - + The specified principal doesn't contain any claims-based identity. Make sure that 'ClaimsPrincipal.Identity' is not null. {Locked} - + The specified principal contains an authenticated identity, which is not valid when the sign-in operation is triggered from the device authorization endpoint. Make sure that 'ClaimsPrincipal.Identity.AuthenticationType' is null and that 'ClaimsPrincipal.Identity.IsAuthenticated' returns 'false'. {Locked} - + The specified principal contains a subject claim, which is not valid when the sign-in operation is triggered from the device authorization endpoint. {Locked} - + The specified principal doesn't contain a valid/authenticated identity. Make sure that 'ClaimsPrincipal.Identity.AuthenticationType' is not null and that 'ClaimsPrincipal.Identity.IsAuthenticated' returns 'true'. {Locked} - + The specified principal was rejected because the mandatory subject claim was missing. {Locked} - + The core services must be registered when enabling the OpenIddict server feature. To register the OpenIddict core services, reference the 'OpenIddict.Core' package and call 'services.AddOpenIddict().AddCore()' from 'ConfigureServices'. Alternatively, you can disable the built-in database-based server features by enabling the degraded mode with 'services.AddOpenIddict().AddServer().EnableDegradedMode()'. {Locked} - + The application entry cannot be found in the database. {Locked} - + An unknown error occurred while creating an authorization entry. {Locked} - + An unknown error occurred while creating a token entry. {Locked} - + A token entry cannot be created from a null principal. {Locked} - + The token entry cannot be found in the database. {Locked} - + A token cannot be created from a null principal. {Locked} - + The issuer must be a non-null, non-empty absolute URL. {Locked} - + A sign-out response cannot be returned from this endpoint. {Locked} - + The token type cannot be resolved. {Locked} - + The payload associated with a reference token cannot be retrieved. This may indicate that the token entry was corrupted. {Locked} - + The authorization request was not correctly extracted. To extract authorization requests, create a class implementing 'IOpenIddictServerHandler<ExtractAuthorizationRequestContext>' and register it using 'services.AddOpenIddict().AddServer().AddEventHandler()'. {Locked} - + The request cannot be validated because no redirect_uri was specified. {Locked} - + The authorization request was not handled. To handle authorization requests in a controller, create a custom action with the same route as the authorization endpoint and enable the pass-through mode in the server ASP.NET Core or OWIN options using 'services.AddOpenIddict().AddServer().UseAspNetCore().EnableAuthorizationEndpointPassthrough()'. Alternatively, create a class implementing 'IOpenIddictServerHandler<HandleAuthorizationRequestContext>' and register it using 'services.AddOpenIddict().AddServer().AddEventHandler()'. {Locked} - + The authorization response was not correctly applied. To apply authorization responses, create a class implementing 'IOpenIddictServerHandler<ApplyAuthorizationResponseContext>' and register it using 'services.AddOpenIddict().AddServer().AddEventHandler()'. {Locked} - + The device request was not correctly extracted. To extract device requests, create a class implementing 'IOpenIddictServerHandler<ExtractDeviceRequestContext>' and register it using 'services.AddOpenIddict().AddServer().AddEventHandler()'. {Locked} - + The client application details cannot be found in the database. {Locked} - + The device response was not correctly applied. To apply device responses, create a class implementing 'IOpenIddictServerHandler<ApplyDeviceResponseContext>' and register it using 'services.AddOpenIddict().AddServer().AddEventHandler()'. {Locked} - + The verification request was not correctly extracted. To extract verification requests, create a class implementing 'IOpenIddictServerHandler<ExtractVerificationRequestContext>' and register it using 'services.AddOpenIddict().AddServer().AddEventHandler()'. {Locked} - + The verification request was not handled. To handle verification requests in a controller, create a custom action with the same route as the verification endpoint and enable the pass-through mode in the server ASP.NET Core or OWIN options using 'services.AddOpenIddict().AddServer().UseAspNetCore().EnableVerificationEndpointPassthrough()'. Alternatively, create a class implementing 'IOpenIddictServerHandler<HandleVerificationRequestContext>' and register it using 'services.AddOpenIddict().AddServer().AddEventHandler()'. {Locked} - + The verification response was not correctly applied. To apply verification responses, create a class implementing 'IOpenIddictServerHandler<ApplyVerificationResponseContext>' and register it using 'services.AddOpenIddict().AddServer().AddEventHandler()'. {Locked} - + The configuration request was not correctly extracted. To extract configuration requests, create a class implementing 'IOpenIddictServerHandler<ExtractConfigurationRequestContext>' and register it using 'services.AddOpenIddict().AddServer().AddEventHandler()'. {Locked} - + The cryptography request was not correctly extracted. To extract configuration requests, create a class implementing 'IOpenIddictServerHandler<ExtractCryptographyRequestContext>' and register it using 'services.AddOpenIddict().AddServer().AddEventHandler()'. {Locked} - + The cryptography response was not correctly applied. To apply cryptography responses, create a class implementing 'IOpenIddictServerHandler<ApplyCryptographyResponseContext>' and register it using 'services.AddOpenIddict().AddServer().AddEventHandler()'. {Locked} - + The token request was not correctly extracted. To extract token requests, create a class implementing 'IOpenIddictServerHandler<ExtractTokenRequestContext>' and register it using 'services.AddOpenIddict().AddServer().AddEventHandler()'. {Locked} - + The token request was not handled. To handle token requests in a controller, create a custom action with the same route as the token endpoint and enable the pass-through mode in the server ASP.NET Core or OWIN options using 'services.AddOpenIddict().AddServer().UseAspNetCore().EnableTokenEndpointPassthrough()'. Alternatively, create a class implementing 'IOpenIddictServerHandler<HandleTokenRequestContext>' and register it using 'services.AddOpenIddict().AddServer().AddEventHandler()'. {Locked} - + The token response was not correctly applied. To apply token responses, create a class implementing 'IOpenIddictServerHandler<ApplyTokenResponseContext>' and register it using 'services.AddOpenIddict().AddServer().AddEventHandler()'. {Locked} - + The presenters list cannot be extracted from the authorization code. {Locked} - + The presenters list cannot be extracted from the device code. {Locked} - + The specified code challenge method is not supported. {Locked} - + The introspection request was not correctly extracted. To extract introspection requests, create a class implementing 'IOpenIddictServerHandler<ExtractIntrospectionRequestContext>' and register it using 'services.AddOpenIddict().AddServer().AddEventHandler()'. {Locked} - + The introspection response was not correctly applied. To apply introspection responses, create a class implementing 'IOpenIddictServerHandler<ApplyIntrospectionResponseContext>' and register it using 'services.AddOpenIddict().AddServer().AddEventHandler()'. {Locked} - + The revocation request was not correctly extracted. To extract revocation requests, create a class implementing 'IOpenIddictServerHandler<ExtractRevocationRequestContext>' and register it using 'services.AddOpenIddict().AddServer().AddEventHandler()'. {Locked} - + The revocation response was not correctly applied. To apply revocation responses, create a class implementing 'IOpenIddictServerHandler<ApplyRevocationResponseContext>' and register it using 'services.AddOpenIddict().AddServer().AddEventHandler()'. {Locked} - + The logout request was not correctly extracted. To extract logout requests, create a class implementing 'IOpenIddictServerHandler<ExtractLogoutRequestContext>' and register it using 'services.AddOpenIddict().AddServer().AddEventHandler()'. {Locked} - + The logout request was not handled. To handle logout requests in a controller, create a custom controller action with the same route as the logout endpoint and enable the pass-through mode in the server ASP.NET Core or OWIN options using 'services.AddOpenIddict().AddServer().UseAspNetCore().EnableLogoutEndpointPassthrough()'. Alternatively, create a class implementing 'IOpenIddictServerHandler<HandleLogoutRequestContext>' and register it using 'services.AddOpenIddict().AddServer().AddEventHandler()'. {Locked} - + The logout response was not correctly applied. To apply logout responses, create a class implementing 'IOpenIddictServerHandler<ApplyLogoutResponseContext>' and register it using 'services.AddOpenIddict().AddServer().AddEventHandler()'. {Locked} - + The userinfo request was not correctly extracted. To extract userinfo requests, create a class implementing 'IOpenIddictServerHandler<ExtractUserinfoRequestContext>' and register it using 'services.AddOpenIddict().AddServer().AddEventHandler()'. {Locked} - + The userinfo response was not correctly applied. To apply userinfo responses, create a class implementing 'IOpenIddictServerHandler<ApplyUserinfoResponseContext>' and register it using 'services.AddOpenIddict().AddServer().AddEventHandler()'. {Locked} - + The asymmetric encryption key doesn't contain the required private key. {Locked} - + An encryption algorithm cannot be automatically inferred from the encrypting key. Consider using 'options.AddEncryptionCredentials(EncryptingCredentials)' instead. {Locked} - + The algorithm cannot be null or empty. {Locked} - + The specified algorithm is not supported. {Locked} - + RSA key generation failed. {Locked} - + The specified certificate is not a key encryption certificate. {Locked} - + The specified certificate doesn't contain the required private key. {Locked} - + The resource cannot be null or empty. {Locked} - + The password cannot be null or empty. {Locked} - + The certificate was not found in the specified assembly. {Locked} - + The thumbprint cannot be null or empty. {Locked} - + The certificate corresponding to the specified thumbprint was not found. {Locked} - + The asymmetric signing key doesn't contain the required private key. {Locked} - + A signature algorithm cannot be automatically inferred from the signing key. Consider using 'options.AddSigningCredentials(SigningCredentials)' instead. {Locked} - + ECDSA signing keys are not supported on this platform. {Locked} - + The specified certificate is not a signing certificate. {Locked} - + The grant type cannot be null or empty. {Locked} - + Endpoint addresses must be valid URLs. {Locked} - + Claims cannot be null or empty. {Locked} - + Scopes cannot be null or empty. {Locked} - + The security token handler cannot be null. {Locked} - + At least one OAuth 2.0/OpenID Connect flow must be enabled. {Locked} - + The authorization endpoint must be enabled to use the authorization code and implicit flows. {Locked} - + The device endpoint must be enabled to use the device flow. {Locked} - + The token endpoint must be enabled to use the authorization code, client credentials, device, password and refresh token flows. {Locked} - + The verification endpoint must be enabled to use the device flow. {Locked} - + Endpoint addresses cannot start with '{0}'. {Locked} - + Dependency injection support must be enabled in Quartz.NET when using the OpenIddict server integration. To enable DI support, call 'services.AddQuartz(options => options.UseMicrosoftDependencyInjectionJobFactory())'. {Locked} - + Reference tokens cannot be used when disabling token storage. {Locked} - + Sliding expiration must be disabled when turning off token storage if rolling tokens are not used. {Locked} - + At least one encryption key must be registered in the OpenIddict server options. Consider registering a certificate using 'services.AddOpenIddict().AddServer().AddEncryptionCertificate()' or 'services.AddOpenIddict().AddServer().AddDevelopmentEncryptionCertificate()' or call 'services.AddOpenIddict().AddServer().AddEphemeralEncryptionKey()' to use an ephemeral key. {Locked} - + At least one asymmetric signing key must be registered in the OpenIddict server options. Consider registering a certificate using 'services.AddOpenIddict().AddServer().AddSigningCertificate()' or 'services.AddOpenIddict().AddServer().AddDevelopmentSigningCertificate()' or call 'services.AddOpenIddict().AddServer().AddEphemeralSigningKey()' to use an ephemeral key. {Locked} - + When using X.509 encryption credentials, at least one of the registered certificates must be valid. To use key rollover, register both the new certificate and the old one in the credentials collection. {Locked} - + When using X.509 signing credentials, at least one of the registered certificates must be valid. To use key rollover, register both the new certificate and the old one in the credentials collection. {Locked} - + No custom authorization request validation handler was found. When enabling the degraded mode, a custom 'IOpenIddictServerHandler<ValidateAuthorizationRequestContext>' must be implemented to validate authorization requests (e.g to ensure the client_id and redirect_uri are valid). {Locked} - + No custom device request validation handler was found. When enabling the degraded mode, a custom 'IOpenIddictServerHandler<ValidateDeviceRequestContext>' must be implemented to validate device requests (e.g to ensure the client_id and client_secret are valid). {Locked} - + No custom introspection request validation handler was found. When enabling the degraded mode, a custom 'IOpenIddictServerHandler<ValidateIntrospectionRequestContext>' must be implemented to validate introspection requests (e.g to ensure the client_id and client_secret are valid). {Locked} - + No custom logout request validation handler was found. When enabling the degraded mode, a custom 'IOpenIddictServerHandler<ValidateLogoutRequestContext>' must be implemented to validate logout requests (e.g to ensure the post_logout_redirect_uri is valid). {Locked} - + No custom revocation request validation handler was found. When enabling the degraded mode, a custom 'IOpenIddictServerHandler<ValidateRevocationRequestContext>' must be implemented to validate revocation requests (e.g to ensure the client_id and client_secret are valid). {Locked} - + No custom token request validation handler was found. When enabling the degraded mode, a custom 'IOpenIddictServerHandler<ValidateTokenRequestContext>' must be implemented to validate token requests (e.g to ensure the client_id and client_secret are valid). {Locked} - + No custom verification request validation handler was found. When enabling the degraded mode, a custom 'IOpenIddictServerHandler<ValidateVerificationRequestContext>' must be implemented to validate verification requests (e.g to ensure the user_code is valid). {Locked} - + No custom verification authentication handler was found. When enabling the degraded mode, a custom 'IOpenIddictServerHandler<ProcessAuthenticationContext>' must be implemented to validate device and user codes (e.g by retrieving them from a database). {Locked} - + No custom verification sign-in handler was found. When enabling the degraded mode, a custom 'IOpenIddictServerHandler<ProcessSignInContext>' must be implemented to generate device and user codes and storing them in a database, if applicable. {Locked} - + The event handler of type '{0}' couldn't be resolved. This may indicate that it was not properly registered in the dependency injection container. To register an event handler, use 'services.AddOpenIddict().AddServer().AddEventHandler()'. {Locked} - + The event handler filter of type '{0}' couldn't be resolved. This may indicate that it was not properly registered in the dependency injection container. {Locked} - + The redirect_uri cannot be null or empty. {Locked} - + The authorization request cannot be validated because a different redirect_uri was specified by the client application. {Locked} - + The post_logout_redirect_uri cannot be null or empty. {Locked} - + The end session request cannot be validated because a different post_logout_redirect_uri was specified by the client application. {Locked} - + The specified service type is not valid. {Locked} - + No service descriptor was set. {Locked} - + The property name cannot be null or empty. {Locked} - + The realm cannot be null or empty. {Locked} - + The OpenIddict ASP.NET Core server handler cannot be registered as an authentication scheme. This may indicate that an instance of another handler was registered with the same scheme. {Locked} - + The OpenIddict ASP.NET Core server cannot be used as the default scheme handler. Make sure that neither DefaultAuthenticateScheme, DefaultChallengeScheme, DefaultForbidScheme, DefaultSignInScheme, DefaultSignOutScheme nor DefaultScheme point to an instance of the OpenIddict ASP.NET Core server handler. {Locked} - + The error pass-through mode cannot be used when the status code pages integration is enabled. {Locked} - + The OpenID Connect response was not correctly processed. This may indicate that the event handler responsible of processing OpenID Connect responses was not registered or was explicitly removed from the handlers list. {Locked} - + An unknown error occurred while retrieving the OpenIddict server context. {Locked} - + An error occurred while authenticating the current request. {Locked} - + The ASP.NET Core HTTP request cannot be resolved. {Locked} - + Only strings, booleans, integers, arrays of strings and instances of type 'OpenIddictParameter' or 'JsonElement' can be returned as custom parameters. {Locked} - + A distributed cache instance must be registered when enabling request caching. To register the default in-memory distributed cache implementation, reference the 'Microsoft.Extensions.Caching.Memory' package and call 'services.AddDistributedMemoryCache()' from 'ConfigureServices'. {Locked} - + The authorization request payload is malformed. {Locked} - + The logout request payload is malformed. {Locked} - + The OpenIddict OWIN server handler cannot be used as an active authentication handler. Make sure that 'OpenIddictServerOwinOptions.AuthenticationMode' is not set to 'Active'. {Locked} - + The OWIN request cannot be resolved. {Locked} - + No service provider was found in the OWIN context. For the OpenIddict server services to work correctly, a per-request 'IServiceProvider' must be attached to the OWIN environment with the dictionary key 'System.IServiceProvider'. Note: when using a dependency injection container supporting middleware resolution (like Autofac), the 'app.UseOpenIddictServer()' extension MUST NOT be called. {Locked} - + The OpenIddict server services cannot be resolved from the DI container. To register the server services, use 'services.AddOpenIddict().AddServer()'. {Locked} - + Audiences cannot be null or empty. {Locked} - + The client identifier cannot be null or empty. {Locked} - + The client secret cannot be null or empty. {Locked} - + The issuer cannot be null or empty. {Locked} - + The issuer must be a valid absolute URL. {Locked} - + An OAuth 2.0/OpenID Connect server configuration or an issuer address must be registered. To use a local OpenIddict server, reference the 'OpenIddict.Validation.ServerIntegration' package and call 'services.AddOpenIddict().AddValidation().UseLocalServer()' to import the server settings. To use a remote server, reference the 'OpenIddict.Validation.SystemNetHttp' package and call 'services.AddOpenIddict().AddValidation().UseSystemNetHttp()' and 'services.AddOpenIddict().AddValidation().SetIssuer()' to use server discovery. Alternatively, you can register a static server configuration by calling 'services.AddOpenIddict().AddValidation().SetConfiguration()'. {Locked} - + An introspection client must be registered when using introspection. Reference the 'OpenIddict.Validation.SystemNetHttp' package and call 'services.AddOpenIddict().AddValidation().UseSystemNetHttp()' to register the default System.Net.Http-based integration. {Locked} - + The issuer or the metadata address must be set when using introspection. {Locked} - + The client identifier cannot be null or empty when using introspection. {Locked} - + The client secret cannot be null or empty when using introspection. {Locked} - + Authorization validation cannot be enabled when using introspection. {Locked} - + Token validation cannot be enabled when using introspection. {Locked} - + A discovery client must be registered when using server discovery. Reference the 'OpenIddict.Validation.SystemNetHttp' package and call 'services.AddOpenIddict().AddValidation().UseSystemNetHttp()' to register the default System.Net.Http-based integration. {Locked} - + The authority must be provided and must be an absolute URL. {Locked} - + The authority cannot contain a fragment or a query string. {Locked} - + The event handler of type '{0}' couldn't be resolved. This may indicate that it was not properly registered in the dependency injection container. To register an event handler, use 'services.AddOpenIddict().AddValidation().AddEventHandler()'. {Locked} - + The core services must be registered when enabling token entry validation. To register the OpenIddict core services, reference the 'OpenIddict.Core' package and call 'services.AddOpenIddict().AddCore()' from 'ConfigureServices'. {Locked} - + An unknown error occurred while retrieving the server configuration. {Locked} - + An unknown error occurred while introspecting the access token. {Locked} - + The core services must be registered when enabling authorization entry validation. To register the OpenIddict core services, reference the 'OpenIddict.Core' package and call 'services.AddOpenIddict().AddCore()' from 'ConfigureServices'. {Locked} - + The address cannot be null or empty. {Locked} - + The address must be a valid absolute URI. {Locked} - + The server configuration couldn't be retrieved. {Locked} - + The JWKS URI couldn't be resolved from the provider metadata. {Locked} - + The server JSON Web Key set couldn't be retrieved. {Locked} - + An error occurred while preparing the configuration request. Error: {0} Error description: {1} Error URI: {2} {Locked} - + An error occurred while sending the configuration request. Error: {0} Error description: {1} Error URI: {2} {Locked} - + An error occurred while extracting the configuration response. Error: {0} Error description: {1} Error URI: {2} {Locked} - + An error occurred while handling the configuration response. Error: {0} Error description: {1} Error URI: {2} {Locked} - + An error occurred while preparing the cryptography request. Error: {0} Error description: {1} Error URI: {2} {Locked} - + An error occurred while sending the cryptography request. Error: {0} Error description: {1} Error URI: {2} {Locked} - + An error occurred while extracting the cryptography response. Error: {0} Error description: {1} Error URI: {2} {Locked} - + An error occurred while handling the cryptography response. Error: {0} Error description: {1} Error URI: {2} {Locked} - + The token cannot be null or empty. {Locked} - + An unknown error occurred while introspecting the token. {Locked} - + An error occurred while preparing the introspection request. Error: {0} Error description: {1} Error URI: {2} {Locked} - + An error occurred while sending the introspection request. Error: {0} Error description: {1} Error URI: {2} {Locked} - + An error occurred while extracting the introspection response. Error: {0} Error description: {1} Error URI: {2} {Locked} - + An error occurred while handling the introspection response. Error: {0} Error description: {1} Error URI: {2} {Locked} - + The access token cannot be null or empty. {Locked} - + An error occurred while validating the access token. Error: {0} Error description: {1} Error URI: {2} {Locked} - + The OpenIddict ASP.NET Core validation handler cannot be registered as an authentication scheme. This may indicate that an instance of another handler was registered with the same scheme. {Locked} - + The OpenIddict ASP.NET Core validation cannot be used as the default sign-in/sign-out handler. Make sure that neither DefaultSignInScheme nor DefaultSignOutScheme point to an instance of the OpenIddict ASP.NET Core validation handler. {Locked} - + An unknown error occurred while retrieving the OpenIddict validation context. {Locked} - + Generic token validation is not supported by the validation handler. {Locked} - + No service provider was found in the OWIN context. For the OpenIddict validation services to work correctly, a per-request 'IServiceProvider' must be attached to the OWIN environment with the dictionary key 'System.IServiceProvider'. Note: when using a dependency injection container supporting middleware resolution (like Autofac), the 'app.UseOpenIddictValidation()' extension MUST NOT be called. {Locked} - + The OpenIddict validation services cannot be resolved from the DI container. To register the validation services, use 'services.AddOpenIddict().AddValidation()'. {Locked} - + The local server integration can only be used with direct validation. {Locked} - + Authorization entry validation cannot be enabled when authorization storage is disabled in the OpenIddict server options. {Locked} - + Token entry validation cannot be enabled when token storage is disabled in the OpenIddict server options. {Locked} - + The System.Net.Http request cannot be resolved. {Locked} - + An unknown error occurred while creating a System.Net.Http client. {Locked} - + An unknown error occurred while sending a System.Net.Http request. {Locked} - + The specified type is not supported. {Locked} - + The value cannot be null or empty. {Locked} - + The prompt cannot be null or empty. {Locked} - + The response type cannot be null or empty. {Locked} - + The scope cannot be null or empty. {Locked} - + The destination cannot be null or empty. {Locked} - + Destinations cannot be null or empty. {Locked} - + Conflicting destinations for the claim '{0}' were specified. {Locked} - + The claim type cannot be null or empty. {Locked} - + The claim value cannot be null or empty. {Locked} - + The audience cannot be null or empty. {Locked} - + The presenter cannot be null or empty. {Locked} - + The token type cannot be null or empty. {Locked} - + The specified JSON element is not an object. {Locked} - + The parameter name cannot be null or empty. {Locked} - + A parameter with the same name already exists. {Locked} - + The item name cannot be null or empty. {Locked} - + The item index cannot be negative. {Locked} - + The type of the parameter value is not supported. {Locked} - + The identifier cannot be null or empty. {Locked} - + The application identifier cannot be extracted. {Locked} - + An error occurred while creating an expiration signal. {Locked} - + The subject cannot be null or empty. {Locked} - + The status cannot be null or empty. {Locked} - + The type cannot be null or empty. {Locked} - + The authorization identifier cannot be extracted. {Locked} - + The scope name cannot be null or empty. {Locked} - + Scope names cannot be null or empty. {Locked} - + The scope identifier cannot be extracted. {Locked} - + The token identifier cannot be extracted. {Locked} - + The client secret hash cannot be set on the application entity. {Locked} - + One or more validation error(s) occurred while trying to create a new application: {Locked} - + An error occurred while trying to create a new application. {Locked} - + The client type cannot be null or empty. {Locked} - + The consent type cannot be null or empty. {Locked} - + The permission name cannot be null or empty. {Locked} - + The requirement name cannot be null or empty. {Locked} - + Callback URLs cannot be null or empty. {Locked} - + Callback URLs must be valid absolute URLs. {Locked} - + One or more validation error(s) occurred while trying to update an existing application: {Locked} - + The secret cannot be null or empty. {Locked} - + The specified hash algorithm is not valid. {Locked} - + The comparand cannot be null or empty. {Locked} - + One or more validation error(s) occurred while trying to create a new authorization: {Locked} - + An error occurred while trying to create a new authorization. {Locked} - + One or more validation error(s) occurred while trying to update an existing authorization: {Locked} - + One or more validation error(s) occurred while trying to create a new scope: {Locked} - + An error occurred while trying to create a new scope. {Locked} - + One or more validation error(s) occurred while trying to update an existing scope: {Locked} - + One or more validation error(s) occurred while trying to create a new token: {Locked} - + An error occurred while trying to create a new token {Locked} - + One or more validation error(s) occurred while trying to update an existing token: {Locked} - + No application store has been registered in the dependency injection container. To register the Entity Framework Core stores, reference the 'OpenIddict.EntityFrameworkCore' package and call 'services.AddOpenIddict().AddCore().UseEntityFrameworkCore()'. To register a custom store, create an implementation of 'IOpenIddictApplicationStore' and use 'services.AddOpenIddict().AddCore().AddApplicationStore()' to add it to the DI container. {Locked} - + No authorization store has been registered in the dependency injection container. To register the Entity Framework Core stores, reference the 'OpenIddict.EntityFrameworkCore' package and call 'services.AddOpenIddict().AddCore().UseEntityFrameworkCore()'. To register a custom store, create an implementation of 'IOpenIddictAuthorizationStore' and use 'services.AddOpenIddict().AddCore().AddAuthorizationStore()' to add it to the DI container. {Locked} - + No scope store has been registered in the dependency injection container. To register the Entity Framework Core stores, reference the 'OpenIddict.EntityFrameworkCore' package and call 'services.AddOpenIddict().AddCore().UseEntityFrameworkCore()'. To register a custom store, create an implementation of 'IOpenIddictScopeStore' and use 'services.AddOpenIddict().AddCore().AddScopeStore()' to add it to the DI container. {Locked} - + No token store has been registered in the dependency injection container. To register the Entity Framework Core stores, reference the 'OpenIddict.EntityFrameworkCore' package and call 'services.AddOpenIddict().AddCore().UseEntityFrameworkCore()'. To register a custom store, create an implementation of 'IOpenIddictTokenStore' and use 'services.AddOpenIddict().AddCore().AddTokenStore()' to add it to the DI container. {Locked} - + The specified type is invalid. {Locked} - + The cache size cannot be less than 10. {Locked} - + The specified application type is not compatible with the Entity Framework 6.x stores. When enabling the Entity Framework 6.x stores, make sure you use the built-in 'OpenIddictEntityFrameworkApplication' entity or a custom entity that inherits from the generic 'OpenIddictEntityFrameworkApplication' entity. {Locked} - + No Entity Framework 6.x context was specified in the OpenIddict options. To configure the OpenIddict Entity Framework 6.x stores to use a specific 'DbContext', use 'options.UseEntityFramework().UseDbContext<TContext>()'. {Locked} - + The specified authorization type is not compatible with the Entity Framework 6.x stores. When enabling the Entity Framework 6.x stores, make sure you use the built-in 'OpenIddictEntityFrameworkAuthorization' entity or a custom entity that inherits from the generic 'OpenIddictEntityFrameworkAuthorization' entity. {Locked} - + The specified scope type is not compatible with the Entity Framework 6.x stores. When enabling the Entity Framework 6.x stores, make sure you use the built-in 'OpenIddictEntityFrameworkScope' entity or a custom entity that inherits from the generic 'OpenIddictEntityFrameworkScope' entity. {Locked} - + The specified token type is not compatible with the Entity Framework 6.x stores. When enabling the Entity Framework 6.x stores, make sure you use the built-in 'OpenIddictEntityFrameworkToken' entity or a custom entity that inherits from the generic 'OpenIddictEntityFrameworkToken' entity. {Locked} - + The application was concurrently updated and cannot be persisted in its current state. Reload the application from the database and retry the operation. {Locked} - + An error occurred while trying to create a new application instance. Make sure that the application entity is not abstract and has a public parameterless constructor or create a custom application store that overrides 'InstantiateAsync()' to use a custom factory. {Locked} - + The authorization was concurrently updated and cannot be persisted in its current state. Reload the authorization from the database and retry the operation. {Locked} - + An error occurred while trying to create a new authorization instance. Make sure that the authorization entity is not abstract and has a public parameterless constructor or create a custom authorization store that overrides 'InstantiateAsync()' to use a custom factory. {Locked} - + An error occurred while pruning authorizations. {Locked} - + The application associated with the authorization cannot be found. {Locked} - + The scope was concurrently updated and cannot be persisted in its current state. Reload the scope from the database and retry the operation. {Locked} - + An error occurred while trying to create a new scope instance. Make sure that the scope entity is not abstract and has a public parameterless constructor or create a custom scope store that overrides 'InstantiateAsync()' to use a custom factory. {Locked} - + The token was concurrently updated and cannot be persisted in its current state. Reload the token from the database and retry the operation. {Locked} - + An error occurred while trying to create a new token instance. Make sure that the token entity is not abstract and has a public parameterless constructor or create a custom token store that overrides 'InstantiateAsync()' to use a custom factory. {Locked} - + An error occurred while pruning tokens. {Locked} - + The application associated with the token cannot be found. {Locked} - + The authorization associated with the token cannot be found. {Locked} - + The specified application type is not compatible with the Entity Framework Core stores. When enabling the Entity Framework Core stores, make sure you use the built-in 'OpenIddictEntityFrameworkCoreApplication' entity or a custom entity that inherits from the generic 'OpenIddictEntityFrameworkCoreApplication' entity. {Locked} - + No Entity Framework Core context was specified in the OpenIddict options. To configure the OpenIddict Entity Framework Core stores to use a specific 'DbContext', use 'options.UseEntityFrameworkCore().UseDbContext<TContext>()'. {Locked} - + The specified authorization type is not compatible with the Entity Framework Core stores. When enabling the Entity Framework Core stores, make sure you use the built-in 'OpenIddictEntityFrameworkCoreAuthorization' entity or a custom entity that inherits from the generic 'OpenIddictEntityFrameworkCoreAuthorization' entity. {Locked} - + The specified scope type is not compatible with the Entity Framework Core stores. When enabling the Entity Framework Core stores, make sure you use the built-in 'OpenIddictEntityFrameworkCoreScope' entity or a custom entity that inherits from the generic 'OpenIddictEntityFrameworkCoreScope' entity. {Locked} - + The specified token type is not compatible with the Entity Framework Core stores. When enabling the Entity Framework Core stores, make sure you use the built-in 'OpenIddictEntityFrameworkCoreToken' entity or a custom entity that inherits from the generic 'OpenIddictEntityFrameworkCoreToken' entity. {Locked} - + The specified application type is not compatible with the MongoDB stores. When enabling the MongoDB stores, make sure you use the built-in 'OpenIddictMongoDbApplication' entity or a custom entity that inherits from the 'OpenIddictMongoDbApplication' entity. {Locked} - + The specified authorization type is not compatible with the MongoDB stores. When enabling the MongoDB stores, make sure you use the built-in 'OpenIddictMongoDbAuthorization' entity or a custom entity that inherits from the 'OpenIddictMongoDbAuthorization' entity. {Locked} - + The specified scope type is not compatible with the MongoDB stores. When enabling the MongoDB stores, make sure you use the built-in 'OpenIddictMongoDbScope' entity or a custom entity that inherits from the 'OpenIddictMongoDbScope' entity. {Locked} - + The specified token type is not compatible with the MongoDB stores. When enabling the MongoDB stores, make sure you use the built-in 'OpenIddictMongoDbToken' entity or a custom entity that inherits from the 'OpenIddictMongoDbToken' entity. {Locked} - + The collection name cannot be null or empty. {Locked} - + No suitable MongoDB database service can be found. To configure the OpenIddict MongoDB stores to use a specific database, use 'services.AddOpenIddict().AddCore().UseMongoDb().UseDatabase()' or register an 'IMongoDatabase' in the dependency injection container in 'ConfigureServices()'. {Locked} - + The second parameter must be a generic type definition. {Locked} - + X.509 certificate generation is not supported on this platform. {Locked} - + The token details cannot be found in the database. {Locked} - + No suitable signing credentials could be found. {Locked} - + The signing credentials algorithm is not valid. {Locked} - + The code challenge method cannot be retrieved from the authorization code. {Locked} - + The token usage of the JWT token is not supported. {Locked} - + The type of the JWT token cannot be resolved or inferred. {Locked} - + The type of the JWT token doesn't match the expected type. {Locked} - + The configuration response was not correctly applied. To apply configuration responses, create a class implementing 'IOpenIddictServerHandler<ApplyConfigurationResponseContext>' and register it using 'services.AddOpenIddict().AddServer().AddEventHandler()'. {Locked} - + No default application entity type was configured in the OpenIddict core options, which generally indicates that no application store was registered in the DI container. To register the Entity Framework Core stores, reference the 'OpenIddict.EntityFrameworkCore' package and call 'services.AddOpenIddict().AddCore().UseEntityFrameworkCore()'. {Locked} - + No default authorization entity type was configured in the OpenIddict core options, which generally indicates that no authorization store was registered in the DI container. To register the Entity Framework Core stores, reference the 'OpenIddict.EntityFrameworkCore' package and call 'services.AddOpenIddict().AddCore().UseEntityFrameworkCore()'. {Locked} - + No default scope entity type was configured in the OpenIddict core options, which generally indicates that no scope store was registered in the DI container. To register the Entity Framework Core stores, reference the 'OpenIddict.EntityFrameworkCore' package and call 'services.AddOpenIddict().AddCore().UseEntityFrameworkCore()'. {Locked} - + No default token entity type was configured in the OpenIddict core options, which generally indicates that no token store was registered in the DI container. To register the Entity Framework Core stores, reference the 'OpenIddict.EntityFrameworkCore' package and call 'services.AddOpenIddict().AddCore().UseEntityFrameworkCore()'. {Locked} - + The Entity Framework 6.x stores cannot be used with generic types. Consider creating non-generic classes derived from the default entities for the application, authorization, scope and token entities. {Locked} - + The core services must be registered when enabling the OpenIddict server Quartz.NET integration. To register the OpenIddict core services, reference the 'OpenIddict.Core' package and call 'services.AddOpenIddict().AddCore()' from 'ConfigureServices'. {Locked} - + The maximum refire count cannot be negative. {Locked} - + The duration cannot be less than 10 minutes. {Locked} - + The security token is missing. - + The specified authorization code is invalid. - + The specified device code is invalid. - + The specified refresh token is invalid. - + The specified token is invalid. - + The specified token is not an authorization code. - + The specified token is not an device code. - + The specified token is not a refresh token. - + The specified token is not an access token. - + The specified identity token is invalid. - + The specified authorization code has already been redeemed. - + The specified device code has already been redeemed. - + The specified refresh token has already been redeemed. - + The specified token has already been redeemed. - + The authorization has not been granted yet by the end user. - + The authorization was denied by the end user. - + The specified authorization code is no longer valid. - + The specified device code is no longer valid. - + The specified refresh token is no longer valid. - + The specified token is no longer valid. - + The authorization associated with the authorization code is no longer valid. - + The authorization associated with the device code is no longer valid. - + The authorization associated with the refresh token is no longer valid. - + The authorization associated with the token is no longer valid. - + The token request was rejected by the authentication server. - + The user information access demand was rejected by the authentication server. - + The specified user code is no longer valid. - + The '{0}' parameter is not supported. - + The mandatory '{0}' parameter is missing. - + The '{0}' parameter must be a valid absolute URL. - + The '{0}' parameter must not include a fragment. - + The specified '{0}' is not supported. - + The specified '{0}'/'{1}' combination is invalid. - + The mandatory '{0}' scope is missing. - + The '{0}' scope is not allowed. - + The client identifier cannot be null or empty. - + The '{0}' parameter cannot be used without '{1}'. - + The status cannot be null or empty. - + Scopes cannot be null or empty. - + The '{0}' and '{1}' parameters can only be used with a response type containing '{2}'. - + The specified '{0}' is not allowed when using PKCE. - + Scopes cannot contain spaces. - + The specified '{0}' is not valid for this client application. - + The scope name cannot be null or empty. - + The scope name cannot contain spaces. - + This client application is not allowed to use the authorization endpoint. - + The client application is not allowed to use the authorization code flow. - + The client application is not allowed to use the implicit flow. - + The client application is not allowed to use the hybrid flow. - + This client application is not allowed to use the specified scope. - + The specified '{0}' is invalid. - + The '{0}' parameter is not valid for this client application. - + The '{0}' parameter required for this client application is missing. - + The specified client credentials are invalid. - + This client application is not allowed to use the device endpoint. - + The '{0}' and '{1}' parameters are required when using the client credentials grant. - + The '{0}' parameter is required when using the device code grant. - + The mandatory '{0}' and/or '{1}' parameters are missing. - + A scope with the same name already exists. - + This client application is not allowed to use the token endpoint. - + This client application is not allowed to use the specified grant type. - + The client application is not allowed to use the '{0}' scope. - + The specified authorization code cannot be used without sending a client identifier. - + The specified device code cannot be used without sending a client identifier. - + The specified refresh token cannot be used without sending a client identifier. - + The specified authorization code cannot be used by this client application. - + The specified device code cannot be used by this client application. - + The specified refresh token cannot be used by this client application. - + The specified '{0}' parameter doesn't match the client redirection address the authorization code was initially sent to. - + The '{0}' parameter cannot be used when no '{1}' was specified in the authorization request. - + The '{0}' parameter is not valid in this context. - + This client application is not allowed to use the introspection endpoint. - + The specified token cannot be introspected. - + The client application is not allowed to introspect the specified token. - + This client application is not allowed to use the revocation endpoint. - + This token cannot be revoked. - + The client application is not allowed to revoke the specified token. - + The mandatory '{0}' header is missing. - + The specified '{0}' header is invalid. - + This server only accepts HTTPS requests. - + The specified HTTP method is not valid. - + A token with the same reference identifier already exists. - + The token type cannot be null or empty. - + Multiple client credentials cannot be specified. - + The issuer associated to the specified token is not valid. - + The specified token is not of the expected type. - + The signing key associated to the specified token was not found. - + The signature associated to the specified token is not valid. - + This resource server is currently unavailable. - + The specified token doesn't contain any audience. - + The specified token cannot be used with this resource server. - + The user represented by the token is not allowed to perform the requested action. - + No issuer could be found in the server configuration. - + A server configuration containing an invalid issuer was returned. - + The issuer returned in the server configuration is not valid. - + No JWKS endpoint could be found in the server configuration. - + A server configuration containing an invalid JWKS endpoint URL was returned. - + A server configuration containing an invalid introspection endpoint URL was returned. - + The JWKS document didn't contain a valid '{0}' node with at least one key. - + A JWKS response containing an unsupported key was returned. - + A JWKS response containing an invalid key was returned. - + The mandatory '{0}' parameter couldn't be found in the introspection response. - + The token was rejected by the remote authentication server. - + The '{0}' claim is malformed or isn't of the expected type. - + An introspection response containing a malformed issuer was returned. - + The issuer returned in the introspection response is not valid. - + The type of the introspected token doesn't match the expected type. - + An application with the same client identifier already exists. - + Only confidential, hybrid or public applications are supported by the default application manager. - + The client secret cannot be null or empty for a confidential application. - + A client secret cannot be associated with a public application. - + Callback URLs cannot contain a fragment. - + The authorization type cannot be null or empty. - + The specified authorization type is not supported by the default token manager. - + The client type cannot be null or empty. - + Callback URLs cannot be null or empty. - + Callback URLs must be valid absolute URLs. - + The '{0}' parameter shouldn't be null or empty at this point. {Locked} - + The separators collection shouldn't be null or empty. {Locked} - + The value string shouldn't be null or empty. {Locked} - + RSA.ExportParameters() shouldn't return invalid values. {Locked} - + ECDsa.ExportParameters() shouldn't return invalid values. {Locked} - + ECDsa.ExportParameters() shouldn't return an unnamed curve. {Locked} - + The principal shouldn't be null at this point. {Locked} - + The response shouldn't be null at this point. {Locked} - + The request shouldn't be null at this point. {Locked} - + The token type shouldn't be null or empty. {Locked} - + The token shouldn't be null or empty at this point. {Locked} - + The OpenIddict Core services should be registered. {Locked} - + An error occurred while validating the token '{Token}'. {Locked} - + The token '{Token}' was successfully validated and the following claims could be extracted: {Claims}. {Locked} - + The token '{Identifier}' has already been redeemed. {Locked} - + The token '{Identifier}' is not active yet. {Locked} - + The token '{Identifier}' was marked as rejected. {Locked} - + The token '{Identifier}' was no longer valid. {Locked} - + The authorization '{Identifier}' was no longer valid. {Locked} - + An ad hoc authorization was automatically created and associated with an unknown application: {Identifier}. {Locked} - + An ad hoc authorization was automatically created and associated with the '{ClientId}' application: {Identifier}. {Locked} - + '{Claim}' was excluded from the access token claims. {Locked} - + The access token scopes will be limited to the scopes requested by the client application: {Scopes}. {Locked} - + '{Claim}' was excluded from the identity token claims. {Locked} - + The token entry for access token '{Identifier}' was successfully created. {Locked} - + The access token '{Identifier}' was successfully created: {Payload}. The principal used to create the token contained the following claims: {Claims}. {Locked} - + The token entry for access token '{Identifier}' was successfully converted to a reference token with the identifier '{ReferenceId}'. {Locked} - + The token entry for authorization code '{Identifier}' was successfully created. {Locked} - + The authorization code '{Identifier}' was successfully created: {Payload}. The principal used to create the token contained the following claims: {Claims}. {Locked} - + The token entry for authorization code '{Identifier}' was successfully converted to a reference token with the identifier '{ReferenceId}'. {Locked} - + The token entry for device code '{Identifier}' was successfully created. {Locked} - + The device code '{Identifier}' was successfully created: {Payload}. The principal used to create the token contained the following claims: {Claims}. {Locked} - + The token entry for device code '{Identifier}' was successfully converted to a reference token with the identifier '{ReferenceId}'. {Locked} - + The reference token entry for device code '{Identifier}' was successfully updated'. {Locked} - + The token entry for refresh token '{Identifier}' was successfully created. {Locked} - + The refresh token '{Identifier}' was successfully created: {Payload}. The principal used to create the token contained the following claims: {Claims}. {Locked} - + The token entry for refresh token '{Identifier}' was successfully converted to a reference token with the identifier '{ReferenceId}'. {Locked} - + The token entry for user code '{Identifier}' was successfully created. {Locked} - + The user code '{Identifier}' was successfully created: {Payload}. The principal used to create the token contained the following claims: {Claims}. {Locked} - + The token entry for user code '{Identifier}' was successfully converted to a reference token with the identifier '{ReferenceId}'. {Locked} - + The token entry for identity token '{Identifier}' was successfully created. {Locked} - + The identity token '{Identifier}' was successfully created: {Payload}. The principal used to create the token contained the following claims: {Claims}. {Locked} - + The authorization request was successfully extracted: {Request}. {Locked} - + The authorization request was successfully validated. {Locked} - + The authorization request was rejected because it contained an unsupported parameter: {Parameter}. {Locked} - + The authorization request was rejected because the mandatory '{Parameter}' parameter was missing. {Locked} - + The authorization request was rejected because the '{Parameter}' parameter wasn't a valid absolute URL: {RedirectUri}. {Locked} - + The authorization request was rejected because the '{Parameter}' contained a URL fragment: {RedirectUri}. {Locked} - + The authorization request was rejected because the '{ResponseType}' response type is not supported. {Locked} - + The authorization request was rejected because the 'response_type'/'response_mode' combination was invalid: {ResponseType} ; {ResponseMode}. {Locked} - + The authorization request was rejected because the '{ResponseMode}' response mode is not supported. {Locked} - + The authorization request was rejected because the '{Scope}' scope was missing. {Locked} - + The authorization request was rejected because an invalid prompt parameter was specified. {Locked} - + The authorization request was rejected because the specified code challenge method was not supported. {Locked} - + The authorization request was rejected because the response type was not compatible with 'code_challenge'/'code_challenge_method'. {Locked} - + The authorization request was rejected because the specified response type was not compatible with PKCE. {Locked} - + The authorization request was rejected because the client application was not found: '{ClientId}'. {Locked} - + The authorization request was rejected because the confidential application '{ClientId}' was not allowed to retrieve an access token from the authorization endpoint. {Locked} - + The authorization request was rejected because the redirect_uri was invalid: '{RedirectUri}'. {Locked} - + The authentication request was rejected because invalid scopes were specified: {Scopes}. {Locked} - + The authorization request was rejected because the application '{ClientId}' was not allowed to use the authorization endpoint. {Locked} - + The authorization request was rejected because the application '{ClientId}' was not allowed to use the authorization code flow. {Locked} - + The authorization request was rejected because the application '{ClientId}' was not allowed to use the implicit flow. {Locked} - + The authorization request was rejected because the application '{ClientId}' was not allowed to use the hybrid flow. {Locked} - + The authorization request was rejected because the application '{ClientId}' was not allowed to use the '{Scope}' scope. {Locked} - + The request address matched a server endpoint: {Endpoint}. {Locked} - + The device request was successfully extracted: {Request}. {Locked} - + The device request was successfully validated. {Locked} - + The device request was rejected because the mandatory '{Parameter}' parameter was missing. {Locked} - + The device request was rejected because invalid scopes were specified: {Scopes}. {Locked} - + The device request was rejected because the client application was not found: '{ClientId}'. {Locked} - + The device request was rejected because the public application '{ClientId}' was not allowed to send a client secret. {Locked} - + The device request was rejected because the confidential or hybrid application '{ClientId}' didn't specify a client secret. {Locked} - + The device request was rejected because the confidential or hybrid application '{ClientId}' didn't specify valid client credentials. {Locked} - + The device request was rejected because the application '{ClientId}' was not allowed to use the device endpoint. {Locked} - + The device request was rejected because the application '{ClientId}' was not allowed to use the scope {Scope}. {Locked} - + The verification request was successfully extracted: {Request}. {Locked} - + The verification request was successfully validated. {Locked} - + The configuration request was successfully extracted: {Request}. {Locked} - + The configuration request was successfully validated. {Locked} - + The cryptography request was successfully extracted: {Request}. {Locked} - + The cryptography request was successfully validated. {Locked} - + A JSON Web Key was excluded from the key set because it didn't contain the mandatory '{Parameter}' parameter. {Locked} - + An unsupported signing key of type '{Type}' was ignored and excluded from the key set. Only RSA and ECDSA asymmetric security keys can be exposed via the JWKS endpoint. {Locked} - + An unsupported signing key of type '{Type}' was ignored and excluded from the key set. Only RSA asymmetric security keys can be exposed via the JWKS endpoint. {Locked} - + A signing key of type '{Type}' was ignored because its RSA public parameters couldn't be extracted. {Locked} - + A signing key of type '{Type}' was ignored because its EC public parameters couldn't be extracted. {Locked} - + The token request was successfully extracted: {Request}. {Locked} - + The token request was successfully validated. {Locked} - + The token request was rejected because the mandatory '{Parameter}' parameter was missing. {Locked} - + The token request was rejected because the '{GrantType}' grant type is not supported. {Locked} - + The token request was rejected because the resource owner credentials were missing. {Locked} - + The token request was rejected because invalid scopes were specified: {Scopes}. {Locked} - + The token request was rejected because the client application was not found: '{ClientId}'. {Locked} - + The token request was rejected because the public client application '{ClientId}' was not allowed to use the client credentials grant. {Locked} - + The token request was rejected because the public application '{ClientId}' was not allowed to send a client secret. {Locked} - + The token request was rejected because the confidential or hybrid application '{ClientId}' didn't specify a client secret. {Locked} - + The token request was rejected because the confidential or hybrid application '{ClientId}' didn't specify valid client credentials. {Locked} - + The token request was rejected because the application '{ClientId}' was not allowed to use the token endpoint. {Locked} - + The token request was rejected because the application '{ClientId}' was not allowed to use the specified grant type: {GrantType}. {Locked} - + The token request was rejected because the application '{ClientId}' was not allowed to request the '{Scope}' scope. {Locked} - + The token request was rejected because the application '{ClientId}' was not allowed to use the scope {Scope}. {Locked} - + The token request was rejected because the client identifier of the application was not available and could not be compared to the presenters list stored in the authorization code, the device code or the refresh token. {Locked} - + The token request was rejected because the authorization code, the device code or the refresh token was issued to a different client application. {Locked} - + The token request was rejected because the '{Parameter}' parameter didn't correspond to the expected value. {Locked} - + The token request was rejected because a '{0}' parameter was presented with an authorization code to which no code challenge was attached when processing the initial authorization request. {Locked} - + The token request was rejected because the '{Parameter}' parameter was not allowed. {Locked} - + The token request was rejected because the '{Parameter}' parameter was not valid. {Locked} - + The introspection request was successfully extracted: {Request}. {Locked} - + The introspection request was successfully validated. {Locked} - + The introspection request was rejected because the mandatory '{Parameter}' parameter was missing. {Locked} - + The introspection request was rejected because the client application was not found: '{ClientId}'. {Locked} - + The introspection request was rejected because the public application '{ClientId}' was not allowed to send a client secret. {Locked} - + The introspection request was rejected because the confidential or hybrid application '{ClientId}' didn't specify a client secret. {Locked} - + The introspection request was rejected because the confidential or hybrid application '{ClientId}' didn't specify valid client credentials. {Locked} - + The introspection request was rejected because the application '{ClientId}' was not allowed to use the introspection endpoint. {Locked} - + The introspection request was rejected because the received token was of an unsupported type. {Locked} - + The introspection request was rejected because the access token was issued to a different client or for another resource server. {Locked} - + The introspection request was rejected because the refresh token was issued to a different client. {Locked} - + The revocation request was successfully extracted: {Request}. {Locked} - + The revocation request was successfully validated. {Locked} - + The revocation request was rejected because the mandatory '{Parameter}' parameter was missing. {Locked} - + The revocation request was rejected because the client application was not found: '{ClientId}'. {Locked} - + The revocation request was rejected because the public application '{ClientId}' was not allowed to send a client secret. {Locked} - + The revocation request was rejected because the confidential or hybrid application '{ClientId}' didn't specify a client secret. {Locked} - + The revocation request was rejected because the confidential or hybrid application '{ClientId}' didn't specify valid client credentials. {Locked} - + The revocation request was rejected because the application '{ClientId}' was not allowed to use the revocation endpoint. {Locked} - + The revocation request was rejected because the received token was of an unsupported type. {Locked} - + The revocation request was rejected because the access token was issued to a different client or for another resource server. {Locked} - + The revocation request was rejected because the refresh token was issued to a different client. {Locked} - + The revocation request was rejected because the token had no internal identifier. {Locked} - + The token '{Identifier}' was not revoked because it couldn't be found. {Locked} - + The logout request was successfully extracted: {Request}. {Locked} - + The logout request was successfully validated. {Locked} - + The logout request was rejected because the '{Parameter}' parameter wasn't a valid absolute URL: {PostLogoutRedirectUri}. {Locked} - + The logout request was rejected because the '{Parameter}' contained a URL fragment: {PostLogoutRedirectUri}. {Locked} - + The logout request was rejected because the specified post_logout_redirect_uri was invalid: {PostLogoutRedirectUri}. {Locked} - + The userinfo request was successfully extracted: {Request}. {Locked} - + The userinfo request was successfully validated. {Locked} - + The userinfo request was rejected because the mandatory '{Parameter}' parameter was missing. {Locked} - + An exception was thrown by {HandlerName} while handling the {EventName} event. {Locked} - + The event {EventName} was successfully processed by {HandlerName}. {Locked} - + The event {EventName} was marked as handled by {HandlerName}. {Locked} - + The event {EventName} was marked as skipped by {HandlerName}. {Locked} - + The event {EventName} was marked as rejected by {HandlerName}. {Locked} - + The request was rejected because an invalid HTTP method was specified: {Method}. {Locked} - + The request was rejected because the mandatory '{Header}' header was missing. {Locked} - + The request was rejected because an invalid '{Header}' header was specified: {Value}. {Locked} - + The request was rejected because multiple client credentials were specified. {Locked} - + The response was successfully returned as a challenge response: {Response}. {Locked} - + The response was successfully returned as a JSON document: {Response}. {Locked} - + The response was successfully returned as a plain-text document: {Response}. {Locked} - + The response was successfully returned as a 302 response. {Locked} - + The response was successfully returned as an empty 200 response. {Locked} - + The authorization request was rejected because an unknown or invalid '{Parameter}' was specified. {Locked} - + The authorization response was successfully returned to '{RedirectUri}' using the form post response mode: {Response}. {Locked} - + The authorization response was successfully returned to '{RedirectUri}' using the query response mode: {Response}. {Locked} - + The authorization response was successfully returned to '{RedirectUri}' using the fragment response mode: {Response}. {Locked} - + The logout request was rejected because an unknown or invalid '{Parameter}' was specified. {Locked} - + The logout response was successfully returned to '{PostLogoutRedirectUri}': {Response}. {Locked} - + The ASP.NET Core Data Protection token '{Token}' was successfully validated and the following claims could be extracted: {Claims}. {Locked} - + An exception occured while deserializing the token '{Token}'. {Locked} - + The token '{Token}' was successfully introspected and the following claims could be extracted: {Claims}. {Locked} - + An error occurred while introspecting the token. {Locked} - + The authentication demand was rejected because the token was expired. {Locked} - + The authentication demand was rejected because the token had no audience attached. {Locked} - + The authentication demand was rejected because the token had no valid audience. {Locked} - + Client authentication cannot be enforced for public applications. {Locked} - + Client authentication failed for {Client} because no client secret was associated with the application. {Locked} - + Client authentication failed for {Client}. {Locked} - + Client validation failed because '{RedirectUri}' was not a valid redirect_uri for {Client}. {Locked} - + An error occurred while trying to verify a client secret. This may indicate that the hashed entry is corrupted or malformed. {Locked} - + The authorization '{Identifier}' was successfully revoked. {Locked} - + A concurrency exception occurred while trying to revoke the authorization '{Identifier}'. {Locked} - + An exception occurred while trying to revoke the authorization '{Identifier}'. {Locked} - + The expiration date of the refresh token '{Identifier}' was successfully updated: {Date}. {Locked} - + The expiration date of the refresh token '{Identifier}' was successfully removed. {Locked} - + A concurrency exception occurred while trying to update the expiration date of the token '{Identifier}'. {Locked} - + An exception occurred while trying to update the expiration date of the token '{Identifier}'. {Locked} - + The token '{Identifier}' was successfully marked as redeemed. {Locked} - + A concurrency exception occurred while trying to redeem the token '{Identifier}'. {Locked} - + An exception occurred while trying to redeem the token '{Identifier}'. {Locked} - + The token '{Identifier}' was successfully marked as rejected. {Locked} - + A concurrency exception occurred while trying to reject the token '{Identifier}'. {Locked} - + An exception occurred while trying to reject the token '{Identifier}'. {Locked} - + The token '{Identifier}' was successfully revoked. {Locked} - + A concurrency exception occurred while trying to revoke the token '{Identifier}'. {Locked} - + An exception occurred while trying to revoke the token '{Identifier}'. {Locked} - + Removes orphaned tokens and authorizations from the database. - + Starts the scheduled task at regular intervals. \ No newline at end of file diff --git a/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.ar.xlf b/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.ar.xlf index 17172ecf..12a62f05 100644 --- a/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.ar.xlf +++ b/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.ar.xlf @@ -2,597 +2,597 @@ - + The security token is missing. رمز الأمان مفقود. - + The specified authorization code is invalid. رمز التفويض المحدد غير صالح. - + The specified device code is invalid. رمز الجهاز المحدد غير صالح. - + The specified refresh token is invalid. رمز التحديث المحدد غير صالح. - + The specified token is invalid. الرمز المحدد غير صالح. - + The specified token is not an authorization code. الرمز المحدد ليس رمز تفويض. - + The specified token is not an device code. الرمز المحدد ليس رمز جهاز. - + The specified token is not a refresh token. الرمز المحدد ليس رمز تحديث. - + The specified token is not an access token. الرمز المحدد ليس رمز وصول. - + The specified identity token is invalid. رمز الهوية المحدد غير صالح. - + The specified authorization code has already been redeemed. تم بالفعل استرداد رمز التفويض المحدد. - + The specified device code has already been redeemed. تم بالفعل استرداد رمز الجهاز المحدد. - + The specified refresh token has already been redeemed. تم بالفعل استرداد رمز التحديث المحدد. - + The specified token has already been redeemed. تم بالفعل استرداد الرمز المميز المحدد. - + The authorization has not been granted yet by the end user. لم يتم منح التفويض بعد من قبل المستخدم النهائي. - + The authorization was denied by the end user. تم رفض الإذن من قبل المستخدم. - + The specified authorization code is no longer valid. رمز التفويض المحدد لم يعد صالحًا. - + The specified device code is no longer valid. رمز الجهاز المحدد لم يعد صالحًا. - + The specified refresh token is no longer valid. لم يعد رمز التحديث المحدد صالحًا. - + The specified token is no longer valid. لم يعد الرمز المحدد صالحًا. - + The authorization associated with the authorization code is no longer valid. لم يعد التفويض المرتبط برمز التفويض صالحًا. - + The authorization associated with the device code is no longer valid. لم يعد التفويض المرتبط برمز الجهاز صالحًا. - + The authorization associated with the refresh token is no longer valid. لم يعد التفويض المرتبط برمز التحديث صالحًا. - + The authorization associated with the token is no longer valid. التفويض المرتبط بالرمز لم يعد صالحًا. - + The token request was rejected by the authentication server. تم رفض طلب الرمز المميز من قبل خادم المصادقة. - + The user information access demand was rejected by the authentication server. تم رفض طلب الوصول إلى معلومات المستخدم من قبل خادم المصادقة. - + The specified user code is no longer valid. رمز المستخدم المحدد لم يعد صالحًا. - + The '{0}' parameter is not supported. المعلمة '{0}' غير مدعومة. - + The mandatory '{0}' parameter is missing. المعلمة الإلزامية '{0}' مفقودة. - + The '{0}' parameter must be a valid absolute URL. يجب أن تكون المعلمة '{0}' رابط مطلق صالح. - + The '{0}' parameter must not include a fragment. يجب ألا تتضمن المعلمة '{0}' جزءًا. - + The specified '{0}' is not supported. '{0}' المحدد غير مدعوم. - + The specified '{0}'/'{1}' combination is invalid. مجموعة '{0}' / "{1}" المحددة غير صالحة. - + The mandatory '{0}' scope is missing. النطاق الإلزامي '{0}' مفقود. - + The '{0}' scope is not allowed. النطاق '{0}' غير مسموح به. - + The client identifier cannot be null or empty. لا يمكن أن يكون معرف العميل خالياً أو فارغاً. - + The '{0}' parameter cannot be used without '{1}'. لا يمكن استخدام المعلمة '{0}' بدون "{1}". - + The status cannot be null or empty. لا يمكن أن تكون الحالة فارغة أو فارغة. - + Scopes cannot be null or empty. لا يمكن أن تكون النطاقات فارغة أو فارغة. - + The '{0}' and '{1}' parameters can only be used with a response type containing '{2}'. لا يمكن استخدام المعلمات '{0}' و "{1}" إلا مع نوع استجابة يحتوي على "{2}". - + The specified '{0}' is not allowed when using PKCE. '{0}' المحدد غير مسموح به عند استخدام PKCE. - + Scopes cannot contain spaces. لا يمكن أن تحتوي النطاقات على مسافات. - + The specified '{0}' is not valid for this client application. '{0}' المحدد غير صالح لتطبيق العميل هذا. - + The scope name cannot be null or empty. لا يمكن أن يكون اسم النطاق فارغاً. - + The scope name cannot contain spaces. لا يمكن أن يحتوي اسم النطاق على مسافات. - + This client application is not allowed to use the authorization endpoint. تطبيق العميل هذا غير مسموح له باستخدام نقطة نهاية التفويض. - + The client application is not allowed to use the authorization code flow. لا يُسمح لتطبيق العميل باستخدام تدفق رمز التفويض. - + The client application is not allowed to use the implicit flow. لا يُسمح لتطبيق العميل باستخدام التدفق الضمني. - + The client application is not allowed to use the hybrid flow. لا يُسمح لتطبيق العميل باستخدام التدفق المختلط. - + This client application is not allowed to use the specified scope. تطبيق العميل هذا غير مسموح له باستخدام النطاق المحدد. - + The specified '{0}' is invalid. '{0}' المحدد غير صالح. - + The '{0}' parameter is not valid for this client application. المعلمة '{0}' غير صالحة لتطبيق العميل هذا. - + The '{0}' parameter required for this client application is missing. المعلمة '{0}' المطلوبة لتطبيق العميل هذا مفقودة. - + The specified client credentials are invalid. بيانات اعتماد العميل المحددة غير صالحة. - + This client application is not allowed to use the device endpoint. لا يُسمح لتطبيق العميل هذا باستخدام نقطة نهاية الجهاز. - + The '{0}' and '{1}' parameters are required when using the client credentials grant. معلمات '{0}' و "{1}" مطلوبة عند استخدام منح بيانات اعتماد العميل. - + The '{0}' parameter is required when using the device code grant. المعلمة '{0}' مطلوبة عند استخدام منحة رمز الجهاز. - + The mandatory '{0}' and/or '{1}' parameters are missing. معلمات '{0}' و / أو "{1}" الإلزامية مفقودة. - + A scope with the same name already exists. يوجد نطاق بنفس الإسم. - + This client application is not allowed to use the token endpoint. لا يُسمح لتطبيق العميل هذا باستخدام نقطة نهاية الرمز المميز. - + This client application is not allowed to use the specified grant type. لا يُسمح لتطبيق العميل هذا باستخدام نوع المنحة المحدد. - + The client application is not allowed to use the '{0}' scope. غير مسموح لتطبيق العميل باستخدام النطاق '{0}'. - + The specified authorization code cannot be used without sending a client identifier. لا يمكن استخدام رمز التفويض المحدد بدون إرسال معرف العميل. - + The specified device code cannot be used without sending a client identifier. لا يمكن استخدام رمز الجهاز المحدد بدون إرسال معرف العميل. - + The specified refresh token cannot be used without sending a client identifier. لا يمكن استخدام رمز التحديث المحدد بدون إرسال معرف العميل. - + The specified authorization code cannot be used by this client application. لا يمكن استخدام رمز التفويض المحدد بواسطة تطبيق العميل هذا. - + The specified device code cannot be used by this client application. لا يمكن استخدام رمز الجهاز المحدد بواسطة تطبيق العميل هذا. - + The specified refresh token cannot be used by this client application. لا يمكن استخدام رمز التحديث المحدد بواسطة تطبيق العميل هذا. - + The specified '{0}' parameter doesn't match the client redirection address the authorization code was initially sent to. المعلمة '{0}' المحددة لا تطابق عنوان إعادة توجيه العميل الذي تم إرسال رمز التفويض إليه في البداية. - + The '{0}' parameter cannot be used when no '{1}' was specified in the authorization request. لا يمكن استخدام المعلمة '{0}' في حالة عدم تحديد "{1}" في طلب التفويض. - + The '{0}' parameter is not valid in this context. المعلمة '{0}' غير صالحة في هذا السياق. - + This client application is not allowed to use the introspection endpoint. لا يُسمح لتطبيق العميل هذا باستخدام نقطة نهاية الاستبطان. - + The specified token cannot be introspected. لا يمكن استبطان الرمز المميز المحدد. - + The client application is not allowed to introspect the specified token. لا يُسمح لتطبيق العميل بفحص الرمز المميز المحدد. - + This client application is not allowed to use the revocation endpoint. لا يُسمح لتطبيق العميل هذا باستخدام نقطة نهاية الإبطال. - + This token cannot be revoked. لا يمكن إبطال هذا الرمز المميز. - + The client application is not allowed to revoke the specified token. لا يُسمح لتطبيق العميل بإلغاء الرمز المميز المحدد. - + The mandatory '{0}' header is missing. header '{0}' الإلزامي مفقود. - + The specified '{0}' header is invalid. header '{0}' المحدد غير صالح. - + This server only accepts HTTPS requests. لا يقبل هذا الخادم سوى طلبات HTTPS. - + The specified HTTP method is not valid. طريقة HTTP المحددة غير صالحة. - + A token with the same reference identifier already exists. الرمز بنفس مرجع المعرف موجود مسبقاً. - + The token type cannot be null or empty. لا يمكن أن يكون نوع الرمز المميز خالياً أو فارغاً. - + Multiple client credentials cannot be specified. لا يمكن تحديد بيانات اعتماد متعددة للعملاء. - + The issuer associated to the specified token is not valid. المُصدر المرتبط بالرمز المحدد غير صالح. - + The specified token is not of the expected type. الرمز المميز المحدد ليس من النوع المتوقع. - + The signing key associated to the specified token was not found. لم يتم العثور على مفتاح التوقيع المرتبط بالرمز المميز المحدد. - + The signature associated to the specified token is not valid. التوقيع المرتبط بالرمز المحدد غير صالح. - + This resource server is currently unavailable. خادم الموارد غير متوفر حالياّ. - + The specified token doesn't contain any audience. لا يحتوي الرمز المميز المحدد على أي جمهور. - + The specified token cannot be used with this resource server. لا يمكن استخدام الرمز المميز مع خادم المورد هذا. - + The user represented by the token is not allowed to perform the requested action. لا يُسمح للمستخدم الذي يمثله الرمز المميز بتنفيذ الإجراء المطلوب. - + No issuer could be found in the server configuration. تعذر العثور على أي مُصدر في إعدادات الخادم. - + A server configuration containing an invalid issuer was returned. تم إرجاع إعدادات خادم يحتوي على مُصدر غير صالح. - + The issuer returned in the server configuration is not valid. المُصدر الذي تم إرجاعه في إعدادات الخادم غير صالح. - + No JWKS endpoint could be found in the server configuration. تعذر العثور على نقطة نهاية JWKS في إعدادات الخادم. - + A server configuration containing an invalid JWKS endpoint URL was returned. تم إرجاع إعدادات خادم يحتوي على رابط غير صالح لنقطة نهاية JWKS. - + A server configuration containing an invalid introspection endpoint URL was returned. تم إرجاع إعدادات خادم يحتوي على رابط غير صالح لنقطة نهاية الاستبطان. - + The JWKS document didn't contain a valid '{0}' node with at least one key. لا يحتوي مستند JWKS على عقدة '{0}' صالحة بمفتاح واحد على الأقل. - + A JWKS response containing an unsupported key was returned. تم إرجاع استجابة JWKS تحتوي على مفتاح غير مدعوم. - + A JWKS response containing an invalid key was returned. تم إرجاع استجابة JWKS تحتوي على مفتاح غير صالح. - + The mandatory '{0}' parameter couldn't be found in the introspection response. لا يمكن العثور على المعلمة '{0}' الإلزامية في استجابة التأمل. - + The token was rejected by the remote authentication server. تم رفض الرمز المميز بواسطة خادم المصادقة عن بُعد. - + The '{0}' claim is malformed or isn't of the expected type. المطالبة '{0}' مكتوبة بشكل غير صحيح أو أنها ليست من النوع المتوقع. - + An introspection response containing a malformed issuer was returned. تم إرجاع استجابة استبطان تحتوي على مُصدر تالف. - + The issuer returned in the introspection response is not valid. المُصدر الذي تم إرجاعه في استجابة التأمل غير صالح. - + The type of the introspected token doesn't match the expected type. لا يتطابق نوع الرمز المميز الذي تم استبطانه مع النوع المتوقع. - + An application with the same client identifier already exists. التطبيق بنفس معرف العميل موجود مسبقاً. - + Only confidential, hybrid or public applications are supported by the default application manager. يتم دعم التطبيقات السرية أو الهجينة أو العامة فقط من قبل مدير التطبيق الافتراضي. - + The client secret cannot be null or empty for a confidential application. لا يمكن أن يكون سر العميل خالياً أو فارغاً لتطبيق سري. - + A client secret cannot be associated with a public application. لا يمكن ربط سر العميل بتطبيق عام. - + Callback URLs cannot contain a fragment. لا يمكن أن تحتوي روابط معاودة الاتصال على جزء. - + The authorization type cannot be null or empty. لا يمكن أن يكون نوع التفويض خالياً أو فارغاً. - + The specified authorization type is not supported by the default token manager. نوع التفويض المحدد غير مدعوم من قبل مدير الرمز المميز الافتراضي. - + The client type cannot be null or empty. لا يمكن أن يكون نوع العميل خالياً أو فارغاً. - + Callback URLs cannot be null or empty. لا يمكن أن تكون روابط معاودة الاتصال خالية أو فارغة. - + Callback URLs must be valid absolute URLs. روابط معاودة الاتصال لابد أن تكون روابط مطلقة صالحة. - + Removes orphaned tokens and authorizations from the database. إزالة الرموز المميزة والتراخيص المعزولة من قاعدة البيانات. - + Starts the scheduled task at regular intervals. تبدأ المهمة المجدولة على فترات منتظمة. diff --git a/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.de.xlf b/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.de.xlf index 83499297..ebbe88a8 100644 --- a/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.de.xlf +++ b/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.de.xlf @@ -2,597 +2,597 @@ - + The security token is missing. Der Security-Token fehlt. - + The specified authorization code is invalid. Der angegebene Authorisierungscode ist ungültig. - + The specified device code is invalid. Der angegebene Gerätecode ist ungültig. - + The specified refresh token is invalid. Der angegebene Refresh-Token ist ungültig. - + The specified token is invalid. Der angegebene Token ist ungültig. - + The specified token is not an authorization code. Der angegebene Token ist kein Authorisierungscode. - + The specified token is not an device code. Der angegebene Token ist kein Gerätecode. - + The specified token is not a refresh token. Der angegebene Token ist kein Refresh-Token. - + The specified token is not an access token. Der angegebene Token ist kein Authorisierungscode. - + The specified identity token is invalid. Der angegebene Token ist kein Identity Token. - + The specified authorization code has already been redeemed. Der angegebene Autorisierungscode wurde bereits eingelöst. - + The specified device code has already been redeemed. Der angegebene Gerätecode wurde bereits eingelöst. - + The specified refresh token has already been redeemed. Der angegebene Refresh-Token wurde bereits eingelöst. - + The specified token has already been redeemed. Der angegebene Token wurde bereits eingelöst. - + The authorization has not been granted yet by the end user. Die Freigabe wurde vom Endbenutzer noch nicht erteilt. - + The authorization was denied by the end user. Die Berechtigung wurde vom Endbenutzer verweigert. - + The specified authorization code is no longer valid. Der angegebene Autorisierungscode ist nicht mehr gültig. - + The specified device code is no longer valid. Der angegebene Gerätecode ist nicht mehr gültig. - + The specified refresh token is no longer valid. Der angegebene Refresh-Token ist nicht mehr gültig. - + The specified token is no longer valid. Der angegebene Token ist nicht mehr gültig. - + The authorization associated with the authorization code is no longer valid. Die mit dem Autorisierungscode verbundene Autorisierung ist nicht mehr gültig. - + The authorization associated with the device code is no longer valid. Die mit dem Gerätecode verbundene Autorisierung ist nicht mehr gültig. - + The authorization associated with the refresh token is no longer valid. Die mit dem Refresh-Token verbundene Autorisierung ist nicht mehr gültig. - + The authorization associated with the token is no longer valid. Die mit dem Token verbundene Autorisierung ist nicht mehr gültig. - + The token request was rejected by the authentication server. TDie Token-Anfrage wurde vom Authentifizierungsserver zurückgewiesen. - + The user information access demand was rejected by the authentication server. Die Anforderung für den Zugriff auf Benutzerinformationen wurde vom Authentifizierungsserver abgelehnt. - + The specified user code is no longer valid. Der angegebene Benutzercode ist nicht mehr gültig. - + The '{0}' parameter is not supported. Der Parameter '{0}' wird nicht unterstützt. - + The mandatory '{0}' parameter is missing. Der verpflichtende Parameter '{0}' fehlt. - + The '{0}' parameter must be a valid absolute URL. Der Parameter '{0}' muss eine gültige, absolute URL sein. - + The '{0}' parameter must not include a fragment. Der Parameter '{0}' darf kein Fragment enthalten. - + The specified '{0}' is not supported. Der Parameter '{0}' wird nicht unterstützt. - + The specified '{0}'/'{1}' combination is invalid. Die angegebene Kombination '{0}'/'{1}' ist ungültig. - + The mandatory '{0}' scope is missing. Der verpflichtende Scope '{0}' fehlt. - + The '{0}' scope is not allowed. Der Scope '{0}' ist nicht erlaubt. - + The client identifier cannot be null or empty. Der Client-Identifier darf nicht null oder leer sein. - + The '{0}' parameter cannot be used without '{1}'. Der Parameter '{0}' darf nicht ohne '{1}' benutzt werden. - + The status cannot be null or empty. Der Statuscode darf nicht null oder leer sein. - + Scopes cannot be null or empty. Scopes dürfen darf nicht null oder leer sein. - + The '{0}' and '{1}' parameters can only be used with a response type containing '{2}'. Die Parameter '{0}' und '{1}' können nur mit einem Response-Typ benutzt werden, der '{2}' enthält. - + The specified '{0}' is not allowed when using PKCE. Der Parameter '{0}' ist bei der Verwendung von PKCE nicht erlaubt. - + Scopes cannot contain spaces. Scopes dürfen keine Leerzeichen enthalten. - + The specified '{0}' is not valid for this client application. Der angegebene Parameter '{0}' ist für diese Client-Anwendung nicht gültig. - + The scope name cannot be null or empty. Der Scope-Name darf nicht null oder leer sein. - + The scope name cannot contain spaces. Der Scope-Name darf keine Leerzeichen enthalten. - + This client application is not allowed to use the authorization endpoint. Die Client-Anwendung darf den Autorisierungsendpunkt nicht verwenden. - + The client application is not allowed to use the authorization code flow. Die Client-Anwendung darf den Authorization Code Flow nicht verwenden. - + The client application is not allowed to use the implicit flow. Die Client-Anwendung darf den Implicit Flow nicht verwenden. - + The client application is not allowed to use the hybrid flow. Die Client-Anwendung darf den Hybrid Flow nicht verwenden. - + This client application is not allowed to use the specified scope. Die Client-Anwendung darf den angegebenen Scope nicht verwenden. - + The specified '{0}' is invalid. Der angegebene Paramter '{0}' ist ungültig. - + The '{0}' parameter is not valid for this client application. Der Parameter '{0}' ist für diese Client-Anwendung nicht gültig. - + The '{0}' parameter required for this client application is missing. Der für diese Client-Anwendung erforderliche Parameter '{0}' fehlt. - + The specified client credentials are invalid. Die angegebenen Client Credentials sind ungültig. - + This client application is not allowed to use the device endpoint. Diese Client-Anwendung darf den Device Endpoint nicht verwenden. - + The '{0}' and '{1}' parameters are required when using the client credentials grant. Die Parameter '{0}' und '{1}' sind erforderlich, wenn der Client Credentials Grant verwendet wird. - + The '{0}' parameter is required when using the device code grant. Der Parameter '{0}' ist erforderlich, wenn der Device Code Grant verwendet wird. - + The mandatory '{0}' and/or '{1}' parameters are missing. Die verpflichtenden Parameter '{0}' und/oder '{1}' fehlen. - + A scope with the same name already exists. Ein Scope mit dem gleichen Namen existiert bereits. - + This client application is not allowed to use the token endpoint. Die Client-Anwendung darf den Token-Endpoint nicht verwenden.. - + This client application is not allowed to use the specified grant type. Diese Client-Anwendung darf den angegebenen Grant Type nicht verwenden. - + The client application is not allowed to use the '{0}' scope. Diese Client-Anwendung darf den '{0}' Scope nicht verwenden. - + The specified authorization code cannot be used without sending a client identifier. Der angegebene Autorisierungscode kann nicht verwendet werden, ohne eine Client-Kennung zu senden. - + The specified device code cannot be used without sending a client identifier. Der angegebene Gerätecode kann nicht verwendet werden, ohne eine Client-Kennung zu senden. - + The specified refresh token cannot be used without sending a client identifier. Das angegebene Refresh-Token kann nicht verwendet werden, ohne eine Client-Kennung zu senden. - + The specified authorization code cannot be used by this client application. Der angegebene Autorisierungscode kann von dieser Client-Anwendung nicht verwendet werden. - + The specified device code cannot be used by this client application. Der angegebene Gerätecode kann von dieser Client-Anwendung nicht verwendet werden. - + The specified refresh token cannot be used by this client application. Der angegebene Refresh-Token kann von dieser Client-Anwendung nicht verwendet werden. - + The specified '{0}' parameter doesn't match the client redirection address the authorization code was initially sent to. Der angegebene '{0}'-Parameter stimmt nicht mit der Redirect-URL des Clients überein, an die der Autorisierungscode ursprünglich gesendet wurde. - + The '{0}' parameter cannot be used when no '{1}' was specified in the authorization request. Der Parameter '{0}' kann nicht verwendet werden, wenn im Authorization Request kein '{1}' angegeben wurde. - + The '{0}' parameter is not valid in this context. Der Parameter '{0}' ist in diesem Kontext ungültig. - + This client application is not allowed to use the introspection endpoint. Diese Client-Anwendung darf den Introspection-Endpoint nicht verwenden. - + The specified token cannot be introspected. Auf dem angegebenen Token kann kann keine Selbstprüfung durchgeführt werden. - + The client application is not allowed to introspect the specified token. Die Client-Anwendung ist nicht zur Selbstprüfung des angegebenen Tokens berechtigt. - + This client application is not allowed to use the revocation endpoint. Die Client-Anwendung ist zur Benutzung des Revocation-Endpoints nicht berechtigt. - + This token cannot be revoked. Dieser Token kann nicht widerrufen werden. - + The client application is not allowed to revoke the specified token. Die Client-Anwendung darf den angegebenen Token nicht widerrufen. - + The mandatory '{0}' header is missing. The mandatory '{0}' header is missing. - + The specified '{0}' header is invalid. Der verpflichtende '{0}'-Header fehlt. - + This server only accepts HTTPS requests. Der Server akzeptiert nur Anfragen über HTTPS. - + The specified HTTP method is not valid. Die angegebene HTTP-Methode ist ungültig. - + A token with the same reference identifier already exists. Ein Token mit dem gleichen Referenzbezeichner existiert bereits. - + The token type cannot be null or empty. Der Tokentyp kann nicht null oder leer sein. - + Multiple client credentials cannot be specified. Mehrere Client Credentials können nicht angegeben werden. - + The issuer associated to the specified token is not valid. Der Issuer, der dem angegebenen Token zugeordnet ist, ist nicht gültig. - + The specified token is not of the expected type. Der angegebene Token hat nicht den erwarteten Typ. - + The signing key associated to the specified token was not found. Der mit dem angegebenen Token verknüpfte Signierschlüssel wurde nicht gefunden. - + The signature associated to the specified token is not valid. Die mit dem angegebenen Token verbundene Signatur ist nicht gültig. - + This resource server is currently unavailable. Der Resource Server ist derzeit nicht verfügbar. - + The specified token doesn't contain any audience. Das angegebene Token enthält keine Audience. - + The specified token cannot be used with this resource server. Das angegebene Token kann mit diesem Resource Server nicht verwendet werden. - + The user represented by the token is not allowed to perform the requested action. Der Benutzer, der durch das Token repräsentiert wird, darf die angeforderte Aktion nicht ausführen. - + No issuer could be found in the server configuration. In der Serverkonfiguration konnte kein Issuer gefunden werden. - + A server configuration containing an invalid issuer was returned. Es wurde eine Serverkonfiguration mit einem ungültigen Aussteller zurückgegeben. - + The issuer returned in the server configuration is not valid. Der in der Serverkonfiguration zurückgegebene Issuer ist nicht gültig. - + No JWKS endpoint could be found in the server configuration. In der Serverkonfiguration konnte kein JWKS-Endpoint gefunden werden. - + A server configuration containing an invalid JWKS endpoint URL was returned. Es wurde eine Serverkonfiguration mit einer ungültigen JWKS-Endpoint-URL zurückgegeben. - + A server configuration containing an invalid introspection endpoint URL was returned. Es wurde eine Serverkonfiguration mit einer ungültigen Introspection-Endpoint-URL zurückgegeben. - + The JWKS document didn't contain a valid '{0}' node with at least one key. Das JWKS-Dokument enthielt keinen gültigen '{0}'-Knoten mit mindestens einem Schlüssel. - + A JWKS response containing an unsupported key was returned. Es wurde eine JWKS-Response mit einem nicht unterstützten Schlüssel zurückgegeben. - + A JWKS response containing an invalid key was returned. Es wurde eine JWKS-Response mit einem ungültigen Schlüssel zurückgegeben. - + The mandatory '{0}' parameter couldn't be found in the introspection response. Der verpflichtende Parameter '{0}' konnte in der Introspektionsantwort nicht gefunden werden. - + The token was rejected by the remote authentication server. Der Token wurde vom Remote-Authentifizierungsserver zurückgewiesen. - + The '{0}' claim is malformed or isn't of the expected type. Der '{0}'-Claim ist fehlerhaft oder entspricht nicht dem erwarteten Typ. - + An introspection response containing a malformed issuer was returned. Eine Introspektionsantwort mit einem fehlerhaften Issuer wurde zurückgeschickt. - + The issuer returned in the introspection response is not valid. The issuer returned in the introspection response is not valid. - + The type of the introspected token doesn't match the expected type. Der in der Selbstprüfungsantwort zurückgegebene Issuer ist nicht gültig. - + An application with the same client identifier already exists. Eine Anwendung mit dem gleichen Client-Identifier existiert bereits. - + Only confidential, hybrid or public applications are supported by the default application manager. Nur Confidential, Hybrid oder Public Anwendungen werden vom Standardanwendungsmanager unterstützt. - + The client secret cannot be null or empty for a confidential application. Das Client-Secret darf bei Confidential-Anwendungenkann nicht null oder leer sein. - + A client secret cannot be associated with a public application. Ein Client-Secret kann nicht mit einer Public-Anwendung assoziert werden. - + Callback URLs cannot contain a fragment. Callback URLs dürfen kein Fragment enthalten. - + The authorization type cannot be null or empty. Der Authorization Code kann nicht null oder leer sein. - + The specified authorization type is not supported by the default token manager. Der angegebene Authorization-Type wird vom Standard-Token-Manager nicht unterstützt. - + The client type cannot be null or empty. Der Client-Type darf nicht null oder leer sein. - + Callback URLs cannot be null or empty. Callback URLs dürfen nicht null oder leer sein. - + Callback URLs must be valid absolute URLs. Callback URLs müssen valide, absolute URLs sein. - + Removes orphaned tokens and authorizations from the database. Entfernt verwaiste Token und Berechtigungen aus der Datenbank. - + Starts the scheduled task at regular intervals. Startet die geplante Aufgabe in regelmäßigen Abständen. diff --git a/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.es.xlf b/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.es.xlf index 4fc2ae02..eee70665 100644 --- a/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.es.xlf +++ b/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.es.xlf @@ -2,597 +2,597 @@ - + The security token is missing. Falta el token de seguridad. - + The specified authorization code is invalid. El código de autorización provisto no es válido. - + The specified device code is invalid. El código de dispositivo provisto no es válido. - + The specified refresh token is invalid. El token de actualización provisto no es válido. - + The specified token is invalid. El token provisto no es válido. - + The specified token is not an authorization code. El token provisto no es un código de autorización. - + The specified token is not an device code. El token provisto no es un código de dispositivo. - + The specified token is not a refresh token. El token provisto no es un token de actualización. - + The specified token is not an access token. El token provisto no es un token de acceso. - + The specified identity token is invalid. El token provisto de identidad provisto no es válido. - + The specified authorization code has already been redeemed. El código de autorización provisto ya ha sido canjeado. - + The specified device code has already been redeemed. El código de dispositivo provisto ya ha sido canjeado. - + The specified refresh token has already been redeemed. El token de actualización provisto ya ha sido canjeado. - + The specified token has already been redeemed. El token provisto ya ha sido canjeado. - + The authorization has not been granted yet by the end user. El usuario final aún no ha concedido la autorización. - + The authorization was denied by the end user. La autorización fue denegada por el usuario final. - + The specified authorization code is no longer valid. El codigo de autorización provisto ya no es válido. - + The specified device code is no longer valid. El código de dispositivo provisto ya no es válido. - + The specified refresh token is no longer valid. El token de actualización provisto ya no es válido. - + The specified token is no longer valid. El token provisto ya no es válido. - + The authorization associated with the authorization code is no longer valid. La autorización asociada con el codigo de autorización ya no es válida. - + The authorization associated with the device code is no longer valid. La autorización asociada con el código de dispositivo ya no es válida. - + The authorization associated with the refresh token is no longer valid. La autorización asociada con el token de actualización ya no es válida. - + The authorization associated with the token is no longer valid. La autorización asociada con el token ya no es válida. - + The token request was rejected by the authentication server. La petición del token ha sido rechazada por el servidor de autenticación. - + The user information access demand was rejected by the authentication server. La demanda de acceso a la información del usuario ha sido rechazada por el servidor de autenticación. - + The specified user code is no longer valid. El código de usuario provisto ya no es válido. - + The '{0}' parameter is not supported. El parámetro '{0}' no esta soportado. - + The mandatory '{0}' parameter is missing. Falta el parámetro obligatorio '{0}'. - + The '{0}' parameter must be a valid absolute URL. El parámetro '{0}' debe ser una URL absoluta válida. - + The '{0}' parameter must not include a fragment. El parámetro '{0}' no debe incluir un fragmento. - + The specified '{0}' is not supported. El '{0}' provisto no esta soportado. - + The specified '{0}'/'{1}' combination is invalid. La combinación '{0}'/'{1}' no es válida. - + The mandatory '{0}' scope is missing. Falta el scope obligatorio '{0}'. - + The '{0}' scope is not allowed. El scope '{0}' no esta permitido. - + The client identifier cannot be null or empty. El identificador de cliente no puede ser nulo ni vacío. - + The '{0}' parameter cannot be used without '{1}'. El parámetro '{0}' debe ser utilizado en conjunto con '{1}'. - + The status cannot be null or empty. El estado no puede ser nulo ni vacío. - + Scopes cannot be null or empty. Los scopes no pueden ser nulos ni vacíos. - + The '{0}' and '{1}' parameters can only be used with a response type containing '{2}'. Los parámetros '{0}' y '{1}' pueden ser usados únicamente con un tipo de respuesta que contenga '{2}'. - + The specified '{0}' is not allowed when using PKCE. El '{0}' provisto no esta permitido cuando se utiliza PKCE. - + Scopes cannot contain spaces. Los scopes no pueden tener espacios. - + The specified '{0}' is not valid for this client application. El '{0}' provisto no es válido para esta aplicación de cliente. - + The scope name cannot be null or empty. El nombre del scope no puede ser nulo ni vacío. - + The scope name cannot contain spaces. Le nom de la portée ne peut pas contenir d'espace. - + This client application is not allowed to use the authorization endpoint. La aplicación de cliente no esta permitida a utilizar el destino de autorización. - + The client application is not allowed to use the authorization code flow. La aplicación de cliente no esta permitida a utilizar el flujo de código de autorización. - + The client application is not allowed to use the implicit flow. La aplicación de cliente no esta permitida a utilizar el flujo implícito. - + The client application is not allowed to use the hybrid flow. La aplicación de cliente no esta permitida a utilizar el flujo híbrido. - + This client application is not allowed to use the specified scope. La aplicación de cliente no esta permitida a utilizar el scope provisto. - + The specified '{0}' is invalid. El '{0}' provisto no es válida. - + The '{0}' parameter is not valid for this client application. El parámetro '{0}' no es válido para esta aplicación de cliente. - + The '{0}' parameter required for this client application is missing. Flata el parámetro obligatorio '{0}' para esta aplicación de cliente. - + The specified client credentials are invalid. Las credenciales del cliente provista no son válidas. - + This client application is not allowed to use the device endpoint. La aplicación de cliente no esta permitida a utilizar el destino de dispositivo. - + The '{0}' and '{1}' parameters are required when using the client credentials grant. Los parámetros '{0}' y '{1}' son obligatorios cuando la concesión de credenciales de cliente es utilizada. - + The '{0}' parameter is required when using the device code grant. El parámetro '{0}' es obligatorios cuando la concesion de código de dispositivo es utlizada. - + The mandatory '{0}' and/or '{1}' parameters are missing. Faltan los paramétros obligatorios '{0}' y/o '{1}'. - + A scope with the same name already exists. Un scope con el mismo nombre ya existe. - + This client application is not allowed to use the token endpoint. La aplicación de cliente no esta permitida a utilizar el destino de token. - + This client application is not allowed to use the specified grant type. La aplicación de cliente no esta permitida a utilizar el tipo de concesion especificada. - + The client application is not allowed to use the '{0}' scope. La aplicación de cliente no esta permitida a utilizar la concesion '{0}'. - + The specified authorization code cannot be used without sending a client identifier. El código de autorización provisto no puede ser utilizado sin enviar un identificador de cliente. - + The specified device code cannot be used without sending a client identifier. El código de dispositivo provisto no puede ser utilizado sin enviar un identificador de cliente. - + The specified refresh token cannot be used without sending a client identifier. El token de actualización provisto no puede ser utilizado sin enviar un identificador de cliente. - + The specified authorization code cannot be used by this client application. El código de autorización provisto no puede ser utilizado por ésta aplicación de cliente. - + The specified device code cannot be used by this client application. El código de dispositivo provisto no puede ser utilizado por ésta aplicación de cliente. - + The specified refresh token cannot be used by this client application. El código de actualización provisto no puede ser utilizado por ésta aplicación de cliente. - + The specified '{0}' parameter doesn't match the client redirection address the authorization code was initially sent to. El parámetro '{0}' no concuerda con la dirección de redireccionamiento de cliente inicialmente provista en el código de autorización. - + The '{0}' parameter cannot be used when no '{1}' was specified in the authorization request. El parámetro '{0}' no puede ser utilizado cuando '{1}' fue especificado en la petición de autorizacion.. - + The '{0}' parameter is not valid in this context. El parámetro '{0}' no es válido en este contexto. - + This client application is not allowed to use the introspection endpoint. La aplicación de cliente no esta permitida a utilizar el destino de introspección - + The specified token cannot be introspected. El token provisto no se puede introspectar. - + The client application is not allowed to introspect the specified token. La aplicación de cliente no está permitida a introspectar el token provisto. - + This client application is not allowed to use the revocation endpoint. La aplicación de cliente no está permitida a utilizar el destino de revocación. - + This token cannot be revoked. Este token no puede ser revocado. - + The client application is not allowed to revoke the specified token. La aplicación de cliente no esta permitida a revocar el token provisto. - + The mandatory '{0}' header is missing. Falta el encabezamiento obligatorio '{0}'. - + The specified '{0}' header is invalid. El encabezamiento '{0}' no es válido. - + This server only accepts HTTPS requests. Este servidor solo soporta peticiones HTTPS. - + The specified HTTP method is not valid. El método HTTP provisto no es válido. - + A token with the same reference identifier already exists. Un token con la misma referencia identificatoria ya existe. - + The token type cannot be null or empty. El tipo de token no puede ser ni null ni vacío. - + Multiple client credentials cannot be specified. No se pueden especificar multiples credenciales de cliente. - + The issuer associated to the specified token is not valid. El emisor asociado al token especificado no es válido. - + The specified token is not of the expected type. El token especificado no es del tipo esperado. - + The signing key associated to the specified token was not found. No se encontró la clave de firma asociada al token especificado. - + The signature associated to the specified token is not valid. La firma asociada al token especificado no es válida. - + This resource server is currently unavailable. Este servidor de recursos no está disponible actualmente. - + The specified token doesn't contain any audience. El token especificado no contiene ninguna audiencia. - + The specified token cannot be used with this resource server. El token especificado no se puede utilizar con este servidor de recursos. - + The user represented by the token is not allowed to perform the requested action. El usuario representado por el token no puede realizar la acción solicitada. - + No issuer could be found in the server configuration. No se pudo encontrar ningún emisor en la configuración del servidor. - + A server configuration containing an invalid issuer was returned. La respuesta de la configuración de servidor contiene un emisor inválido. - + The issuer returned in the server configuration is not valid. El emisor devuelto en la configuración del servidor no es válido. - + No JWKS endpoint could be found in the server configuration. No se pudo encontrar ningún destino JWKS en la configuración del servidor. - + A server configuration containing an invalid JWKS endpoint URL was returned. La respuesta de la configuración de servidor contiene una URL de destino JWKS inválida. - + A server configuration containing an invalid introspection endpoint URL was returned. La respuesta de la configuración de servidor contiene una URL de destino de introspección inválida. - + The JWKS document didn't contain a valid '{0}' node with at least one key. El documento JWKS no contenía un nodo '{0}' válido con al menos una clave. - + A JWKS response containing an unsupported key was returned. La clave contenida en la respuesta JWKS no está soportada. - + A JWKS response containing an invalid key was returned. La clave contenida en la respuesta JWKS es inválida. - + The mandatory '{0}' parameter couldn't be found in the introspection response. No se pudo encontrar el parámetro obligatorio '{0}' en la respuesta de introspección. - + The token was rejected by the remote authentication server. El token fue rechazado por el servidor de autenticación remoto. - + The '{0}' claim is malformed or isn't of the expected type. La afirmación "{0}" tiene un formato incorrecto o no es del tipo esperado. - + An introspection response containing a malformed issuer was returned. La respuesta de introspección contiene un emisor con un formato incorrecto. - + The issuer returned in the introspection response is not valid. El emisor devuelto en la respuesta de introspección no es válido. - + The type of the introspected token doesn't match the expected type. El tipo de token introspectado no coincide con el tipo esperado. - + An application with the same client identifier already exists. Ya existe una aplicación con el mismo identificador de cliente. - + Only confidential, hybrid or public applications are supported by the default application manager. El administrador de aplicaciones predeterminado solo admite aplicaciones confidenciales, híbridas o públicas. - + The client secret cannot be null or empty for a confidential application. El secreto del cliente no puede ser nulo ni vacío para una aplicación confidencial. - + A client secret cannot be associated with a public application. Un secreto de cliente no se puede asociar a una aplicación pública. - + Callback URLs cannot contain a fragment. Las URL de retorno no pueden contener un fragmento. - + The authorization type cannot be null or empty. El tipo de autorización no puede ser nulo ni vacío. - + The specified authorization type is not supported by the default token manager. El tipo de autorización provisto no es compatible con el administrador de tokens predeterminado. - + The client type cannot be null or empty. El tipo de cliente no puede ser nulo ni vacío. - + Callback URLs cannot be null or empty. Las URL de retorno no pueden ser nulas ni vacías. - + Callback URLs must be valid absolute URLs. Las URL de retorno deben ser URL absolutas válidas. - + Removes orphaned tokens and authorizations from the database. Elimina tokens y autorizaciones huérfanos de la base de datos. - + Starts the scheduled task at regular intervals. Inicia la tarea programada en intervalos regulares. diff --git a/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.fr.xlf b/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.fr.xlf index 3bbe33b0..8c324426 100644 --- a/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.fr.xlf +++ b/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.fr.xlf @@ -2,597 +2,597 @@ - + The security token is missing. Le jeton de sécurité est manquant. - + The specified authorization code is invalid. Le code d'autorisation spécifié n'est pas valide. - + The specified device code is invalid. Le code d'appareil spécifié n'est pas valide. - + The specified refresh token is invalid. Le jeton de rafraîchissement spécifié n'est pas valide. - + The specified token is invalid. Le jeton spécifié n'est pas valide. - + The specified token is not an authorization code. Le jeton spécifié n'est pas un code d'autorisation. - + The specified token is not an device code. Le jeton spécifié n'est pas un code d'appareil. - + The specified token is not a refresh token. Le jeton spécifié n'est pas un jeton d'actualisation. - + The specified token is not an access token. Le jeton spécifié n'est pas un jeton d'accès. - + The specified identity token is invalid. Le jeton d'identité spécifié n'est pas valide. - + The specified authorization code has already been redeemed. Le jeton d'autorisation spécifié a déjà été échangé. - + The specified device code has already been redeemed. Le jeton d'appareil spécifié a déjà été échangé. - + The specified refresh token has already been redeemed. Le jeton de rafraîchissement spécifié a déjà été échangé. - + The specified token has already been redeemed. Le jeton spécifié a déjà été échangé. - + The authorization has not been granted yet by the end user. L'autorisation n'a pas encore été accordée par l'utilisateur final. - + The authorization was denied by the end user. L'autorisation a été refusée par l'utilisateur final. - + The specified authorization code is no longer valid. Le code d'autorisation spécifié n'est plus valide. - + The specified device code is no longer valid. Le code d'appareil spécifié n'est plus valide. - + The specified refresh token is no longer valid. Le jeton d'actualisation spécifié n'est plus valide. - + The specified token is no longer valid. Le jeton spécifié n'est plus valide. - + The authorization associated with the authorization code is no longer valid. L'autorisation associée au code d'autorisation n'est plus valide. - + The authorization associated with the device code is no longer valid. L'autorisation associée au code d'appareil n'est plus valide. - + The authorization associated with the refresh token is no longer valid. L'autorisation associée au jeton d'actualisation n'est plus valide. - + The authorization associated with the token is no longer valid. L'autorisation associée au jeton n'est plus valide. - + The token request was rejected by the authentication server. La demande de jeton a été rejetée par le serveur d'authentification. - + The user information access demand was rejected by the authentication server. La demande d'information utilisateur a été rejetée par le serveur d'authentification. - + The specified user code is no longer valid. Le code utilisateur spécifié n'est plus valide. - + The '{0}' parameter is not supported. Le paramètre '{0}' n'est pas supporté. - + The mandatory '{0}' parameter is missing. Le paramètre obligatoire '{0}' est manquant. - + The '{0}' parameter must be a valid absolute URL. Le paramètre '{0}' doit être une URL valide et absolue. - + The '{0}' parameter must not include a fragment. Le paramètre '{0}' ne doit pas comporter de fragment. - + The specified '{0}' is not supported. Le '{0}' spécifié n'est pas supporté. - + The specified '{0}'/'{1}' combination is invalid. La combinaison '{0}'/'{1}' spécifiée n'est pas valide. - + The mandatory '{0}' scope is missing. La portée obligatoire '{0}' est manquante. - + The '{0}' scope is not allowed. La portée '{0}' n'est pas autorisée. - + The client identifier cannot be null or empty. L'identifiant client ne peut pas être null ou vide. - + The '{0}' parameter cannot be used without '{1}'. Le paramètre '{0}' ne peut pas être utilisé sans '{1}'. - + The status cannot be null or empty. Le statut ne peut pas être null ou vide. - + Scopes cannot be null or empty. Les portées ne peuvent pas être null ou vides. - + The '{0}' and '{1}' parameters can only be used with a response type containing '{2}'. Les paramètres '{0}' et '{1}' ne peuvent être utilisés qu'avec un type de réponse contenant '{2}'. - + The specified '{0}' is not allowed when using PKCE. Le '{0}' spécifié n'est pas autorisé lorsque PKCE est utilisé. - + Scopes cannot contain spaces. Les portées ne peuvent pas contenir d'espace. - + The specified '{0}' is not valid for this client application. Le '{0}' spécifié n'est pas valide pour cette application cliente. - + The scope name cannot be null or empty. Le nom de la portée ne peut pas être null ou vide. - + The scope name cannot contain spaces. Le nom de la portée ne peut pas contenir d'espace. - + This client application is not allowed to use the authorization endpoint. Cette application cliente n'est pas autorisée à utiliser le point de terminaison d'autorisation. - + The client application is not allowed to use the authorization code flow. Cette application cliente n'est pas autorisée à utiliser le flux d'autorisation par code. - + The client application is not allowed to use the implicit flow. Cette application cliente n'est pas autorisée à utiliser le flux implicite. - + The client application is not allowed to use the hybrid flow. Cette application cliente n'est pas autorisée à utiliser le flux hybride. - + This client application is not allowed to use the specified scope. Cette application cliente n'est pas autorisée à utiliser la portée spécifiée. - + The specified '{0}' is invalid. Le '{0}' spécifié n'est pas valide. - + The '{0}' parameter is not valid for this client application. Le paramètre '{0}' n'est pas valide pour cette application cliente. - + The '{0}' parameter required for this client application is missing. Le paramètre '{0}' requis pour cette application cliente est manquant. - + The specified client credentials are invalid. Les identifiants client spécifiés ne sont pas valides. - + This client application is not allowed to use the device endpoint. Cette application cliente n'est pas autorisée à utiliser le point de terminaison d'appareil. - + The '{0}' and '{1}' parameters are required when using the client credentials grant. Les paramètres '{0}' et '{1}' sont requis lors que l'accès par identifiants client est utilisé. - + The '{0}' parameter is required when using the device code grant. Le paramètre '{0}' est requis lorsque l'accès par code d'appareil est utilisé. - + The mandatory '{0}' and/or '{1}' parameters are missing. Les paramètres obligatoires '{0}' et/ou '{1}' sont manquants. - + A scope with the same name already exists. Une portée avec le même nom existe déjà. - + This client application is not allowed to use the token endpoint. Cette application cliente n'est pas autorisée à utiliser le point de terminaison d'obtention de jeton. - + This client application is not allowed to use the specified grant type. Cette application cliente n'est pas autorisée à utiliser le type d'accès spécifié. - + The client application is not allowed to use the '{0}' scope. Cette application cliente n'est pas autorisée à utiliser la portée '{0}'. - + The specified authorization code cannot be used without sending a client identifier. Le code d'autorisation spécifié ne peut pas être utilisé sans envoyer d'identifiant client. - + The specified device code cannot be used without sending a client identifier. Le code d'appareil spécifié ne peut pas être utilisé sans envoyer d'identifiant client. - + The specified refresh token cannot be used without sending a client identifier. Le jeton de rafraîchissement spécifié ne peut pas être utilisé sans envoyer d'identifiant client. - + The specified authorization code cannot be used by this client application. Le code d'autorisation spécifié ne peut pas être utilisé par cette application cliente. - + The specified device code cannot be used by this client application. Le code d'appareil spécifié ne peut pas être utilisé par cette application cliente. - + The specified refresh token cannot be used by this client application. Le jeton de rafraîchissement spécifié ne peut pas être utilisé par cette application cliente. - + The specified '{0}' parameter doesn't match the client redirection address the authorization code was initially sent to. Le paramètre '{0}' spécifié ne correspond pas à l'adresse de redirection client à laquelle le code d'autorisation a été initialement envoyé. - + The '{0}' parameter cannot be used when no '{1}' was specified in the authorization request. Le paramètre '{0}' ne peut pas être utilisé lorsqu'aucun '{1}' n'a été spécifié dans la demande d'autorisation. - + The '{0}' parameter is not valid in this context. Le paramètre '{0}' n'est pas valide dans ce contexte. - + This client application is not allowed to use the introspection endpoint. Cette application cliente n'est pas autorisée à utiliser le point de terminaison d'introspection. - + The specified token cannot be introspected. Le jeton spécifié ne peut pas être introspecté. - + The client application is not allowed to introspect the specified token. L'application cliente n'est pas autorisée à introspecter le jeton spécifié. - + This client application is not allowed to use the revocation endpoint. Cette application cliente n'est pas autorisée à utiliser le point de terminaison de révocation. - + This token cannot be revoked. Ce jeton ne peut pas être révoqué. - + The client application is not allowed to revoke the specified token. Cette application cliente n'est pas autorisée à révoquer le jeton spécifié. - + The mandatory '{0}' header is missing. L'en-tête obligatoire '{0}' est manquant. - + The specified '{0}' header is invalid. L'en-tête '{0}' spécifié n'est pas valide. - + This server only accepts HTTPS requests. Ce serveur n'accepte que des requêtes HTTPS. - + The specified HTTP method is not valid. La méthode HTTP spécifiée n'est pas valide. - + A token with the same reference identifier already exists. Un jeton avec le même identifiant par référence existe déjà. - + The token type cannot be null or empty. Le type de jeton ne peut pas être null ou vide. - + Multiple client credentials cannot be specified. Plusieurs identifiants client ne peuvent pas être spécifiés. - + The issuer associated to the specified token is not valid. L'émetteur associé au jeton spécifié n'est pas valide. - + The specified token is not of the expected type. Le jeton spécifié n'est pas du type attendu. - + The signing key associated to the specified token was not found. La clé de signature associée au jeton spécifié n'a pas été trouvée. - + The signature associated to the specified token is not valid. La signature associée au jeton spécifiée n'est pas valid. - + This resource server is currently unavailable. Ce serveur de ressource est actuellement indisponible. - + The specified token doesn't contain any audience. Le jeton spécifié ne contient aucune audience. - + The specified token cannot be used with this resource server. Le jeton spécifié ne peut pas être utilisé par ce serveur de ressource. - + The user represented by the token is not allowed to perform the requested action. L'utilisateur représenté par le jeton n'est pas autorisé à exécuter l'action demandée. - + No issuer could be found in the server configuration. Aucun émetteur n'a pu être trouvé dans la configuration du serveur. - + A server configuration containing an invalid issuer was returned. Une configuration serveur contenant un émetteur non valide a été retournée. - + The issuer returned in the server configuration is not valid. L'émetteur retourné dans la configuration du serveur n'est pas valide. - + No JWKS endpoint could be found in the server configuration. Aucun point de terminaison JWKS n'a pu être trouvé dans la configuration du serveur. - + A server configuration containing an invalid JWKS endpoint URL was returned. Une configuration serveur contenant une URL invalide pour le point de terminaison JWKS a été retournée. - + A server configuration containing an invalid introspection endpoint URL was returned. Une configuration serveur contenant une URL invalide pour le point de terminaison d'introspection a été retournée. - + The JWKS document didn't contain a valid '{0}' node with at least one key. Le document JWKS ne contenait pas de nœud '{0}' valide comportant au moins une clé. - + A JWKS response containing an unsupported key was returned. Une réponse JWKS contenant une clé non supportée a été retournée. - + A JWKS response containing an invalid key was returned. Une réponse JWKS contenant une clé non valide a été retournée. - + The mandatory '{0}' parameter couldn't be found in the introspection response. Le paramètre obligatoire '{0}' n'a pu être trouvé dans la réponse d'introspection. - + The token was rejected by the remote authentication server. Le jeton a été rejeté par le serveur d'authentification distant. - + The '{0}' claim is malformed or isn't of the expected type. La revendication '{0}' est malformée ou n'est pas du type attendu. - + An introspection response containing a malformed issuer was returned. Une réponse d'introspection contenant un émetteur malformé a été retournée. - + The issuer returned in the introspection response is not valid. L'émetteur retourné dans la réponse d'introspection n'est pas valide. - + The type of the introspected token doesn't match the expected type. Le type du jeton introspecté ne correspond pas au type attendu. - + An application with the same client identifier already exists. Une application avec le même identifiant client existe déjà. - + Only confidential, hybrid or public applications are supported by the default application manager. Seules les applications confidentielles, hybrides ou publiques sont supportées par le gestionnaire d'application par défaut. - + The client secret cannot be null or empty for a confidential application. Le secret client ne peut pas être null ou vide pour une application confidentielle. - + A client secret cannot be associated with a public application. Un secret client ne peut pas être associé à une application publique. - + Callback URLs cannot contain a fragment. Les URLs de rappel ne peuvent pas contenir de fragment. - + The authorization type cannot be null or empty. Le type d'autorisation ne peut pas être null ou vide. - + The specified authorization type is not supported by the default token manager. Le type d'autorisation spécifié n'est pas supporté par le gestionnaire de jeton par défaut. - + The client type cannot be null or empty. Le type de client ne peut pas être null ou vide. - + Callback URLs cannot be null or empty. Les URLs de rappel ne peuvent pas être null ou vides. - + Callback URLs must be valid absolute URLs. Les URLs de rappel doit être des URLs valides et absolues. - + Removes orphaned tokens and authorizations from the database. Supprime les jetons et autorisations orphelines de la base de données. - + Starts the scheduled task at regular intervals. Démarre la tâche planifiée à intervalles réguliers. diff --git a/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.gu.xlf b/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.gu.xlf index 9ef5e28d..eb7acb96 100644 --- a/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.gu.xlf +++ b/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.gu.xlf @@ -2,597 +2,597 @@ - + The security token is missing. સુરક્ષા ટોકન ખૂટે છે. - + The specified authorization code is invalid. ઉલ્લેખિત અધિકૃતતા કોડ અમાન્ય છે. - + The specified device code is invalid. ઉલ્લેખિત ઉપકરણ કોડ અમાન્ય છે. - + The specified refresh token is invalid. ઉલ્લેખિત રીફ્રેશ ટોકન અમાન્ય છે. - + The specified token is invalid. ઉલ્લેખિત ટોકન અમાન્ય છે. - + The specified token is not an authorization code. ઉલ્લેખિત ટોકન એ અધિકૃતતા કોડ નથી. - + The specified token is not an device code. ઉલ્લેખિત ટોકન એ કોઈ ડિવાઇસ કોડ નથી. - + The specified token is not a refresh token. ઉલ્લેખિત ટોકન રીફ્રેશ ટોકન નથી. - + The specified token is not an access token. ઉલ્લેખિત ટોકન એ પ્રવેશ ટોકન નથી. - + The specified identity token is invalid. ઉલ્લેખિત ઓળખ ટોકન અમાન્ય છે. - + The specified authorization code has already been redeemed. ઉલ્લેખિત અધિકૃતતા કોડ પહેલાથી જ રિડિમ થઈ ગયો છે. - + The specified device code has already been redeemed. ઉલ્લેખિત ડિવાઇસ કોડ પહેલાથી રિડિમ થઈ ગયો છે. - + The specified refresh token has already been redeemed. ઉલ્લેખિત રીફ્રેશ ટોકન પહેલાથી જ રિડિમ કરવામાં આવ્યું છે. - + The specified token has already been redeemed. ઉલ્લેખિત ટોકન પહેલાથી જ રિડીમ કરવામાં આવ્યું છે. - + The authorization has not been granted yet by the end user. અંતિમ વપરાશકર્તા દ્વારા હજી સુધી અધિકૃતતા આપવામાં આવી નથી. - + The authorization was denied by the end user. અંતિમ વપરાશકર્તા દ્વારા અધિકૃતતા નકારી હતી. - + The specified authorization code is no longer valid. ઉલ્લેખિત અધિકૃતતા કોડ હવે માન્ય નથી. - + The specified device code is no longer valid. ઉલ્લેખિત ઉપકરણ કોડ હવે માન્ય નથી. - + The specified refresh token is no longer valid. ઉલ્લેખિત રીફ્રેશ ટોકન હવે માન્ય નથી. - + The specified token is no longer valid. ઉલ્લેખિત ટોકન હવે માન્ય નથી. - + The authorization associated with the authorization code is no longer valid. અધિકૃતતા કોડ સાથે સંકળાયેલ અધિકૃતતા હવે માન્ય નથી. - + The authorization associated with the device code is no longer valid. ડિવાઇસ કોડ સાથે સંકળાયેલ અધિકૃતતા હવે માન્ય નથી. - + The authorization associated with the refresh token is no longer valid. રીફ્રેશ ટોકન સાથે સંકળાયેલ અધિકૃતતા હવે માન્ય નથી. - + The authorization associated with the token is no longer valid. ટોકન સાથે સંકળાયેલ અધિકૃતતા હવે માન્ય નથી. - + The token request was rejected by the authentication server. પ્રમાણીકરણ સર્વર દ્વારા ટોકન વિનંતીને નકારી કા .ી હતી. - + The user information access demand was rejected by the authentication server. વપરાશકર્તા માહિતી પ્રવેશ માંગને પ્રમાણીકરણ સર્વર દ્વારા નકારી હતી. - + The specified user code is no longer valid. ઉલ્લેખિત વપરાશકર્તા કોડ હવે માન્ય નથી. - + The '{0}' parameter is not supported. '{0}' પેરામીટર સપોર્ટેડ નથી. - + The mandatory '{0}' parameter is missing. ફરજિયાત '{0}' પરિમાણ ખૂટે છે. - + The '{0}' parameter must be a valid absolute URL. '{0}' પરિમાણ એક માન્ય સંપૂર્ણ URL હોવું આવશ્યક છે. - + The '{0}' parameter must not include a fragment. '{0}' પરિમાણમાં કોઈ ટુકડો શામેલ હોવો જોઈએ નહીં. - + The specified '{0}' is not supported. ઉલ્લેખિત '{0}' સપોર્ટેડ નથી. - + The specified '{0}'/'{1}' combination is invalid. ઉલ્લેખિત '{0}' / '{1}' સંયોજન અમાન્ય છે. - + The mandatory '{0}' scope is missing. ફરજિયાત '{0}' અવકાશ ખૂટે છે. - + The '{0}' scope is not allowed. '{0}' અવકાશની મંજૂરી નથી. - + The client identifier cannot be null or empty. ક્લાયંટ ઓળખકર્તા નલ અથવા ખાલી હોઈ શકતા નથી. - + The '{0}' parameter cannot be used without '{1}'. '{0}' પરિમાણનો ઉપયોગ '{1}' વગર કરી શકાતો નથી. - + The status cannot be null or empty. સ્થિતિ નલ અથવા ખાલી હોઈ શકતી નથી. - + Scopes cannot be null or empty. અવકાશ શૂન્ય અથવા ખાલી ન હોઈ શકે. - + The '{0}' and '{1}' parameters can only be used with a response type containing '{2}'. '{0}' અને '{1}' પરિમાણો ફક્ત '{2}' ધરાવતા પ્રતિભાવ પ્રકાર સાથે જ વાપરી શકાય છે. - + The specified '{0}' is not allowed when using PKCE. ઉલ્લેખિત '{0}' ને પીકેસીઇનો ઉપયોગ કરતી વખતે મંજૂરી નથી. - + Scopes cannot contain spaces. અવકાશમાં જગ્યાઓ શામેલ હોઈ શકતી નથી. - + The specified '{0}' is not valid for this client application. ઉલ્લેખિત '{0}' આ ક્લાયંટ એપ્લિકેશન માટે માન્ય નથી. - + The scope name cannot be null or empty. અવકાશનું નામ નલ અથવા ખાલી હોઈ શકતું નથી. - + The scope name cannot contain spaces. અવકાશ નામમાં જગ્યાઓ શામેલ હોઈ શકતી નથી. - + This client application is not allowed to use the authorization endpoint. આ ક્લાયંટ એપ્લિકેશનને અધિકૃતતા એન્ડપોઇન્ટનો ઉપયોગ કરવાની મંજૂરી નથી. - + The client application is not allowed to use the authorization code flow. ક્લાયંટ એપ્લિકેશનને અધિકૃતતા કોડ ફ્લોનો ઉપયોગ કરવાની મંજૂરી નથી. - + The client application is not allowed to use the implicit flow. ક્લાયંટ એપ્લિકેશનને ગર્ભિત પ્રવાહનો ઉપયોગ કરવાની મંજૂરી નથી. - + The client application is not allowed to use the hybrid flow. ક્લાયંટ એપ્લિકેશનને હાઇબ્રિડ ફ્લોનો ઉપયોગ કરવાની મંજૂરી નથી. - + This client application is not allowed to use the specified scope. આ ક્લાયંટ એપ્લિકેશનને ઉલ્લેખિત અવકાશનો ઉપયોગ કરવાની મંજૂરી નથી. - + The specified '{0}' is invalid. ઉલ્લેખિત '{0}' અમાન્ય છે. - + The '{0}' parameter is not valid for this client application. આ ક્લાયંટ એપ્લિકેશન માટે '{0}' પરિમાણ માન્ય નથી. - + The '{0}' parameter required for this client application is missing. આ ક્લાયંટ એપ્લિકેશન માટે જરૂરી '{0}' પરિમાણ ખૂટે છે. - + The specified client credentials are invalid. ઉલ્લેખિત ગ્રાહકના ઓળખપત્રો અમાન્ય છે. - + This client application is not allowed to use the device endpoint. આ ક્લાયંટ એપ્લિકેશનને ડિવાઇસ એન્ડપોઇન્ટનો ઉપયોગ કરવાની મંજૂરી નથી. - + The '{0}' and '{1}' parameters are required when using the client credentials grant. ક્લાયંટ ઓળખાણપત્ર અનુદાનનો ઉપયોગ કરતી વખતે '{0}' અને '{1}' પરિમાણો આવશ્યક છે. - + The '{0}' parameter is required when using the device code grant. ડિવાઇસ કોડ ગ્રાન્ટનો ઉપયોગ કરતી વખતે '{0}' પેરામીટર આવશ્યક છે. - + The mandatory '{0}' and/or '{1}' parameters are missing. ફરજિયાત '{0}' અને/અથવા '{1}' પરિમાણો ખૂટે છે. - + A scope with the same name already exists. સમાન નામનો અવકાશ પહેલેથી અસ્તિત્વમાં છે. - + This client application is not allowed to use the token endpoint. આ ક્લાયંટ એપ્લિકેશનને ટોકન એન્ડપોઇન્ટનો ઉપયોગ કરવાની મંજૂરી નથી. - + This client application is not allowed to use the specified grant type. આ ક્લાયંટ એપ્લિકેશનને ઉલ્લેખિત અનુદાન પ્રકારનો ઉપયોગ કરવાની મંજૂરી નથી. - + The client application is not allowed to use the '{0}' scope. ક્લાયંટ એપ્લિકેશનને '{0}' અવકાશનો ઉપયોગ કરવાની મંજૂરી નથી. - + The specified authorization code cannot be used without sending a client identifier. ઉલ્લેખિત અધિકૃતતા કોડનો ઉપયોગ ક્લાયંટ ઓળખકર્તાને મોકલ્યા વગર કરી શકાતો નથી. - + The specified device code cannot be used without sending a client identifier. ઉલ્લેખિત ડિવાઇસ કોડનો ઉપયોગ ક્લાયંટ ઓળખકર્તાને મોકલ્યા વગર કરી શકાતો નથી. - + The specified refresh token cannot be used without sending a client identifier. ઉલ્લેખિત રિફ્રેશ ટોકનનો ઉપયોગ ક્લાયંટ ઓળખકર્તાને મોકલ્યા વગર કરી શકાતો નથી. - + The specified authorization code cannot be used by this client application. ઉલ્લેખિત અધિકૃતતા કોડનો ઉપયોગ આ ક્લાયંટ એપ્લિકેશન દ્વારા કરી શકાતો નથી. - + The specified device code cannot be used by this client application. ઉલ્લેખિત ડિવાઇસ કોડનો ઉપયોગ આ ક્લાયંટ એપ્લિકેશન દ્વારા કરી શકાતો નથી. - + The specified refresh token cannot be used by this client application. ઉલ્લેખિત રીફ્રેશ ટોકનનો ઉપયોગ આ ક્લાયંટ એપ્લિકેશન દ્વારા કરી શકાતો નથી. - + The specified '{0}' parameter doesn't match the client redirection address the authorization code was initially sent to. ઉલ્લેખિત '{0}' પરિમાણ ક્લાયંટ રીડાયરેક્શન સરનામાં સાથે મેળ ખાતું નથી જે શરૂઆતમાં અધિકૃતિ કોડને મોકલવામાં આવ્યું હતું. - + The '{0}' parameter cannot be used when no '{1}' was specified in the authorization request. જ્યારે '{0}' પરિમાણનો ઉપયોગ સત્તાધિકરણ વિનંતીમાં કોઈ '{1}' ઉલ્લેખિત ન થાય ત્યારે કરી શકાશે નહીં. - + The '{0}' parameter is not valid in this context. '{0}' પરિમાણ આ સંદર્ભમાં માન્ય નથી. - + This client application is not allowed to use the introspection endpoint. આ ક્લાયંટ એપ્લિકેશનને આત્મનિરીક્ષણ અંતિમ બિંદુનો ઉપયોગ કરવાની મંજૂરી નથી. - + The specified token cannot be introspected. ઉલ્લેખિત ટોકન આત્મનિરીક્ષણ કરી શકાતું નથી. - + The client application is not allowed to introspect the specified token. ક્લાયંટ એપ્લિકેશનને ઉલ્લેખિત ટોકનને આત્મનિરીક્ષણ કરવાની મંજૂરી નથી. - + This client application is not allowed to use the revocation endpoint. આ ક્લાયંટ એપ્લિકેશનને રિવોલ્યુશન એન્ડપોઇન્ટનો ઉપયોગ કરવાની મંજૂરી નથી. - + This token cannot be revoked. આ ટોકન રદ કરી શકાતું નથી. - + The client application is not allowed to revoke the specified token. ક્લાયંટ એપ્લિકેશનને ઉલ્લેખિત ટોકન રદ કરવાની મંજૂરી નથી. - + The mandatory '{0}' header is missing. ફરજિયાત '{0}' હેડર ખૂટે છે. - + The specified '{0}' header is invalid. ઉલ્લેખિત '{0}' મથાળું અમાન્ય છે. - + This server only accepts HTTPS requests. આ સર્વર ફક્ત HTTPS વિનંતીઓ સ્વીકારે છે. - + The specified HTTP method is not valid. ઉલ્લેખિત એચટીટીપી પદ્ધતિ માન્ય નથી. - + A token with the same reference identifier already exists. સમાન સંદર્ભ ઓળખકર્તા સાથેનું એક ટોકન પહેલાથી અસ્તિત્વમાં છે. - + The token type cannot be null or empty. ટોકન પ્રકાર નલ અથવા ખાલી હોઈ શકતો નથી. - + Multiple client credentials cannot be specified. મલ્ટીપલ ક્લાયંટ ઓળખપત્રોનો ઉલ્લેખ કરી શકાતો નથી. - + The issuer associated to the specified token is not valid. ઉલ્લેખિત ટોકન સાથે સંકળાયેલ ઇશ્યુઅર માન્ય નથી. - + The specified token is not of the expected type. ઉલ્લેખિત ટોકન અપેક્ષિત પ્રકારનું નથી. - + The signing key associated to the specified token was not found. ઉલ્લેખિત ટોકન સાથે સંકળાયેલ સાઇનિંગ કી મળી ન હતી. - + The signature associated to the specified token is not valid. ઉલ્લેખિત ટોકન સાથે સંકળાયેલ સહી માન્ય નથી. - + This resource server is currently unavailable. આ સંસાધન સર્વર હાલમાં અનુપલબ્ધ છે. - + The specified token doesn't contain any audience. ઉલ્લેખિત ટોકનમાં કોઈ પ્રેક્ષક શામેલ નથી. - + The specified token cannot be used with this resource server. ઉલ્લેખિત ટોકનનો ઉપયોગ આ સાધન સર્વર સાથે કરી શકાતો નથી. - + The user represented by the token is not allowed to perform the requested action. ટોકન દ્વારા રજૂ કરાયેલ વપરાશકર્તાને વિનંતી કરેલી ક્રિયા કરવાની મંજૂરી નથી. - + No issuer could be found in the server configuration. સર્વર ગોઠવણીમાં કોઈ જારી કરનાર મળી શક્યો નથી. - + A server configuration containing an invalid issuer was returned. અમાન્ય અદા કરનારનો સર્વર ગોઠવણી પાછો ફર્યો હતો. - + The issuer returned in the server configuration is not valid. સર્વર ગોઠવણીમાં પાછો આપનાર માન્ય નથી. - + No JWKS endpoint could be found in the server configuration. સર્વર ગોઠવણીમાં કોઈ જેડબ્લ્યુકેએસ સમાપ્ત બિંદુ મળી શક્યું નથી. - + A server configuration containing an invalid JWKS endpoint URL was returned. અમાન્ય જેડબ્લ્યુકેએસ અંતિમ બિંદુ URL ધરાવતો સર્વર ગોઠવણી પાછો ફર્યો હતો. - + A server configuration containing an invalid introspection endpoint URL was returned. અમાન્ય આત્મનિરીક્ષણ અંતિમ બિંદુ URL ધરાવતો સર્વર ગોઠવણી પાછો ફર્યો હતો. - + The JWKS document didn't contain a valid '{0}' node with at least one key. જેડબ્લ્યુકેએસ દસ્તાવેજમાં ઓછામાં ઓછી એક કી સાથે માન્ય '{0}' નોડ શામેલ નથી. - + A JWKS response containing an unsupported key was returned. અસમર્થિત કી ધરાવતા જેડબ્લ્યુકેએસ નો જવાબ પાછો ફર્યો. - + A JWKS response containing an invalid key was returned. અમાન્ય કી ધરાવતા જેડબ્લ્યુકેએસ પ્રતિસાદ પાછો ફર્યો. - + The mandatory '{0}' parameter couldn't be found in the introspection response. ફરજિયાત '{0}' પરિમાણ આત્મનિરીક્ષણ પ્રતિસાદમાં શોધી શકાયું નહીં. - + The token was rejected by the remote authentication server. દૂરસ્થ પ્રમાણીકરણ સર્વર દ્વારા ટોકન નામંજૂર કરવામાં આવ્યું હતું. - + The '{0}' claim is malformed or isn't of the expected type. '{0}' દાવો દૂષિત છે અથવા અપેક્ષિત પ્રકારનો નથી. - + An introspection response containing a malformed issuer was returned. દૂષિત અદા કરનારનો આત્મનિરીક્ષણ પ્રતિસાદ પાછો ફર્યો. - + The issuer returned in the introspection response is not valid. આ રજૂઆત કરનાર આત્મનિરીક્ષણ પ્રતિસાદમાં પરત માન્ય નથી. - + The type of the introspected token doesn't match the expected type. આત્મનિરીક્ષણવાળા ટોકનનો પ્રકાર અપેક્ષિત પ્રકાર સાથે મેળ ખાતો નથી. - + An application with the same client identifier already exists. સમાન ક્લાયંટ ઓળખકર્તા સાથેની એક એપ્લિકેશન પહેલેથી અસ્તિત્વમાં છે. - + Only confidential, hybrid or public applications are supported by the default application manager. મૂળભૂત એપ્લિકેશન મેનેજર દ્વારા ફક્ત ગોપનીય, વર્ણસંકર અથવા સાર્વજનિક એપ્લિકેશનોને ટેકો આપવામાં આવે છે. - + The client secret cannot be null or empty for a confidential application. ગુપ્ત એપ્લિકેશન માટે ક્લાયંટ ક્લાયંટ નલ અથવા ખાલી હોઈ શકતું નથી. - + A client secret cannot be associated with a public application. ક્લાયંટ સિક્રેટ જાહેર એપ્લિકેશન સાથે સંકળાયેલ હોઈ શકે નહીં. - + Callback URLs cannot contain a fragment. કોલબેક URL માં કોઈ ટુકડો હોઈ શકતો નથી. - + The authorization type cannot be null or empty. અધિકૃતતાનો પ્રકાર નલ અથવા ખાલી હોઈ શકતો નથી. - + The specified authorization type is not supported by the default token manager. ઉલ્લેખિત અધિકૃતતાનો પ્રકાર મૂળભૂત ટોકન મેનેજર દ્વારા સપોર્ટેડ નથી. - + The client type cannot be null or empty. ક્લાયંટનો પ્રકાર નલ અથવા ખાલી હોઈ શકતો નથી. - + Callback URLs cannot be null or empty. ક કોલબેક URL ને નલ અથવા ખાલી હોઈ શકતા નથી. - + Callback URLs must be valid absolute URLs. ક કોલબેક URL માન્ય પૂર્ણ URL હોવા આવશ્યક છે. - + Removes orphaned tokens and authorizations from the database. ડેટાબેઝમાંથી અનાથ ટોકન્સ અને અધિકૃતિઓ દૂર કરે છે. - + Starts the scheduled task at regular intervals. નિયમિત અંતરાલે સુનિશ્ચિત કાર્ય શરૂ કરે છે. diff --git a/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.hi.xlf b/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.hi.xlf index 5fdcc14e..22fd9a36 100644 --- a/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.hi.xlf +++ b/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.hi.xlf @@ -2,597 +2,597 @@ - + The security token is missing. सुरक्षा टोकन गायब है. - + The specified authorization code is invalid. निर्दिष्ट प्राधिकरण कोड अमान्य है. - + The specified device code is invalid. निर्दिष्ट डिवाइस कोड अमान्य है. - + The specified refresh token is invalid. निर्दिष्ट ताज़ा टोकन अमान्य है. - + The specified token is invalid. निर्दिष्ट टोकन अमान्य है. - + The specified token is not an authorization code. निर्दिष्ट टोकन एक प्राधिकरण कोड नहीं है. - + The specified token is not an device code. निर्दिष्ट टोकन डिवाइस कोड नहीं है. - + The specified token is not a refresh token. निर्दिष्ट टोकन एक ताज़ा टोकन नहीं है. - + The specified token is not an access token. निर्दिष्ट टोकन एक्सेस टोकन नहीं है. - + The specified identity token is invalid. निर्दिष्ट पहचान टोकन अमान्य है. - + The specified authorization code has already been redeemed. निर्दिष्ट प्राधिकरण कोड पहले ही भुनाया जा चुका है. - + The specified device code has already been redeemed. निर्दिष्ट डिवाइस कोड पहले ही भुनाया जा चुका है. - + The specified refresh token has already been redeemed. निर्दिष्ट ताज़ा टोकन पहले ही भुनाया जा चुका है. - + The specified token has already been redeemed. निर्दिष्ट टोकन को पहले ही भुनाया जा चुका है. - + The authorization has not been granted yet by the end user. अंतिम उपयोगकर्ता द्वारा प्राधिकरण अभी तक प्रदान नहीं किया गया है. - + The authorization was denied by the end user. प्राधिकरण को अंतिम उपयोगकर्ता द्वारा अस्वीकार कर दिया गया था. - + The specified authorization code is no longer valid. निर्दिष्ट प्राधिकरण कोड अब मान्य नहीं है. - + The specified device code is no longer valid. निर्दिष्ट डिवाइस कोड अब मान्य नहीं है. - + The specified refresh token is no longer valid. निर्दिष्ट ताज़ा टोकन अब मान्य नहीं है. - + The specified token is no longer valid. निर्दिष्ट टोकन अब मान्य नहीं है. - + The authorization associated with the authorization code is no longer valid. प्राधिकरण कोड से संबद्ध प्राधिकरण अब मान्य नहीं है. - + The authorization associated with the device code is no longer valid. डिवाइस कोड से संबद्ध प्राधिकरण अब मान्य नहीं है. - + The authorization associated with the refresh token is no longer valid. ताज़ा टोकन से संबद्ध प्राधिकरण अब मान्य नहीं है. - + The authorization associated with the token is no longer valid. टोकन से जुड़ा प्राधिकरण अब मान्य नहीं है. - + The token request was rejected by the authentication server. टोकन अनुरोध प्रमाणीकरण सर्वर द्वारा अस्वीकार कर दिया गया था. - + The user information access demand was rejected by the authentication server. प्रमाणीकरण सर्वर द्वारा उपयोगकर्ता सूचना पहुंच मांग को अस्वीकार कर दिया गया था. - + The specified user code is no longer valid. निर्दिष्ट उपयोगकर्ता कोड अब मान्य नहीं है. - + The '{0}' parameter is not supported. '{0}' पैरामीटर समर्थित नहीं है. - + The mandatory '{0}' parameter is missing. अनिवार्य '{0}' पैरामीटर गायब है. - + The '{0}' parameter must be a valid absolute URL. '{0}' पैरामीटर एक मान्य पूर्ण URL होना चाहिए. - + The '{0}' parameter must not include a fragment. '{0}' पैरामीटर में एक टुकड़ा शामिल नहीं होना चाहिए. - + The specified '{0}' is not supported. निर्दिष्ट '{0}' समर्थित नहीं है. - + The specified '{0}'/'{1}' combination is invalid. निर्दिष्ट '{0}' / '{1}' संयोजन अमान्य है. - + The mandatory '{0}' scope is missing. अनिवार्य '{0}' स्कोप गायब है. - + The '{0}' scope is not allowed. '{0}' स्कोप की अनुमति नहीं है. - + The client identifier cannot be null or empty. क्लाइंट पहचानकर्ता रिक्त या रिक्त नहीं हो सकता. - + The '{0}' parameter cannot be used without '{1}'. '{0}' पैरामीटर का उपयोग '{1}' के बिना नहीं किया जा सकता है. - + The status cannot be null or empty. स्थिति शून्य या रिक्त नहीं हो सकती. - + Scopes cannot be null or empty. स्कोप्स शून्य या रिक्त नहीं हो सकते. - + The '{0}' and '{1}' parameters can only be used with a response type containing '{2}'. '{0}' और '{1}' मापदंडों का उपयोग केवल '{2}' वाले प्रतिक्रिया प्रकार के साथ किया जा सकता है. - + The specified '{0}' is not allowed when using PKCE. PKCE का उपयोग करते समय निर्दिष्ट '{0}' की अनुमति नहीं है. - + Scopes cannot contain spaces. स्कोप में स्थान नहीं हो सकते. - + The specified '{0}' is not valid for this client application. निर्दिष्ट '{0}' इस क्लाइंट एप्लिकेशन के लिए मान्य नहीं है. - + The scope name cannot be null or empty. स्कोप नाम शून्य या रिक्त नहीं हो सकता. - + The scope name cannot contain spaces. स्कोप नाम में रिक्त स्थान नहीं हो सकते. - + This client application is not allowed to use the authorization endpoint. इस क्लाइंट एप्लिकेशन को प्राधिकरण समापन बिंदु का उपयोग करने की अनुमति नहीं है. - + The client application is not allowed to use the authorization code flow. क्लाइंट एप्लिकेशन को प्राधिकरण कोड प्रवाह का उपयोग करने की अनुमति नहीं है. - + The client application is not allowed to use the implicit flow. क्लाइंट एप्लिकेशन को निहित प्रवाह का उपयोग करने की अनुमति नहीं है. - + The client application is not allowed to use the hybrid flow. हाइब्रिड प्रवाह का उपयोग करने के लिए क्लाइंट एप्लिकेशन को अनुमति नहीं है. - + This client application is not allowed to use the specified scope. इस क्लाइंट एप्लिकेशन को निर्दिष्ट दायरे का उपयोग करने की अनुमति नहीं है. - + The specified '{0}' is invalid. निर्दिष्ट '{0}' अमान्य है. - + The '{0}' parameter is not valid for this client application. इस क्लाइंट एप्लिकेशन के लिए '{0}' पैरामीटर मान्य नहीं है. - + The '{0}' parameter required for this client application is missing. इस क्लाइंट एप्लिकेशन के लिए आवश्यक '{0}' पैरामीटर गायब है. - + The specified client credentials are invalid. निर्दिष्ट क्लाइंट क्रेडेंशियल अमान्य हैं. - + This client application is not allowed to use the device endpoint. इस क्लाइंट एप्लिकेशन को डिवाइस एंडपॉइंट का उपयोग करने की अनुमति नहीं है. - + The '{0}' and '{1}' parameters are required when using the client credentials grant. क्लाइंट क्रेडेंशियल्स अनुदान का उपयोग करते समय '{0}' और '{1}' मापदंडों की आवश्यकता होती है. - + The '{0}' parameter is required when using the device code grant. डिवाइस कोड अनुदान का उपयोग करते समय '{0}' पैरामीटर की आवश्यकता होती है. - + The mandatory '{0}' and/or '{1}' parameters are missing. अनिवार्य '{0}' और / या '{1}' पैरामीटर गायब हैं. - + A scope with the same name already exists. समान नाम वाला स्कोप पहले से मौजूद है. - + This client application is not allowed to use the token endpoint. इस क्लाइंट एप्लिकेशन को टोकन समापन बिंदु का उपयोग करने की अनुमति नहीं है. - + This client application is not allowed to use the specified grant type. इस ग्राहक एप्लिकेशन को निर्दिष्ट अनुदान प्रकार का उपयोग करने की अनुमति नहीं है. - + The client application is not allowed to use the '{0}' scope. क्लाइंट एप्लिकेशन को '{0}' स्कोप का उपयोग करने की अनुमति नहीं है. - + The specified authorization code cannot be used without sending a client identifier. क्लाइंट पहचानकर्ता को भेजे बिना निर्दिष्ट प्राधिकरण कोड का उपयोग नहीं किया जा सकता है. - + The specified device code cannot be used without sending a client identifier. क्लाइंट पहचानकर्ता को भेजे बिना निर्दिष्ट डिवाइस कोड का उपयोग नहीं किया जा सकता है. - + The specified refresh token cannot be used without sending a client identifier. निर्दिष्ट ताज़ा टोकन का उपयोग ग्राहक पहचानकर्ता को भेजे बिना नहीं किया जा सकता है. - + The specified authorization code cannot be used by this client application. इस क्लाइंट एप्लिकेशन द्वारा निर्दिष्ट प्राधिकरण कोड का उपयोग नहीं किया जा सकता है. - + The specified device code cannot be used by this client application. इस क्लाइंट एप्लिकेशन द्वारा निर्दिष्ट डिवाइस कोड का उपयोग नहीं किया जा सकता है. - + The specified refresh token cannot be used by this client application. निर्दिष्ट ताज़ा टोकन का उपयोग इस क्लाइंट एप्लिकेशन द्वारा नहीं किया जा सकता है. - + The specified '{0}' parameter doesn't match the client redirection address the authorization code was initially sent to. निर्दिष्ट '{0}' पैरामीटर ग्राहक पुनर्निर्देशन पते से मेल नहीं खाता है जो प्राधिकरण कोड शुरू में भेजा गया था. - + The '{0}' parameter cannot be used when no '{1}' was specified in the authorization request. प्राधिकरण अनुरोध में कोई {{1} 'पैरामीटर का उपयोग नहीं किया जा सकता है. - + The '{0}' parameter is not valid in this context. इस संदर्भ में '{0}' पैरामीटर मान्य नहीं है. - + This client application is not allowed to use the introspection endpoint. इस ग्राहक एप्लिकेशन को आत्मनिरीक्षण समापन बिंदु का उपयोग करने की अनुमति नहीं है. - + The specified token cannot be introspected. निर्दिष्ट टोकन आत्मनिरीक्षण नहीं किया जा सकता है. - + The client application is not allowed to introspect the specified token. क्लाइंट एप्लिकेशन को निर्दिष्ट टोकन का आत्मनिरीक्षण करने की अनुमति नहीं है. - + This client application is not allowed to use the revocation endpoint. इस क्लाइंट एप्लिकेशन को प्रत्यावर्तन समापन बिंदु का उपयोग करने की अनुमति नहीं है. - + This token cannot be revoked. इस टोकन को निरस्त नहीं किया जा सकता है. - + The client application is not allowed to revoke the specified token. क्लाइंट एप्लिकेशन को निर्दिष्ट टोकन को रद्द करने की अनुमति नहीं है. - + The mandatory '{0}' header is missing. अनिवार्य '{0}' शीर्षक गायब है. - + The specified '{0}' header is invalid. निर्दिष्ट '{0}' शीर्षक अमान्य है. - + This server only accepts HTTPS requests. यह सर्वर केवल HTTPS अनुरोध स्वीकार करता है. - + The specified HTTP method is not valid. निर्दिष्ट HTTP विधि मान्य नहीं है. - + A token with the same reference identifier already exists. समान संदर्भ पहचानकर्ता के साथ एक टोकन पहले से मौजूद है. - + The token type cannot be null or empty. टोकन प्रकार शून्य या रिक्त नहीं हो सकता. - + Multiple client credentials cannot be specified. एकाधिक क्लाइंट क्रेडेंशियल निर्दिष्ट नहीं किए जा सकते हैं. - + The issuer associated to the specified token is not valid. निर्दिष्ट टोकन से संबंधित जारीकर्ता मान्य नहीं है. - + The specified token is not of the expected type. निर्दिष्ट टोकन अपेक्षित प्रकार का नहीं है. - + The signing key associated to the specified token was not found. निर्दिष्ट टोकन से संबंधित हस्ताक्षरित कुंजी नहीं मिली. - + The signature associated to the specified token is not valid. निर्दिष्ट टोकन से संबंधित हस्ताक्षर मान्य नहीं है. - + This resource server is currently unavailable. वर्तमान में यह संसाधन सर्वर अनुपलब्ध है. - + The specified token doesn't contain any audience. निर्दिष्ट टोकन में कोई भी श्रोता नहीं है. - + The specified token cannot be used with this resource server. निर्दिष्ट टोकन का उपयोग इस संसाधन सर्वर के साथ नहीं किया जा सकता है. - + The user represented by the token is not allowed to perform the requested action. टोकन द्वारा प्रस्तुत उपयोगकर्ता को अनुरोधित कार्रवाई करने की अनुमति नहीं है. - + No issuer could be found in the server configuration. सर्वर कॉन्फ़िगरेशन में कोई जारीकर्ता नहीं मिला. - + A server configuration containing an invalid issuer was returned. अमान्य जारीकर्ता वाला सर्वर कॉन्फ़िगरेशन वापस कर दिया गया था. - + The issuer returned in the server configuration is not valid. सर्वर कॉन्फ़िगरेशन में जारीकर्ता मान्य नहीं है. - + No JWKS endpoint could be found in the server configuration. सर्वर कॉन्फ़िगरेशन में कोई JWKS समापन बिंदु नहीं मिला. - + A server configuration containing an invalid JWKS endpoint URL was returned. अमान्य JWKS समापन बिंदु URL वाला सर्वर कॉन्फ़िगरेशन लौटाया गया था. - + A server configuration containing an invalid introspection endpoint URL was returned. अमान्य इंट्रॉस्पेशन एंडपॉइंट URL वाले सर्वर कॉन्फ़िगरेशन को लौटा दिया गया था. - + The JWKS document didn't contain a valid '{0}' node with at least one key. JWKS दस्तावेज़ में कम से कम एक कुंजी के साथ एक वैध '{0}' नोड नहीं था. - + A JWKS response containing an unsupported key was returned. एक असमर्थित कुंजी वाली JWKS प्रतिक्रिया लौटा दी गई थी. - + A JWKS response containing an invalid key was returned. अमान्य कुंजी वाली JWKS प्रतिक्रिया लौटा दी गई थी। - + The mandatory '{0}' parameter couldn't be found in the introspection response. आत्मनिरीक्षण प्रतिक्रिया में अनिवार्य '{0}' पैरामीटर नहीं मिला. - + The token was rejected by the remote authentication server. रिमोट प्रमाणीकरण सर्वर द्वारा टोकन को अस्वीकार कर दिया गया था. - + The '{0}' claim is malformed or isn't of the expected type. '{0}' दावा विकृत है या अपेक्षित प्रकार का नहीं है. - + An introspection response containing a malformed issuer was returned. एक विकृत जारीकर्ता युक्त आत्मनिरीक्षण प्रतिक्रिया लौटा दी गई. - + The issuer returned in the introspection response is not valid. जारीकर्ता आत्मनिरीक्षण प्रतिक्रिया में लौटाया गया मान्य नहीं है. - + The type of the introspected token doesn't match the expected type. अंतर्मुखी टोकन का प्रकार अपेक्षित प्रकार से मेल नहीं खाता है. - + An application with the same client identifier already exists. समान क्लाइंट पहचानकर्ता के साथ एक एप्लिकेशन पहले से मौजूद है. - + Only confidential, hybrid or public applications are supported by the default application manager. केवल गोपनीय, हाइब्रिड या सार्वजनिक एप्लिकेशन डिफ़ॉल्ट एप्लिकेशन मैनेजर द्वारा समर्थित हैं. - + The client secret cannot be null or empty for a confidential application. गोपनीय के लिए क्लाइंट रहस्य शून्य या रिक्त नहीं हो सकता. - + A client secret cannot be associated with a public application. एक ग्राहक रहस्य एक सार्वजनिक आवेदन के साथ संबद्ध नहीं किया जा सकता है. - + Callback URLs cannot contain a fragment. कॉलबैक URL में एक टुकड़ा नहीं हो सकता. - + The authorization type cannot be null or empty. प्राधिकरण प्रकार शून्य या रिक्त नहीं हो सकता. - + The specified authorization type is not supported by the default token manager. निर्दिष्ट प्राधिकरण प्रकार डिफ़ॉल्ट टोकन प्रबंधक द्वारा समर्थित नहीं है. - + The client type cannot be null or empty. क्लाइंट प्रकार रिक्त या रिक्त नहीं हो सकता. - + Callback URLs cannot be null or empty. कॉलबैक URL शून्य या रिक्त नहीं हो सकते. - + Callback URLs must be valid absolute URLs. कॉलबैक URL मान्य निरपेक्ष URL होने चाहिए. - + Removes orphaned tokens and authorizations from the database. डेटाबेस से अनाथ टोकन और प्राधिकरणों को निकालता है. - + Starts the scheduled task at regular intervals. नियमित अंतराल पर निर्धारित कार्य शुरू करता है. diff --git a/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.it.xlf b/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.it.xlf index 03fa6dc0..889e80f5 100644 --- a/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.it.xlf +++ b/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.it.xlf @@ -2,597 +2,597 @@ - + The security token is missing. Il token di sicurezza è mancante. - + The specified authorization code is invalid. Il codice di autorizzazione specificato non è valido. - + The specified device code is invalid. Il codice del dispositivo specificato non è valido. - + The specified refresh token is invalid. Il token di aggiornamento specificato non è valido. - + The specified token is invalid. Il token specificato non è valido. - + The specified token is not an authorization code. Il token specificato non è un codice di autorizzazione. - + The specified token is not an device code. Il token specificato non è un codice del dispositivo. - + The specified token is not a refresh token. Il token specificato non è un token di aggiornamento. - + The specified token is not an access token. Il token specificato non è un token di accesso. - + The specified identity token is invalid. Il token di identità specificato non è valido. - + The specified authorization code has already been redeemed. Il codice di autorizzazione specificato è già stato utilizzato. - + The specified device code has already been redeemed. Il codice di dispositivo specificato è già stato utilizzato. - + The specified refresh token has already been redeemed. Il token di aggiornamento specificato è già stato utilizzato. - + The specified token has already been redeemed. Il codice specificato è già stato utilizzato. - + The authorization has not been granted yet by the end user. L'autorizzazione non è ancora stata concessa dall'utente finale. - + The authorization was denied by the end user. L'autorizzazione è stata negata dall'utente finale. - + The specified authorization code is no longer valid. Il codice di autorizzazione specificato non è più valido. - + The specified device code is no longer valid. Il codice del dispositivo specificato non è più valido. - + The specified refresh token is no longer valid. Il token di aggiornamento specificato non è più valido. - + The specified token is no longer valid. Il token specificato non è più valido. - + The authorization associated with the authorization code is no longer valid. L'autorizzazione associata con il codice di autorizzazione non è più valida. - + The authorization associated with the device code is no longer valid. L'autorizzazione associata con il codice del dispositivo non è più valida. - + The authorization associated with the refresh token is no longer valid. L'autorizzazione associata con il token di aggiornamento non è più valida. - + The authorization associated with the token is no longer valid. L'autorizzazione associata con il token non è più valida. - + The token request was rejected by the authentication server. La richiesta del token è stata respinta dal server di autenticazione. - + The user information access demand was rejected by the authentication server. La richiesta di accesso alle informazioni dell'utente è stata rifiutata dal server di autenticazione. - + The specified user code is no longer valid. Il codice utente specificato non è più valido. - + The '{0}' parameter is not supported. Il parametro '{0}' non è supportato. - + The mandatory '{0}' parameter is missing. Manca il parametro obbligatorio '{0}'. - + The '{0}' parameter must be a valid absolute URL. Il parametro '{0}' deve essere un URL assoluto valido. - + The '{0}' parameter must not include a fragment. Il parametro '{0}' non deve includere un frammento di URL. - + The specified '{0}' is not supported. Il '{0}' specificato non è supportato. - + The specified '{0}'/'{1}' combination is invalid. La combinazione '{0}' / '{1}' specificata non è valida. - + The mandatory '{0}' scope is missing. Manca l'ambito obbligatorio '{0}'. - + The '{0}' scope is not allowed. L'ambito '{0}' non è consentito. - + The client identifier cannot be null or empty. L'identificatore del client non può essere nullo o vuoto. - + The '{0}' parameter cannot be used without '{1}'. Il parametro '{0}' non può essere utilizzato senza '{1}'. - + The status cannot be null or empty. Lo stato non può essere nullo o vuoto. - + Scopes cannot be null or empty. Gli ambiti non possono essere nulli o vuoti. - + The '{0}' and '{1}' parameters can only be used with a response type containing '{2}'. I parametri '{0}' e '{1}' possono essere utilizzati solo con un tipo di risposta contenente '{2}'. - + The specified '{0}' is not allowed when using PKCE. Il '{0}' specificato non è consentito quando si utilizza PKCE. - + Scopes cannot contain spaces. Gli ambiti non possono contenere spazi. - + The specified '{0}' is not valid for this client application. Il '{0}' specificato non è valido per questa applicazione client. - + The scope name cannot be null or empty. Il nome dell'ambito non può essere nullo o vuoto. - + The scope name cannot contain spaces. Il nome dell'ambito non può contenere spazi. - + This client application is not allowed to use the authorization endpoint. L'applicazione client non è autorizzata a utilizzare l'endpoint di autorizzazione. - + The client application is not allowed to use the authorization code flow. L'applicazione client non è autorizzata a utilizzare il flusso del codice di autorizzazione. - + The client application is not allowed to use the implicit flow. L'applicazione client non è autorizzata a utilizzare il flusso implicito. - + The client application is not allowed to use the hybrid flow. L'applicazione client non è autorizzata a utilizzare il flusso ibrido. - + This client application is not allowed to use the specified scope. L'applicazione client non è autorizzata a utilizzare l'ambito specificato. - + The specified '{0}' is invalid. Il '{0}' specificato non è valido. - + The '{0}' parameter is not valid for this client application. Il parametro '{0}' non è valido per questa applicazione client. - + The '{0}' parameter required for this client application is missing. Manca il parametro '{0}' richiesto per questa applicazione client. - + The specified client credentials are invalid. Le credenziali client specificate non sono valide. - + This client application is not allowed to use the device endpoint. L'applicazione client non è autorizzata a utilizzare l'endpoint del dispositivo. - + The '{0}' and '{1}' parameters are required when using the client credentials grant. I parametri '{0}' e '{1}' sono obbligatori quando si utilizza la concessione delle credenziali del client. - + The '{0}' parameter is required when using the device code grant. Il parametro '{0}' è obbligatorio quando si utilizza la concessione del codice del dispositivo. - + The mandatory '{0}' and/or '{1}' parameters are missing. Mancano i parametri obbligatori '{0}' e / o '{1}'. - + A scope with the same name already exists. Esiste già un ambito con lo stesso nome. - + This client application is not allowed to use the token endpoint. L'applicazione client non è autorizzata a utilizzare l'endpoint del token. - + This client application is not allowed to use the specified grant type. L'applicazione client non è autorizzata a utilizzare il tipo di concessione specificato. - + The client application is not allowed to use the '{0}' scope. L'applicazione client non può utilizzare l'ambito '{0}'. - + The specified authorization code cannot be used without sending a client identifier. Il codice di autorizzazione specificato non può essere utilizzato senza inviare un identificativo client. - + The specified device code cannot be used without sending a client identifier. Il codice dispositivo specificato non può essere utilizzato senza inviare un identificativo client. - + The specified refresh token cannot be used without sending a client identifier. Il token di aggiornamento specificato non può essere utilizzato senza inviare un identificatore client. - + The specified authorization code cannot be used by this client application. Il codice di autorizzazione specificato non può essere utilizzato da questa applicazione client. - + The specified device code cannot be used by this client application. Il codice del dispositivo specificato non può essere utilizzato da questa applicazione client. - + The specified refresh token cannot be used by this client application. Il token di aggiornamento specificato non può essere utilizzato da questa applicazione client. - + The specified '{0}' parameter doesn't match the client redirection address the authorization code was initially sent to. Il parametro '{0}' specificato non corrisponde all'indirizzo di reindirizzamento del client a cui è stato inizialmente inviato il codice di autorizzazione. - + The '{0}' parameter cannot be used when no '{1}' was specified in the authorization request. Il parametro '{0}' non può essere utilizzato se non è stato specificato alcun '{1}' nella richiesta di autorizzazione. - + The '{0}' parameter is not valid in this context. Il parametro '{0}' non è valido in questo contesto. - + This client application is not allowed to use the introspection endpoint. L'applicazione client non può utilizzare l'endpoint di introspezione. - + The specified token cannot be introspected. Il token specificato non può essere esaminato. - + The client application is not allowed to introspect the specified token. L'applicazione client non è autorizzata a esaminare il token specificato. - + This client application is not allowed to use the revocation endpoint. L'applicazione client non è autorizzata a utilizzare l'endpoint di revoca. - + This token cannot be revoked. Questo token non può essere revocato. - + The client application is not allowed to revoke the specified token. L'applicazione client non è autorizzata a revocare il token specificato. - + The mandatory '{0}' header is missing. Manca l'intestazione '{0}' obbligatoria. - + The specified '{0}' header is invalid. L'intestazione '{0}' specificata non è valida. - + This server only accepts HTTPS requests. Questo server accetta solo richieste HTTPS. - + The specified HTTP method is not valid. Il metodo HTTP specificato non è valido. - + A token with the same reference identifier already exists. Esiste già un token con lo stesso identificatore di riferimento. - + The token type cannot be null or empty. Il tipo di token non può essere nullo o vuoto. - + Multiple client credentials cannot be specified. Non è possibile specificare più credenziali client. - + The issuer associated to the specified token is not valid. L'emittente associato al token specificato non è valido. - + The specified token is not of the expected type. Il token specificato non è del tipo previsto. - + The signing key associated to the specified token was not found. La chiave di firma associata al token specificato non è stata trovata. - + The signature associated to the specified token is not valid. La firma associata al token specificato non è valida. - + This resource server is currently unavailable. Questo server di risorse non è attualmente disponibile. - + The specified token doesn't contain any audience. Il token specificato non contiene alcun pubblico. - + The specified token cannot be used with this resource server. Il token specificato non può essere utilizzato con questo server di risorse. - + The user represented by the token is not allowed to perform the requested action. L'utente rappresentato dal token non è autorizzato a eseguire l'azione richiesta. - + No issuer could be found in the server configuration. Nessun emittente è stato trovato nella configurazione del server. - + A server configuration containing an invalid issuer was returned. È stata restituita una configurazione del server contenente un emittente non valido. - + The issuer returned in the server configuration is not valid. L'emittente restituito nella configurazione del server non è valido. - + No JWKS endpoint could be found in the server configuration. Nessun endpoint JWKS è stato trovato nella configurazione del server. - + A server configuration containing an invalid JWKS endpoint URL was returned. È stata restituita una configurazione server contenente un URL dell'endpoint JWKS non valido. - + A server configuration containing an invalid introspection endpoint URL was returned. È stata restituita una configurazione del server contenente un URL dell'endpoint di introspezione non valido. - + The JWKS document didn't contain a valid '{0}' node with at least one key. Il documento JWKS non conteneva un nodo '{0}' valido con almeno una chiave. - + A JWKS response containing an unsupported key was returned. È stata restituita una risposta JWKS contenente una chiave non supportata. - + A JWKS response containing an invalid key was returned. È stata restituita una risposta JWKS contenente una chiave non valida. - + The mandatory '{0}' parameter couldn't be found in the introspection response. Impossibile trovare il parametro obbligatorio '{0}' nella risposta di introspezione. - + The token was rejected by the remote authentication server. Il token è stato rifiutato dal server di autenticazione remoto. - + The '{0}' claim is malformed or isn't of the expected type. La rivendicazione '{0}' non è valida o non è del tipo previsto. - + An introspection response containing a malformed issuer was returned. È stata restituita una risposta di introspezione contenente un emittente non valido. - + The issuer returned in the introspection response is not valid. L'emittente restituito nella risposta di introspezione non è valido. - + The type of the introspected token doesn't match the expected type. Il tipo di token analizzato non corrisponde al tipo previsto. - + An application with the same client identifier already exists. Esiste già un'applicazione con lo stesso identificatore client. - + Only confidential, hybrid or public applications are supported by the default application manager. Solo le applicazioni riservate, ibride o pubbliche sono supportate dal gestore applicazioni predefinito. - + The client secret cannot be null or empty for a confidential application. Il segreto client non può essere nullo o vuoto per un'applicazione riservata. - + A client secret cannot be associated with a public application. Un segreto client non può essere associato a un'applicazione pubblica. - + Callback URLs cannot contain a fragment. Gli URL di richiamata non possono contenere un frammento. - + The authorization type cannot be null or empty. Il tipo di autorizzazione non può essere nullo o vuoto. - + The specified authorization type is not supported by the default token manager. Il tipo di autorizzazione specificato non è supportato dal gestore di token predefinito. - + The client type cannot be null or empty. Il tipo di client non può essere nullo o vuoto. - + Callback URLs cannot be null or empty. Gli URL di richiamata non possono essere nulli o vuoti. - + Callback URLs must be valid absolute URLs. Gli URL di richiamata devono essere URL assoluti validi. - + Removes orphaned tokens and authorizations from the database. Rimuove i token e le autorizzazioni orfani dal database. - + Starts the scheduled task at regular intervals. Avvia l'attività pianificata a intervalli regolari. diff --git a/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.tr.xlf b/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.tr.xlf index 2901f2c9..c51139c6 100644 --- a/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.tr.xlf +++ b/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.tr.xlf @@ -2,597 +2,597 @@ - + The security token is missing. Güvenlik belirteci eksik. - + The specified authorization code is invalid. Belirtilen yetkilendirme kodu geçersiz. - + The specified device code is invalid. Belirtilen cihaz kodu geçersiz. - + The specified refresh token is invalid. Belirtilen yenileme belirteci geçersiz. - + The specified token is invalid. Geçersiz belirteç. - + The specified token is not an authorization code. Belirteç Yetkilendirme belirteci değil. - + The specified token is not an device code. Belirteç cihaz kodu değil. - + The specified token is not a refresh token. Belirteç yenileme belirteci değil. - + The specified token is not an access token. Belirteç erişim belirteci değil. - + The specified identity token is invalid. Kimlik belirteci geçerli değil. - + The specified authorization code has already been redeemed. Yetkilendirme belirteci daha önce kullanılmış. - + The specified device code has already been redeemed. Cihaz kodu daha önce kullanılmış. - + The specified refresh token has already been redeemed. Yenileme belirteci daha önce kullanılmış. - + The specified token has already been redeemed. Belirteç daha önce kullanılmış. - + The authorization has not been granted yet by the end user. Yetkilendirme son kullanıcı tarafından henüz verilmedi. - + The authorization was denied by the end user. Yetkilendirme son kullanıcı tarafından reddedildi. - + The specified authorization code is no longer valid. Yetkilendirme kodu artık geçerli değil. - + The specified device code is no longer valid. Cihaz kodu artık geçerli değil. - + The specified refresh token is no longer valid. Yenileme belirteci artık geçerli değil. - + The specified token is no longer valid. Belirteç artık geçerli değil. - + The authorization associated with the authorization code is no longer valid. Yetkilendirme ile ilişkili yetkilendirme kodu artık geçerli değil. - + The authorization associated with the device code is no longer valid. Yetkilendirme ile ilişkili cihaz kodu artık geçerli değil. - + The authorization associated with the refresh token is no longer valid. Yenileme belirteci ile ilişkili cihaz kodu artık geçerli değil. - + The authorization associated with the token is no longer valid. Yetkilendirme ile ilişkili belirteç artık geçerli değil. - + The token request was rejected by the authentication server. Belirteç isteği erişim sunucusu tarafından reddedildi. - + The user information access demand was rejected by the authentication server. Kullanıcı bilgisi isteği erişim sunucusu tarafından reddedildi. - + The specified user code is no longer valid. Kullanıcı kodu artık geçerli değil. - + The '{0}' parameter is not supported. '{0}' parametresi desteklenmiyor. - + The mandatory '{0}' parameter is missing. Zorunlu '{0}' parametresi eksik. - + The '{0}' parameter must be a valid absolute URL. '{0}' parametresi geçerli bir mutlak link olmalıdır. - + The '{0}' parameter must not include a fragment. '{0}' parametresi parçe içermemelidir. - + The specified '{0}' is not supported. Belirtilen '{0}' desteklenmemektedir.. - + The specified '{0}'/'{1}' combination is invalid. Belirtilen '{0}'/'{1}' kombinasyonu geçersizdir. - + The mandatory '{0}' scope is missing. Zorunlu '{0}' kapsamı eksik. - + The '{0}' scope is not allowed. '{0}' kapsamına izin verilmemektedir. - + The client identifier cannot be null or empty. İstemci tanımlayıcısı boş veya tanımsız olamaz. - + The '{0}' parameter cannot be used without '{1}'. '{0}' parametresi '{1}' olmadan kullanılamaz. - + The status cannot be null or empty. Durum boş veya tanımsız olamaz. - + Scopes cannot be null or empty. Kapsamlar boş veya tanımsız olamaz. - + The '{0}' and '{1}' parameters can only be used with a response type containing '{2}'. '{0}' ve '{1}' parametreleri ancak '{2}' içeren yanıt tipleri ile kullanılabilir. - + The specified '{0}' is not allowed when using PKCE. Belirtilen '{0}' PKCE ile birlikte kullanılamaz.. - + Scopes cannot contain spaces. Kapsamlar boşluk içeremez. - + The specified '{0}' is not valid for this client application. Belirtilen '{0}' istemci uygulaması için geçerli değil. - + The scope name cannot be null or empty. Kapsam ismi boş veya tanımmsız olamaz. - + The scope name cannot contain spaces. Kapsam ismi boşluk içeremez. - + This client application is not allowed to use the authorization endpoint. Bu istemci uygulamasının yetkilendirme uç birimini kullanmaya izni bulunmamaktadır. - + The client application is not allowed to use the authorization code flow. Bu istemci uygulamasının yetkilendirme kodu akışını kullanmaya izni bulunmamaktadır. - + The client application is not allowed to use the implicit flow. Bu istemci uygulamasının implicit akış kullanmaya izni bulunmamaktadır. - + The client application is not allowed to use the hybrid flow. Bu istemci uygulamasının hibrit akış kullanmaya izni bulunmamaktadır. - + This client application is not allowed to use the specified scope. Bu istemci uygulamasının belirtilen kapsamları kullanmaya izni bulunmamaktadır. - + The specified '{0}' is invalid. Belirtilen '{0}' geçersiz. - + The '{0}' parameter is not valid for this client application. '{0}' parametresi bu istemci uygulaması ile geçerli değil. - + The '{0}' parameter required for this client application is missing. Eksik '{0}' parametresi bu istemci uygulaması için zorunludur. - + The specified client credentials are invalid. İstemci kimlik bilgileri geçersiz. - + This client application is not allowed to use the device endpoint. İstemci uygulamasının cihaz uçbirimini kullanmaya izni bulunmamaktadır. - + The '{0}' and '{1}' parameters are required when using the client credentials grant. '{0}' ve '{1}' parametreleri istemci kimlik bilgileri hakkı kullanıldığında zorunludur. - + The '{0}' parameter is required when using the device code grant. '{0}' parametresi cihaz kodu hakkı kullanıldığında zorunludur. - + The mandatory '{0}' and/or '{1}' parameters are missing. Zorunlu '{0}' ve/veya '{1}' parametreleri eksik. - + A scope with the same name already exists. Aynı isimde bir kapsam bulunmaktadır.. - + This client application is not allowed to use the token endpoint. İstemci uygulamasının belirteç uçbirimini kullanmaya izni bulunmamaktadır. - + This client application is not allowed to use the specified grant type. İstemci uygulamasının belirtilen hak tipini kullanmaya izni bulunmamaktadır. - + The client application is not allowed to use the '{0}' scope. İstemci uygulamasının '{0}' kapsamını kullanmaya izni bulunmamaktadır.. - + The specified authorization code cannot be used without sending a client identifier. Belirtilen yetkilendirme kodu istemci tanımlayıcı yollanmadan kullanılamaz. - + The specified device code cannot be used without sending a client identifier. Belirtilen cihaz kodu istemci tanımlayıcı yollanmadan kullanılamaz. - + The specified refresh token cannot be used without sending a client identifier. Belirtilen yenileme belirteci istemci tanımlayıcı yollanmadan kullanılamaz. - + The specified authorization code cannot be used by this client application. Belirtilen yetkilendirme kodu istemci uygulaması tarafından kullanılamaz. - + The specified device code cannot be used by this client application. Belirtilen cihaz kodu istemci uygulaması tarafından kullanılamaz. - + The specified refresh token cannot be used by this client application. Belirtilen yenileme belirteci istemci uygulaması tarafından kullanılamaz. - + The specified '{0}' parameter doesn't match the client redirection address the authorization code was initially sent to. '{0}' parametresi yetkilendirme kodunun ilk yollandığı istemci yönlendirme adresi ile eşleşmiyor. - + The '{0}' parameter cannot be used when no '{1}' was specified in the authorization request. '{0}' parametresi yetkilendirme isteğinde '{1}' tanımlanmadığında kullanılamaz. - + The '{0}' parameter is not valid in this context. '{0}' parametresi bu bağlamda geçerli değil. - + This client application is not allowed to use the introspection endpoint. İstemci uygulamasının içgözlem uçbirimini kullanmaya izni bulunmamaktadır. - + The specified token cannot be introspected. Belirteç içgözlenemez. - + The client application is not allowed to introspect the specified token. İstemci uygulamasının belirteci içgözlemlemeye izni bulunmamaktadır. - + This client application is not allowed to use the revocation endpoint. İstemci uygulamasının yürürlükten kaldırma uçbirimini kullanmaya izni bulunmamaktadır. - + This token cannot be revoked. Belirteç yürürlükten kaldırılamaz. - + The client application is not allowed to revoke the specified token. İstemci uygulamasının belirteci yürürlükten kaldırmaya izni bulunmamaktadır. - + The mandatory '{0}' header is missing. Zorunlu '{0}' başlığı eksik. - + The specified '{0}' header is invalid. '{0}' başlığı geçersiz. - + This server only accepts HTTPS requests. Bu sunucu sadece HTTPS isteklerini kabul etmektedir. - + The specified HTTP method is not valid. Belirtilen HTTP metodu geçersiz. - + A token with the same reference identifier already exists. Aynı referans tanımlayıcı ile bir belirteç bulunmaktadır. - + The token type cannot be null or empty. Belirteç tipi boş veya tanımsız olamaz. - + Multiple client credentials cannot be specified. Birden çok istemci kimlik bilgisi belirtilemez. - + The issuer associated to the specified token is not valid. Belirteç ile ilişkilendirilen kuruluş geçerli değil. - + The specified token is not of the expected type. Belirteç beklenen tipte değil. - + The signing key associated to the specified token was not found. Belirteç ile ilişkilendirilen imzalama anahtarı bulunamadı. - + The signature associated to the specified token is not valid. Belirteç ile ilişkilendirilen imza geçerli değil. - + This resource server is currently unavailable. Kaynak sunucusu ulaşılabilir değil. - + The specified token doesn't contain any audience. Belirteç izleyici içermemektedir. - + The specified token cannot be used with this resource server. Belirteç bu kaynak sunucusu ile kullanılamaz. - + The user represented by the token is not allowed to perform the requested action. Belirteç ile ilişkilendirilen kullanıcının talep edilen işlemi gerçekleştirmeye izni bulunmamaktadır. - + No issuer could be found in the server configuration. Sunucu yapılandırmasında kuruluş bulunamadı. - + A server configuration containing an invalid issuer was returned. Geçersiz bir kuruluş içeren sunucu yapılandırması yanıtı döndü. - + The issuer returned in the server configuration is not valid. Sunucu yapılandırmasında döndürülen kuruluş yanıtı geçerli değil. - + No JWKS endpoint could be found in the server configuration. Sunucu yapılandırmasında JWKS uçbirimi bulunamadı. - + A server configuration containing an invalid JWKS endpoint URL was returned. Geçersiz JWKS uçbirimi adresi içeren sunucu yapılandırması yanıtı döndü. - + A server configuration containing an invalid introspection endpoint URL was returned. Geçersiz içgözlem uçbirimi adresi adresi içeren sunucu yapılandırması yanıtı döndü. - + The JWKS document didn't contain a valid '{0}' node with at least one key. JWKS dokümanı en az bir anahtarı olan geçerli bir '{0}' ucu içermemektedir. - + A JWKS response containing an unsupported key was returned. Desteklenmeyen bir anahtar içeren bir JWKS yanıtı döndü. - + A JWKS response containing an invalid key was returned. Geçersiz anahtar içeren bir JWKS yanıtı döndü. - + The mandatory '{0}' parameter couldn't be found in the introspection response. Zorunlu '{0}' parametresi içgözlem yanıtında bulunamadı. - + The token was rejected by the remote authentication server. Belirteç uzak erişim sunucusu tarafından reddedildi. - + The '{0}' claim is malformed or isn't of the expected type. '{0}' hakkı kusurlu veya beklenen tipte değil. - + An introspection response containing a malformed issuer was returned. Kusurlu kuruluş içeren bir içgözlem yanıtı döndü. - + The issuer returned in the introspection response is not valid. İçgözlem yanıtında dönen kuruluş geçerli değil. - + The type of the introspected token doesn't match the expected type. İçgözlenen belirteç tipi beklenen tipte değil. - + An application with the same client identifier already exists. Aynı istemci belirteci ile başka bir uygulama bulunmaktadır. - + Only confidential, hybrid or public applications are supported by the default application manager. Varsayılan uygulama yöneticisi tarafından sadece gizli, hibrit ve umumi uygulamalar desteklenmektedir. - + The client secret cannot be null or empty for a confidential application. Gizli uygulama için istemci gizli anahtarı boş veya tanımsız olamaz. - + A client secret cannot be associated with a public application. Umumi uygulama gizli anahtar ile ilişkilendirilemez. - + Callback URLs cannot contain a fragment. Geri çağırma adresi parça içeremez. - + The authorization type cannot be null or empty. Yetkilendirme tipi boş veya tanımsız olamaz. - + The specified authorization type is not supported by the default token manager. Yetkilendirme tipi varsayılan belirteç yöneticisi tarafından desteklenmemektedir. - + The client type cannot be null or empty. İstemci tipi boş veya tanımsız olamaz. - + Callback URLs cannot be null or empty. Geri çağırma adresi boş veya tanımsız olamaz.. - + Callback URLs must be valid absolute URLs. Geri çağırma adresi mutlak ve geçerli bir adres olmalıdır. - + Removes orphaned tokens and authorizations from the database. Yetim belirteç ve yetkilendirmeleri veritabanından kaldırır. - + Starts the scheduled task at regular intervals. Zamanlanmış görevi düzenli aralıklarda başlatır. diff --git a/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.zh-Hans.xlf b/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.zh-Hans.xlf index 1a25ec8d..cf1593f1 100644 --- a/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.zh-Hans.xlf +++ b/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.zh-Hans.xlf @@ -2,597 +2,597 @@ - + The security token is missing. 缺少安全令牌. - + The specified authorization code is invalid. 指定的授权码无效. - + The specified device code is invalid. 指定的设备码无效. - + The specified refresh token is invalid. 指定的刷新令牌无效. - + The specified token is invalid. 指定的令牌无效. - + The specified token is not an authorization code. 指定的令牌不是授权码. - + The specified token is not an device code. 指定的令牌不是设备码. - + The specified token is not a refresh token. 指定的令牌不是刷新令牌. - + The specified token is not an access token. 指定的令牌不是访问令牌. - + The specified identity token is invalid. 指定的身份令牌无效. - + The specified authorization code has already been redeemed. 指定的授权码已兑换. - + The specified device code has already been redeemed. 指定的设备码已兑换. - + The specified refresh token has already been redeemed. 指定的刷新令牌已兑换. - + The specified token has already been redeemed. 指定的令牌已兑换. - + The authorization has not been granted yet by the end user. 最终用户尚未授权. - + The authorization was denied by the end user. 最终用户拒绝授权. - + The specified authorization code is no longer valid. 指定的授权码不再有效. - + The specified device code is no longer valid. 指定的设备码不再有效. - + The specified refresh token is no longer valid. 指定的刷新令牌不再有效. - + The specified token is no longer valid. 指定的令牌不再有效. - + The authorization associated with the authorization code is no longer valid. 与授权码关联的授权不再有效. - + The authorization associated with the device code is no longer valid. 与设备码关联的授权不再有效. - + The authorization associated with the refresh token is no longer valid. 与刷新令牌关联的授权不再有效. - + The authorization associated with the token is no longer valid. 与令牌关联的授权不再有效. - + The token request was rejected by the authentication server. 身份验证服务器拒绝了令牌请求. - + The user information access demand was rejected by the authentication server. 身份验证服务器拒绝了用户信息访问请求. - + The specified user code is no longer valid. 指定的用户码不再有效. - + The '{0}' parameter is not supported. 不支持参数 ‘{0}’. - + The mandatory '{0}' parameter is missing. 缺少必需参数 ‘{0}’. - + The '{0}' parameter must be a valid absolute URL. 参数 ’{0}’ 必须是有效的绝对路径网址. - + The '{0}' parameter must not include a fragment. 参数 ‘{0}’ 不能包含 fragment. - + The specified '{0}' is not supported. 不支持指定的 ‘{0}’. - + The specified '{0}'/'{1}' combination is invalid. 指定的 ‘{0}’ / ‘{1}’ 组合无效. - + The mandatory '{0}' scope is missing. 缺少必需 Scope ‘{0}’. - + The '{0}' scope is not allowed. 不允许 Scope ‘{0}’. - + The client identifier cannot be null or empty. 客户端 ID 不能为空. - + The '{0}' parameter cannot be used without '{1}'. 参数 ‘{0}’ 要求 ‘{1}’. - + The status cannot be null or empty. 状态不能为空. - + Scopes cannot be null or empty. Scope 不能为空. - + The '{0}' and '{1}' parameters can only be used with a response type containing '{2}'. 参数 ‘{0}’ 和 ‘{1}’ 只能在响应类型包含 ‘{2}’ 时使用. - + The specified '{0}' is not allowed when using PKCE. 使用 PKCE 时不允许指定的 ‘{0}’. - + Scopes cannot contain spaces. Scope 不能包含空格. - + The specified '{0}' is not valid for this client application. 指定的 ‘{0}’ 对此客户端无效. - + The scope name cannot be null or empty. Scope 不能为空. - + The scope name cannot contain spaces. Scope 不能包含空格. - + This client application is not allowed to use the authorization endpoint. 不允许此客户端使用授权端点. - + The client application is not allowed to use the authorization code flow. 不允许此客户端使用授权代码流程. - + The client application is not allowed to use the implicit flow. 不允许此客户端使用隐式流程. - + The client application is not allowed to use the hybrid flow. 不允许此客户端使用混合流程. - + This client application is not allowed to use the specified scope. 不允许此客户端使用指定的 Scope. - + The specified '{0}' is invalid. 指定的 ‘{0}’ 无效. - + The '{0}' parameter is not valid for this client application. 参数 ‘{0}’ 对此客户端无效. - + The '{0}' parameter required for this client application is missing. 未提供此客户端必需参数 ‘{0}’. - + The specified client credentials are invalid. 指定的客户端凭据无效. - + This client application is not allowed to use the device endpoint. 不允许此客户端使用设备端点. - + The '{0}' and '{1}' parameters are required when using the client credentials grant. 使用客户端凭据授权时, 必须提供参数 ‘{0}’ 和 ‘{1}’. - + The '{0}' parameter is required when using the device code grant. 使用设备码授权时, 必须提供参数 ‘{0}’. - + The mandatory '{0}' and/or '{1}' parameters are missing. 未提供必需参数 ‘{0}’ 和/或 ‘{1}’. - + A scope with the same name already exists. 已存在具有相同名称的 Scope. - + This client application is not allowed to use the token endpoint. 不允许此客户端使用令牌端点. - + This client application is not allowed to use the specified grant type. 不允许此客户端使用指定的授予类型. - + The client application is not allowed to use the '{0}' scope. 不允许此客户端使用 Scope ‘{0}’. - + The specified authorization code cannot be used without sending a client identifier. 若不发送客户端 ID, 则不能使用指定的授权码. - + The specified device code cannot be used without sending a client identifier. 若不发送客户端 ID, 则不能使用指定的设备码. - + The specified refresh token cannot be used without sending a client identifier. 若不发送客户端 ID, 则不能使用指定的刷新令牌. - + The specified authorization code cannot be used by this client application. 此客户端不能使用指定的授权码. - + The specified device code cannot be used by this client application. 此客户端不能使用指定的设备码. - + The specified refresh token cannot be used by this client application. 此客户端不能使用指定的刷新令牌. - + The specified '{0}' parameter doesn't match the client redirection address the authorization code was initially sent to. 指定的参数 ‘{0}’ 与最初发送的客户端重定向地址不匹配. - + The '{0}' parameter cannot be used when no '{1}' was specified in the authorization request. 若授权请求中未指定 ‘{1}’, 则不能使用指定的参数 ‘{0}’. - + The '{0}' parameter is not valid in this context. 参数 ‘{0}’ 在此上下文中无效. - + This client application is not allowed to use the introspection endpoint. 不允许此客户端使用自省端点. - + The specified token cannot be introspected. 指定的令牌不能自省. - + The client application is not allowed to introspect the specified token. 不允许此客户端自省指定的令牌. - + This client application is not allowed to use the revocation endpoint. 此客户端不允许使用吊销端点. - + This token cannot be revoked. 无法吊销此令牌. - + The client application is not allowed to revoke the specified token. 不允许此客户端吊销指定的令牌. - + The mandatory '{0}' header is missing. 缺少必需标头 ‘{0}’. - + The specified '{0}' header is invalid. 指定的标头 ’{0}’ 无效. - + This server only accepts HTTPS requests. 此服务器仅接受 HTTPS 请求. - + The specified HTTP method is not valid. 指定的 HTTP 方法无效. - + A token with the same reference identifier already exists. 已存在具有相同引用 ID 的令牌. - + The token type cannot be null or empty. 令牌类型不能为空. - + Multiple client credentials cannot be specified. 无法指定多个客户端凭据. - + The issuer associated to the specified token is not valid. 与指定令牌关联的颁发者无效. - + The specified token is not of the expected type. 指定的令牌不是预期类型. - + The signing key associated to the specified token was not found. 未找到与指定令牌关联的签名密钥. - + The signature associated to the specified token is not valid. 与指定令牌关联的签名无效. - + This resource server is currently unavailable. 此资源服务器当前不可用. - + The specified token doesn't contain any audience. 指定的令牌不包含任何目标受众. - + The specified token cannot be used with this resource server. 指定的令牌不能用于此资源服务器. - + The user represented by the token is not allowed to perform the requested action. 不允许此令牌代表的用户执行请求的操作. - + No issuer could be found in the server configuration. 在服务器配置中找不到颁发者. - + A server configuration containing an invalid issuer was returned. 返回了包含无效颁发者的服务器配置. - + The issuer returned in the server configuration is not valid. 服务器配置中返回的颁发者无效. - + No JWKS endpoint could be found in the server configuration. 在服务器配置中找不到 JWKS 端点. - + A server configuration containing an invalid JWKS endpoint URL was returned. 返回了包含无效 JWKS 端点的服务器配置. - + A server configuration containing an invalid introspection endpoint URL was returned. 返回了包含无效自省端点的服务器配置. - + The JWKS document didn't contain a valid '{0}' node with at least one key. JWKS 文档中没有 ‘{0}’ 节点. - + A JWKS response containing an unsupported key was returned. 返回了包含不受支持的密钥的 JWKS 响应. - + A JWKS response containing an invalid key was returned. 返回了包含无效密钥的 JWKS 响应. - + The mandatory '{0}' parameter couldn't be found in the introspection response. 自省响应中找不到必需参数 ‘{0}’. - + The token was rejected by the remote authentication server. 令牌被远程身份验证服务器拒绝. - + The '{0}' claim is malformed or isn't of the expected type. Claim ‘{0}’ 格式错误或不是预期类型. - + An introspection response containing a malformed issuer was returned. 返回了包含错误格式颁发者的自省响应. - + The issuer returned in the introspection response is not valid. 自省响应返回的颁发者无效. - + The type of the introspected token doesn't match the expected type. 自省令牌的类型与预期类型不匹配. - + An application with the same client identifier already exists. 已存在具有相同客户端 ID 的应用程序. - + Only confidential, hybrid or public applications are supported by the default application manager. 默认应用程序管理器仅支持机密、混合或公共应用程序. - + The client secret cannot be null or empty for a confidential application. 对于机密应用程序, 客户端密钥不能为空. - + A client secret cannot be associated with a public application. 客户端密钥不能与公共应用程序关联. - + Callback URLs cannot contain a fragment. 回调网址不能包含 fragment. - + The authorization type cannot be null or empty. 授权类型不能为空. - + The specified authorization type is not supported by the default token manager. 默认令牌管理器不支持指定的授权类型. - + The client type cannot be null or empty. 客户端类型不能为空. - + Callback URLs cannot be null or empty. 回调网址不能为空. - + Callback URLs must be valid absolute URLs. 回调网址必须是有效的绝对路径网址. - + Removes orphaned tokens and authorizations from the database. 从数据库中删除孤立的令牌和授权. - + Starts the scheduled task at regular intervals. 定期启动计划的任务. diff --git a/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.zh-Hant.xlf b/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.zh-Hant.xlf index 1a5997d4..0a2d615e 100644 --- a/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.zh-Hant.xlf +++ b/src/OpenIddict.Abstractions/Resources/xlf/OpenIddictResources.zh-Hant.xlf @@ -2,597 +2,597 @@ - + The security token is missing. 缺少安全權杖. - + The specified authorization code is invalid. 指定的授權代碼無效. - + The specified device code is invalid. 指定的裝置代碼無效. - + The specified refresh token is invalid. 指定的重新整理權杖無效. - + The specified token is invalid. 指定的權杖无效. - + The specified token is not an authorization code. 指定的權杖不是授權代碼. - + The specified token is not an device code. 指定的權杖不是裝置代碼. - + The specified token is not a refresh token. 指定的權杖不是重新整理權杖. - + The specified token is not an access token. 指定的權杖不是存取權杖. - + The specified identity token is invalid. 指定的識別碼權杖無效. - + The specified authorization code has already been redeemed. 指定的授權代碼已兌換. - + The specified device code has already been redeemed. 指定的设备代碼已兌換. - + The specified refresh token has already been redeemed. 指定的重新整理權杖已兌換. - + The specified token has already been redeemed. 指定的權杖已兌換. - + The authorization has not been granted yet by the end user. 使用者尚未批准授權. - + The authorization was denied by the end user. 使用者拒絕授權. - + The specified authorization code is no longer valid. 指定的授權代碼不再有效. - + The specified device code is no longer valid. 指定的裝置代碼不再有效. - + The specified refresh token is no longer valid. 指定的重新整理權杖不再有效. - + The specified token is no longer valid. 指定的權杖不再有效. - + The authorization associated with the authorization code is no longer valid. 與授權代碼關聯的授權不再有效. - + The authorization associated with the device code is no longer valid. 與裝置代碼關聯的授權不再有效. - + The authorization associated with the refresh token is no longer valid. 與重新整理權杖關聯的授權不再有效. - + The authorization associated with the token is no longer valid. 與權杖關聯的授權不再有效. - + The token request was rejected by the authentication server. 身份驗證伺服器拒絕了權杖請求. - + The user information access demand was rejected by the authentication server. 身份驗證伺服器拒絕了使用者資訊存取請求. - + The specified user code is no longer valid. 指定的使用者代碼不再有效. - + The '{0}' parameter is not supported. 不支援引數 ‘{0}’. - + The mandatory '{0}' parameter is missing. 缺少必要引數 ‘{0}’. - + The '{0}' parameter must be a valid absolute URL. 引數 ’{0}’ 必須是有效的絕對路徑網址. - + The '{0}' parameter must not include a fragment. 引數 ‘{0}’ 不能包含 fragment. - + The specified '{0}' is not supported. 不支援指定的 ‘{0}’. - + The specified '{0}'/'{1}' combination is invalid. 指定的 ‘{0}’ / ‘{1}’ 組合無效. - + The mandatory '{0}' scope is missing. 缺少必要 Scope ‘{0}’. - + The '{0}' scope is not allowed. 不允許 Scope ‘{0}’. - + The client identifier cannot be null or empty. 消費者金鑰不能為空. - + The '{0}' parameter cannot be used without '{1}'. 引數 ‘{0}’ 要求 ‘{1}’. - + The status cannot be null or empty. 狀態不能為空. - + Scopes cannot be null or empty. Scope 不能為空. - + The '{0}' and '{1}' parameters can only be used with a response type containing '{2}'. 引數 ‘{0}’ 和 ‘{1}’ 只能在響應型別包含 ‘{2}’ 時使用. - + The specified '{0}' is not allowed when using PKCE. 使用 PKCE 時不允許指定的 ‘{0}’. - + Scopes cannot contain spaces. Scope 不能包含空格. - + The specified '{0}' is not valid for this client application. 指定的 ‘{0}’ 對此連線應用程式無效. - + The scope name cannot be null or empty. Scope 不能為空. - + The scope name cannot contain spaces. Scope 不能包含空格. - + This client application is not allowed to use the authorization endpoint. 不允許此連線應用程式使用授權端點. - + The client application is not allowed to use the authorization code flow. 不允許此連線應用程式使用授權代碼流程. - + The client application is not allowed to use the implicit flow. 不允許此連線應用程式使用隱式流程. - + The client application is not allowed to use the hybrid flow. 不允許此連線應用程式使用混合流程. - + This client application is not allowed to use the specified scope. 不允許此連線應用程式使用指定的 Scope. - + The specified '{0}' is invalid. 指定的 ‘{0}’ 無效. - + The '{0}' parameter is not valid for this client application. 引數 ‘{0}’ 對此連線應用程式無效. - + The '{0}' parameter required for this client application is missing. 未提供此連線應用程式必要引數 ‘{0}’. - + The specified client credentials are invalid. 指定的連線應用程式機密無效. - + This client application is not allowed to use the device endpoint. 不允許此連線應用程式使用裝置端點. - + The '{0}' and '{1}' parameters are required when using the client credentials grant. 使用連線應用程式機密授權時, 必須提供引數 ‘{0}’ 和 ‘{1}’. - + The '{0}' parameter is required when using the device code grant. 使用裝置代碼授權時, 必須提供引數 ‘{0}’. - + The mandatory '{0}' and/or '{1}' parameters are missing. 未提供必要引數 ‘{0}’ 和/或 ‘{1}’. - + A scope with the same name already exists. 已存在具有相同名稱的 Scope. - + This client application is not allowed to use the token endpoint. 不允許此連線應用程式使用權杖端點. - + This client application is not allowed to use the specified grant type. 不允許此連線應用程式使用指定的驗證類型. - + The client application is not allowed to use the '{0}' scope. 不允許此連線應用程式使用 Scope ‘{0}’. - + The specified authorization code cannot be used without sending a client identifier. 若不傳送連線應用程式 ID, 則不能使用指定的授權代碼. - + The specified device code cannot be used without sending a client identifier. 若不傳送連線應用程式 ID, 則不能使用指定的裝置代碼. - + The specified refresh token cannot be used without sending a client identifier. 若不傳送連線應用程式 ID, 則不能使用指定的重新整理權杖. - + The specified authorization code cannot be used by this client application. 此連線應用程式不能使用指定的授權代碼. - + The specified device code cannot be used by this client application. 此連線應用程式不能使用指定的裝置代碼. - + The specified refresh token cannot be used by this client application. 此連線應用程式不能使用指定的重新整理權杖. - + The specified '{0}' parameter doesn't match the client redirection address the authorization code was initially sent to. 指定的引數 ‘{0}’ 與最初發送的連線應用程式重新導向位址不匹配. - + The '{0}' parameter cannot be used when no '{1}' was specified in the authorization request. 若授權請求中未指定 ‘{1}’, 則不能使用指定的引數 ‘{0}’. - + The '{0}' parameter is not valid in this context. 引數 ‘{0}’ 在此語境中無效. - + This client application is not allowed to use the introspection endpoint. 不允許此連線應用程式使用自省端點. - + The specified token cannot be introspected. 指定的權杖不能自省. - + The client application is not allowed to introspect the specified token. 不允許此連線應用程式自省指定的權杖. - + This client application is not allowed to use the revocation endpoint. 此連線應用程式不允許使用吊銷端點. - + This token cannot be revoked. 無法吊銷此權杖. - + The client application is not allowed to revoke the specified token. 不允許此連線應用程式吊銷指定的權杖. - + The mandatory '{0}' header is missing. 缺少必要標頭 ‘{0}’. - + The specified '{0}' header is invalid. 指定的標頭 ’{0}’ 無效. - + This server only accepts HTTPS requests. 此伺服器僅接受 HTTPS 請求. - + The specified HTTP method is not valid. 指定的 HTTP 方法無效. - + A token with the same reference identifier already exists. 已存在具有相同引用 ID 的權杖. - + The token type cannot be null or empty. 權杖型別不能為空. - + Multiple client credentials cannot be specified. 無法指定多個連線應用程式機密. - + The issuer associated to the specified token is not valid. 與指定權杖關聯的頒發者無效. - + The specified token is not of the expected type. 指定的權杖不是預期型別. - + The signing key associated to the specified token was not found. 未找到與指定權杖關聯的簽名金鑰. - + The signature associated to the specified token is not valid. 與指定權杖關聯的簽名無效. - + This resource server is currently unavailable. 此資源伺服器當前不可用. - + The specified token doesn't contain any audience. 指定的權杖不包含任何目標受眾. - + The specified token cannot be used with this resource server. 指定的權杖不能用於此資源伺服器. - + The user represented by the token is not allowed to perform the requested action. 不允許此權杖代表的使用者執行請求的操作. - + No issuer could be found in the server configuration. 在伺服器配置中找不到頒發者. - + A server configuration containing an invalid issuer was returned. 返回了包含無效頒發者的伺服器配置. - + The issuer returned in the server configuration is not valid. 伺服器配置中返回的頒發者無效. - + No JWKS endpoint could be found in the server configuration. 在伺服器配置中找不到 JWKS 端點. - + A server configuration containing an invalid JWKS endpoint URL was returned. 返回了包含無效 JWKS 端點的伺服器配置. - + A server configuration containing an invalid introspection endpoint URL was returned. 返回了包含無效自省端點的伺服器配置. - + The JWKS document didn't contain a valid '{0}' node with at least one key. JWKS 文件中沒有 ‘{0}’ 節點. - + A JWKS response containing an unsupported key was returned. 返回了包含不受支援的金鑰的 JWKS 響應. - + A JWKS response containing an invalid key was returned. 返回了包含無效金鑰的 JWKS 響應. - + The mandatory '{0}' parameter couldn't be found in the introspection response. 自省響應中找不到必要引數 ‘{0}’. - + The token was rejected by the remote authentication server. 權杖被遠端身份驗證伺服器拒絕. - + The '{0}' claim is malformed or isn't of the expected type. Claim ‘{0}’ 格式錯誤或不是預期型別. - + An introspection response containing a malformed issuer was returned. 返回了包含錯誤格式頒發者的自省響應. - + The issuer returned in the introspection response is not valid. 自省響應返回的頒發者無效. - + The type of the introspected token doesn't match the expected type. 自省權杖的型別與預期型別不匹配. - + An application with the same client identifier already exists. 已存在具有相同消費者金鑰的應用程式. - + Only confidential, hybrid or public applications are supported by the default application manager. 預設應用程式管理器僅支援機密、混合或公共應用程式. - + The client secret cannot be null or empty for a confidential application. 對於機密應用程式, 連線應用程式金鑰不能為空. - + A client secret cannot be associated with a public application. 連線應用程式金鑰不能與公共應用程式關聯. - + Callback URLs cannot contain a fragment. 重新導向位址不能包含 fragment. - + The authorization type cannot be null or empty. 授權型別不能為空. - + The specified authorization type is not supported by the default token manager. 預設權杖管理器不支援指定的授權型別. - + The client type cannot be null or empty. 連線應用程式型別不能為空. - + Callback URLs cannot be null or empty. 重新導向位址不能為空. - + Callback URLs must be valid absolute URLs. 重新導向位址必須是有效的絕對路徑網址. - + Removes orphaned tokens and authorizations from the database. 從資料庫中刪除孤立的權杖和授權. - + Starts the scheduled task at regular intervals. 定期啟動計劃的任務. diff --git a/src/OpenIddict.Core/Caches/OpenIddictApplicationCache.cs b/src/OpenIddict.Core/Caches/OpenIddictApplicationCache.cs index 07488040..fd1f8cb1 100644 --- a/src/OpenIddict.Core/Caches/OpenIddictApplicationCache.cs +++ b/src/OpenIddict.Core/Caches/OpenIddictApplicationCache.cs @@ -109,7 +109,7 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } var parameters = new @@ -143,7 +143,7 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } var parameters = new @@ -177,7 +177,7 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(address)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1142), nameof(address)); + throw new ArgumentException(SR.GetResourceString(SR.ID0143), nameof(address)); } return ExecuteAsync(cancellationToken); @@ -218,7 +218,7 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(address)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1142), nameof(address)); + throw new ArgumentException(SR.GetResourceString(SR.ID0143), nameof(address)); } return ExecuteAsync(cancellationToken); @@ -265,7 +265,7 @@ namespace OpenIddict.Core var identifier = await _store.GetIdAsync(application, cancellationToken); if (string.IsNullOrEmpty(identifier)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1195)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0196)); } if (_signals.TryRemove(identifier, out CancellationTokenSource? signal)) @@ -296,7 +296,7 @@ namespace OpenIddict.Core var signal = await CreateExpirationSignalAsync(application, cancellationToken); if (signal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1196)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0197)); } entry.AddExpirationToken(signal); @@ -328,7 +328,7 @@ namespace OpenIddict.Core var signal = await CreateExpirationSignalAsync(application, cancellationToken); if (signal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1196)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0197)); } entry.AddExpirationToken(signal); @@ -359,7 +359,7 @@ namespace OpenIddict.Core var identifier = await _store.GetIdAsync(application, cancellationToken); if (string.IsNullOrEmpty(identifier)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1195)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0196)); } var signal = _signals.GetOrAdd(identifier, _ => new CancellationTokenSource()); diff --git a/src/OpenIddict.Core/Caches/OpenIddictAuthorizationCache.cs b/src/OpenIddict.Core/Caches/OpenIddictAuthorizationCache.cs index 8b2113ab..8341d3d7 100644 --- a/src/OpenIddict.Core/Caches/OpenIddictAuthorizationCache.cs +++ b/src/OpenIddict.Core/Caches/OpenIddictAuthorizationCache.cs @@ -115,12 +115,12 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } return ExecuteAsync(cancellationToken); @@ -164,17 +164,17 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } if (string.IsNullOrEmpty(status)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1198), nameof(status)); + throw new ArgumentException(SR.GetResourceString(SR.ID0199), nameof(status)); } return ExecuteAsync(cancellationToken); @@ -219,22 +219,22 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } if (string.IsNullOrEmpty(status)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1198), nameof(status)); + throw new ArgumentException(SR.GetResourceString(SR.ID0199), nameof(status)); } if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1199), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0200), nameof(type)); } return ExecuteAsync(cancellationToken); @@ -281,22 +281,22 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } if (string.IsNullOrEmpty(status)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1198), nameof(status)); + throw new ArgumentException(SR.GetResourceString(SR.ID0199), nameof(status)); } if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1199), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0200), nameof(type)); } // Note: this method is only partially cached. @@ -319,7 +319,7 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } return ExecuteAsync(cancellationToken); @@ -360,7 +360,7 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } var parameters = new @@ -394,7 +394,7 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } return ExecuteAsync(cancellationToken); @@ -441,7 +441,7 @@ namespace OpenIddict.Core var identifier = await _store.GetIdAsync(authorization, cancellationToken); if (string.IsNullOrEmpty(identifier)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1195)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0196)); } if (_signals.TryRemove(identifier, out CancellationTokenSource? signal)) @@ -472,7 +472,7 @@ namespace OpenIddict.Core var signal = await CreateExpirationSignalAsync(authorization, cancellationToken); if (signal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1196)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0197)); } entry.AddExpirationToken(signal); @@ -504,7 +504,7 @@ namespace OpenIddict.Core var signal = await CreateExpirationSignalAsync(authorization, cancellationToken); if (signal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1196)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0197)); } entry.AddExpirationToken(signal); @@ -535,7 +535,7 @@ namespace OpenIddict.Core var identifier = await _store.GetIdAsync(authorization, cancellationToken); if (string.IsNullOrEmpty(identifier)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1200)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0201)); } var signal = _signals.GetOrAdd(identifier, _ => new CancellationTokenSource()); diff --git a/src/OpenIddict.Core/Caches/OpenIddictScopeCache.cs b/src/OpenIddict.Core/Caches/OpenIddictScopeCache.cs index b583a162..ff9c9a1b 100644 --- a/src/OpenIddict.Core/Caches/OpenIddictScopeCache.cs +++ b/src/OpenIddict.Core/Caches/OpenIddictScopeCache.cs @@ -101,7 +101,7 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } var parameters = new @@ -135,7 +135,7 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(name)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1201), nameof(name)); + throw new ArgumentException(SR.GetResourceString(SR.ID0202), nameof(name)); } var parameters = new @@ -169,7 +169,7 @@ namespace OpenIddict.Core { if (names.Any(name => string.IsNullOrEmpty(name))) { - throw new ArgumentException(SR.GetResourceString(SR.ID1202), nameof(names)); + throw new ArgumentException(SR.GetResourceString(SR.ID0203), nameof(names)); } // Note: this method is only partially cached. @@ -192,7 +192,7 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(resource)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1061), nameof(resource)); + throw new ArgumentException(SR.GetResourceString(SR.ID0062), nameof(resource)); } return ExecuteAsync(cancellationToken); @@ -239,7 +239,7 @@ namespace OpenIddict.Core var identifier = await _store.GetIdAsync(scope, cancellationToken); if (string.IsNullOrEmpty(identifier)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1195)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0196)); } if (_signals.TryRemove(identifier, out CancellationTokenSource? signal)) @@ -270,7 +270,7 @@ namespace OpenIddict.Core var signal = await CreateExpirationSignalAsync(scope, cancellationToken); if (signal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1196)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0197)); } entry.AddExpirationToken(signal); @@ -302,7 +302,7 @@ namespace OpenIddict.Core var signal = await CreateExpirationSignalAsync(scope, cancellationToken); if (signal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1196)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0197)); } entry.AddExpirationToken(signal); @@ -332,7 +332,7 @@ namespace OpenIddict.Core var identifier = await _store.GetIdAsync(scope, cancellationToken); if (string.IsNullOrEmpty(identifier)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1203)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0204)); } var signal = _signals.GetOrAdd(identifier, _ => new CancellationTokenSource()); diff --git a/src/OpenIddict.Core/Caches/OpenIddictTokenCache.cs b/src/OpenIddict.Core/Caches/OpenIddictTokenCache.cs index 349bba43..e33a6010 100644 --- a/src/OpenIddict.Core/Caches/OpenIddictTokenCache.cs +++ b/src/OpenIddict.Core/Caches/OpenIddictTokenCache.cs @@ -133,12 +133,12 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } return ExecuteAsync(cancellationToken); @@ -182,17 +182,17 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } if (string.IsNullOrEmpty(status)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1198), nameof(status)); + throw new ArgumentException(SR.GetResourceString(SR.ID0199), nameof(status)); } return ExecuteAsync(cancellationToken); @@ -237,22 +237,22 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } if (string.IsNullOrEmpty(status)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1198), nameof(status)); + throw new ArgumentException(SR.GetResourceString(SR.ID0199), nameof(status)); } if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1199), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0200), nameof(type)); } return ExecuteAsync(cancellationToken); @@ -296,7 +296,7 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } return ExecuteAsync(cancellationToken); @@ -337,7 +337,7 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } return ExecuteAsync(cancellationToken); @@ -378,7 +378,7 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } var parameters = new @@ -412,7 +412,7 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } var parameters = new @@ -446,7 +446,7 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } return ExecuteAsync(cancellationToken); @@ -493,7 +493,7 @@ namespace OpenIddict.Core var identifier = await _store.GetIdAsync(token, cancellationToken); if (string.IsNullOrEmpty(identifier)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1204)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0205)); } if (_signals.TryRemove(identifier, out CancellationTokenSource? signal)) @@ -524,7 +524,7 @@ namespace OpenIddict.Core var signal = await CreateExpirationSignalAsync(token, cancellationToken); if (signal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1196)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0197)); } entry.AddExpirationToken(signal); @@ -556,7 +556,7 @@ namespace OpenIddict.Core var signal = await CreateExpirationSignalAsync(token, cancellationToken); if (signal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1196)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0197)); } entry.AddExpirationToken(signal); @@ -586,7 +586,7 @@ namespace OpenIddict.Core var identifier = await _store.GetIdAsync(token, cancellationToken); if (string.IsNullOrEmpty(identifier)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1204)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0205)); } var signal = _signals.GetOrAdd(identifier, _ => new CancellationTokenSource()); diff --git a/src/OpenIddict.Core/Managers/OpenIddictApplicationManager.cs b/src/OpenIddict.Core/Managers/OpenIddictApplicationManager.cs index 6ef2ae0b..6d59c122 100644 --- a/src/OpenIddict.Core/Managers/OpenIddictApplicationManager.cs +++ b/src/OpenIddict.Core/Managers/OpenIddictApplicationManager.cs @@ -150,7 +150,7 @@ namespace OpenIddict.Core if (!string.IsNullOrEmpty(await Store.GetClientSecretAsync(application, cancellationToken))) { - throw new ArgumentException(SR.GetResourceString(SR.ID1205), nameof(application)); + throw new ArgumentException(SR.GetResourceString(SR.ID0206), nameof(application)); } // If no client type was specified, assume it's a public application if no secret was provided. @@ -172,7 +172,7 @@ namespace OpenIddict.Core if (results.Any(result => result != ValidationResult.Success)) { var builder = new StringBuilder(); - builder.AppendLine(SR.GetResourceString(SR.ID1206)); + builder.AppendLine(SR.GetResourceString(SR.ID0207)); builder.AppendLine(); foreach (var result in results) @@ -226,7 +226,7 @@ namespace OpenIddict.Core var application = await Store.InstantiateAsync(cancellationToken); if (application is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1207)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0208)); } await PopulateAsync(application, descriptor, cancellationToken); @@ -282,7 +282,7 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } var application = Options.CurrentValue.DisableEntityCaching ? @@ -319,7 +319,7 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } var application = Options.CurrentValue.DisableEntityCaching ? @@ -354,7 +354,7 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(address)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1142), nameof(address)); + throw new ArgumentException(SR.GetResourceString(SR.ID0143), nameof(address)); } var applications = Options.CurrentValue.DisableEntityCaching ? @@ -396,7 +396,7 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(address)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1142), nameof(address)); + throw new ArgumentException(SR.GetResourceString(SR.ID0143), nameof(address)); } var applications = Options.CurrentValue.DisableEntityCaching ? @@ -761,7 +761,7 @@ namespace OpenIddict.Core if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1208), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0209), nameof(type)); } return string.Equals(await GetClientTypeAsync(application, cancellationToken), type, StringComparison.OrdinalIgnoreCase); @@ -784,7 +784,7 @@ namespace OpenIddict.Core if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1209), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0210), nameof(type)); } return string.Equals(await GetConsentTypeAsync(application, cancellationToken), type, StringComparison.OrdinalIgnoreCase); @@ -807,7 +807,7 @@ namespace OpenIddict.Core if (string.IsNullOrEmpty(permission)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1210), nameof(permission)); + throw new ArgumentException(SR.GetResourceString(SR.ID0211), nameof(permission)); } return (await GetPermissionsAsync(application, cancellationToken)).Contains(permission, StringComparer.Ordinal); @@ -830,7 +830,7 @@ namespace OpenIddict.Core if (string.IsNullOrEmpty(requirement)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1211), nameof(requirement)); + throw new ArgumentException(SR.GetResourceString(SR.ID0212), nameof(requirement)); } return (await GetRequirementsAsync(application, cancellationToken)).Contains(requirement, StringComparer.Ordinal); @@ -967,13 +967,13 @@ namespace OpenIddict.Core // Ensure the address is not null or empty. if (string.IsNullOrEmpty(address)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1212)); + throw new ArgumentException(SR.GetResourceString(SR.ID0213)); } // Ensure the address is a valid absolute URL. if (!Uri.TryCreate(address, UriKind.Absolute, out Uri? uri) || !uri.IsWellFormedOriginalString()) { - throw new ArgumentException(SR.GetResourceString(SR.ID1213)); + throw new ArgumentException(SR.GetResourceString(SR.ID0214)); } descriptor.PostLogoutRedirectUris.Add(uri); @@ -985,13 +985,13 @@ namespace OpenIddict.Core // Ensure the address is not null or empty. if (string.IsNullOrEmpty(address)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1212)); + throw new ArgumentException(SR.GetResourceString(SR.ID0213)); } // Ensure the address is a valid absolute URL. if (!Uri.TryCreate(address, UriKind.Absolute, out Uri? uri) || !uri.IsWellFormedOriginalString()) { - throw new ArgumentException(SR.GetResourceString(SR.ID1213)); + throw new ArgumentException(SR.GetResourceString(SR.ID0214)); } descriptor.RedirectUris.Add(uri); @@ -1017,7 +1017,7 @@ namespace OpenIddict.Core if (results.Any(result => result != ValidationResult.Success)) { var builder = new StringBuilder(); - builder.AppendLine(SR.GetResourceString(SR.ID1214)); + builder.AppendLine(SR.GetResourceString(SR.ID0215)); builder.AppendLine(); foreach (var result in results) @@ -1138,7 +1138,7 @@ namespace OpenIddict.Core var identifier = await Store.GetClientIdAsync(application, cancellationToken); if (string.IsNullOrEmpty(identifier)) { - yield return new ValidationResult(Localizer[SR.ID3036]); + yield return new ValidationResult(Localizer[SR.ID2036]); } else @@ -1152,14 +1152,14 @@ namespace OpenIddict.Core await Store.GetIdAsync(other, cancellationToken), await Store.GetIdAsync(application, cancellationToken), StringComparison.Ordinal)) { - yield return new ValidationResult(Localizer[SR.ID3111]); + yield return new ValidationResult(Localizer[SR.ID2111]); } } var type = await Store.GetClientTypeAsync(application, cancellationToken); if (string.IsNullOrEmpty(type)) { - yield return new ValidationResult(Localizer[SR.ID3118]); + yield return new ValidationResult(Localizer[SR.ID2118]); } else @@ -1169,20 +1169,20 @@ namespace OpenIddict.Core !string.Equals(type, ClientTypes.Hybrid, StringComparison.OrdinalIgnoreCase) && !string.Equals(type, ClientTypes.Public, StringComparison.OrdinalIgnoreCase)) { - yield return new ValidationResult(Localizer[SR.ID3112]); + yield return new ValidationResult(Localizer[SR.ID2112]); } // Ensure a client secret was specified if the client is a confidential application. var secret = await Store.GetClientSecretAsync(application, cancellationToken); if (string.IsNullOrEmpty(secret) && string.Equals(type, ClientTypes.Confidential, StringComparison.OrdinalIgnoreCase)) { - yield return new ValidationResult(Localizer[SR.ID3113]); + yield return new ValidationResult(Localizer[SR.ID2113]); } // Ensure no client secret was specified if the client is a public application. else if (!string.IsNullOrEmpty(secret) && string.Equals(type, ClientTypes.Public, StringComparison.OrdinalIgnoreCase)) { - yield return new ValidationResult(Localizer[SR.ID3114]); + yield return new ValidationResult(Localizer[SR.ID2114]); } } @@ -1195,7 +1195,7 @@ namespace OpenIddict.Core // Ensure the address is not null or empty. if (string.IsNullOrEmpty(address)) { - yield return new ValidationResult(Localizer[SR.ID3119]); + yield return new ValidationResult(Localizer[SR.ID2119]); break; } @@ -1203,7 +1203,7 @@ namespace OpenIddict.Core // Ensure the address is a valid absolute URL. if (!Uri.TryCreate(address, UriKind.Absolute, out Uri? uri) || !uri.IsWellFormedOriginalString()) { - yield return new ValidationResult(Localizer[SR.ID3120]); + yield return new ValidationResult(Localizer[SR.ID2120]); break; } @@ -1211,7 +1211,7 @@ namespace OpenIddict.Core // Ensure the address doesn't contain a fragment. if (!string.IsNullOrEmpty(uri.Fragment)) { - yield return new ValidationResult(Localizer[SR.ID3115]); + yield return new ValidationResult(Localizer[SR.ID2115]); break; } @@ -1238,12 +1238,12 @@ namespace OpenIddict.Core } if (string.IsNullOrEmpty(secret)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1215), nameof(secret)); + throw new ArgumentException(SR.GetResourceString(SR.ID0216), nameof(secret)); } if (await HasClientTypeAsync(application, ClientTypes.Public, cancellationToken)) { - Logger.LogWarning(SR.GetResourceString(SR.ID7159)); + Logger.LogWarning(SR.GetResourceString(SR.ID6159)); return false; } @@ -1251,14 +1251,14 @@ namespace OpenIddict.Core var value = await Store.GetClientSecretAsync(application, cancellationToken); if (string.IsNullOrEmpty(value)) { - Logger.LogError(SR.GetResourceString(SR.ID7160), await GetClientIdAsync(application, cancellationToken)); + Logger.LogError(SR.GetResourceString(SR.ID6160), await GetClientIdAsync(application, cancellationToken)); return false; } if (!await ValidateClientSecretAsync(secret, value, cancellationToken)) { - Logger.LogWarning(SR.GetResourceString(SR.ID7161), await GetClientIdAsync(application, cancellationToken)); + Logger.LogWarning(SR.GetResourceString(SR.ID6161), await GetClientIdAsync(application, cancellationToken)); return false; } @@ -1286,7 +1286,7 @@ namespace OpenIddict.Core if (string.IsNullOrEmpty(address)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1142), nameof(address)); + throw new ArgumentException(SR.GetResourceString(SR.ID0143), nameof(address)); } foreach (var uri in await Store.GetRedirectUrisAsync(application, cancellationToken)) @@ -1299,7 +1299,7 @@ namespace OpenIddict.Core } } - Logger.LogWarning(SR.GetResourceString(SR.ID7162), address, await GetClientIdAsync(application, cancellationToken)); + Logger.LogWarning(SR.GetResourceString(SR.ID6162), address, await GetClientIdAsync(application, cancellationToken)); return false; } @@ -1317,7 +1317,7 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(secret)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1215), nameof(secret)); + throw new ArgumentException(SR.GetResourceString(SR.ID0216), nameof(secret)); } // Note: the PRF, iteration count, salt length and key length currently all match the default values @@ -1362,7 +1362,7 @@ namespace OpenIddict.Core var name when name == HashAlgorithmName.SHA256 => 1, var name when name == HashAlgorithmName.SHA512 => 2, - _ => throw new InvalidOperationException(SR.GetResourceString(SR.ID1216)) + _ => throw new InvalidOperationException(SR.GetResourceString(SR.ID0217)) }); // Write the iteration count of the algorithm. @@ -1397,12 +1397,12 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(secret)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1215), nameof(secret)); + throw new ArgumentException(SR.GetResourceString(SR.ID0216), nameof(secret)); } if (string.IsNullOrEmpty(comparand)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1217), nameof(comparand)); + throw new ArgumentException(SR.GetResourceString(SR.ID0218), nameof(comparand)); } try @@ -1412,7 +1412,7 @@ namespace OpenIddict.Core catch (Exception exception) { - Logger.LogWarning(exception, SR.GetResourceString(SR.ID7163)); + Logger.LogWarning(exception, SR.GetResourceString(SR.ID6163)); return new ValueTask(false); } @@ -1442,7 +1442,7 @@ namespace OpenIddict.Core 1 => HashAlgorithmName.SHA256, 2 => HashAlgorithmName.SHA512, - _ => throw new InvalidOperationException(SR.GetResourceString(SR.ID1216)) + _ => throw new InvalidOperationException(SR.GetResourceString(SR.ID0217)) }; // Read the iteration count of the algorithm. @@ -1492,7 +1492,7 @@ namespace OpenIddict.Core var name when name == HashAlgorithmName.SHA256 => new Sha256Digest(), var name when name == HashAlgorithmName.SHA512 => new Sha512Digest(), - _ => throw new InvalidOperationException(SR.GetResourceString(SR.ID1216)) + _ => throw new InvalidOperationException(SR.GetResourceString(SR.ID0217)) }); generator.Init(PbeParametersGenerator.Pkcs5PasswordToBytes(secret.ToCharArray()), salt.ToArray(), iterations); diff --git a/src/OpenIddict.Core/Managers/OpenIddictAuthorizationManager.cs b/src/OpenIddict.Core/Managers/OpenIddictAuthorizationManager.cs index 37af1ca4..91b12daf 100644 --- a/src/OpenIddict.Core/Managers/OpenIddictAuthorizationManager.cs +++ b/src/OpenIddict.Core/Managers/OpenIddictAuthorizationManager.cs @@ -131,7 +131,7 @@ namespace OpenIddict.Core if (results.Any(result => result != ValidationResult.Success)) { var builder = new StringBuilder(); - builder.AppendLine(SR.GetResourceString(SR.ID1218)); + builder.AppendLine(SR.GetResourceString(SR.ID0219)); builder.AppendLine(); foreach (var result in results) @@ -182,7 +182,7 @@ namespace OpenIddict.Core var authorization = await Store.InstantiateAsync(cancellationToken); if (authorization is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1219)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0220)); } await PopulateAsync(authorization, descriptor, cancellationToken); @@ -214,17 +214,17 @@ namespace OpenIddict.Core if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1199), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0200), nameof(type)); } var descriptor = new OpenIddictAuthorizationDescriptor @@ -277,12 +277,12 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } var authorizations = Options.CurrentValue.DisableEntityCaching ? @@ -330,17 +330,17 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } if (string.IsNullOrEmpty(status)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1198), nameof(status)); + throw new ArgumentException(SR.GetResourceString(SR.ID0199), nameof(status)); } var authorizations = Options.CurrentValue.DisableEntityCaching ? @@ -385,22 +385,22 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } if (string.IsNullOrEmpty(status)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1198), nameof(status)); + throw new ArgumentException(SR.GetResourceString(SR.ID0199), nameof(status)); } if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1199), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0200), nameof(type)); } var authorizations = Options.CurrentValue.DisableEntityCaching ? @@ -447,22 +447,22 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } if (string.IsNullOrEmpty(status)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1198), nameof(status)); + throw new ArgumentException(SR.GetResourceString(SR.ID0199), nameof(status)); } if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1199), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0200), nameof(type)); } var authorizations = Options.CurrentValue.DisableEntityCaching ? @@ -510,7 +510,7 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } var authorizations = Options.CurrentValue.DisableEntityCaching ? @@ -553,7 +553,7 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } var authorization = Options.CurrentValue.DisableEntityCaching ? @@ -588,7 +588,7 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } var authorizations = Options.CurrentValue.DisableEntityCaching ? @@ -838,7 +838,7 @@ namespace OpenIddict.Core if (string.IsNullOrEmpty(status)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1198), nameof(status)); + throw new ArgumentException(SR.GetResourceString(SR.ID0199), nameof(status)); } return string.Equals(await Store.GetStatusAsync(authorization, cancellationToken), status, StringComparison.OrdinalIgnoreCase); @@ -861,7 +861,7 @@ namespace OpenIddict.Core if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1199), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0200), nameof(type)); } return string.Equals(await Store.GetTypeAsync(authorization, cancellationToken), type, StringComparison.OrdinalIgnoreCase); @@ -1041,21 +1041,21 @@ namespace OpenIddict.Core { await UpdateAsync(authorization, cancellationToken); - Logger.LogInformation(SR.GetResourceString(SR.ID7164), await Store.GetIdAsync(authorization, cancellationToken)); + Logger.LogInformation(SR.GetResourceString(SR.ID6164), await Store.GetIdAsync(authorization, cancellationToken)); return true; } catch (ConcurrencyException exception) { - Logger.LogDebug(exception, SR.GetResourceString(SR.ID7165), await Store.GetIdAsync(authorization, cancellationToken)); + Logger.LogDebug(exception, SR.GetResourceString(SR.ID6165), await Store.GetIdAsync(authorization, cancellationToken)); return false; } catch (Exception exception) { - Logger.LogWarning(exception, SR.GetResourceString(SR.ID7166), await Store.GetIdAsync(authorization, cancellationToken)); + Logger.LogWarning(exception, SR.GetResourceString(SR.ID6166), await Store.GetIdAsync(authorization, cancellationToken)); return false; } @@ -1080,7 +1080,7 @@ namespace OpenIddict.Core if (results.Any(result => result != ValidationResult.Success)) { var builder = new StringBuilder(); - builder.AppendLine(SR.GetResourceString(SR.ID1220)); + builder.AppendLine(SR.GetResourceString(SR.ID0221)); builder.AppendLine(); foreach (var result in results) @@ -1156,18 +1156,18 @@ namespace OpenIddict.Core var type = await Store.GetTypeAsync(authorization, cancellationToken); if (string.IsNullOrEmpty(type)) { - yield return new ValidationResult(Localizer[SR.ID3116]); + yield return new ValidationResult(Localizer[SR.ID2116]); } else if (!string.Equals(type, AuthorizationTypes.AdHoc, StringComparison.OrdinalIgnoreCase) && !string.Equals(type, AuthorizationTypes.Permanent, StringComparison.OrdinalIgnoreCase)) { - yield return new ValidationResult(Localizer[SR.ID3117]); + yield return new ValidationResult(Localizer[SR.ID2117]); } if (string.IsNullOrEmpty(await Store.GetStatusAsync(authorization, cancellationToken))) { - yield return new ValidationResult(Localizer[SR.ID3038]); + yield return new ValidationResult(Localizer[SR.ID2038]); } // Ensure that the scopes are not null or empty and do not contain spaces. @@ -1175,14 +1175,14 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(scope)) { - yield return new ValidationResult(Localizer[SR.ID3039]); + yield return new ValidationResult(Localizer[SR.ID2039]); break; } if (scope.Contains(Separators.Space[0])) { - yield return new ValidationResult(Localizer[SR.ID3042]); + yield return new ValidationResult(Localizer[SR.ID2042]); break; } diff --git a/src/OpenIddict.Core/Managers/OpenIddictScopeManager.cs b/src/OpenIddict.Core/Managers/OpenIddictScopeManager.cs index e1ca7955..4a734474 100644 --- a/src/OpenIddict.Core/Managers/OpenIddictScopeManager.cs +++ b/src/OpenIddict.Core/Managers/OpenIddictScopeManager.cs @@ -124,7 +124,7 @@ namespace OpenIddict.Core if (results.Any(result => result != ValidationResult.Success)) { var builder = new StringBuilder(); - builder.AppendLine(SR.GetResourceString(SR.ID1221)); + builder.AppendLine(SR.GetResourceString(SR.ID0222)); builder.AppendLine(); foreach (var result in results) @@ -175,7 +175,7 @@ namespace OpenIddict.Core var scope = await Store.InstantiateAsync(cancellationToken); if (scope is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1222)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0223)); } await PopulateAsync(scope, descriptor, cancellationToken); @@ -220,7 +220,7 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } var scope = Options.CurrentValue.DisableEntityCaching ? @@ -257,7 +257,7 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(name)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1201), nameof(name)); + throw new ArgumentException(SR.GetResourceString(SR.ID0202), nameof(name)); } var scope = Options.CurrentValue.DisableEntityCaching ? @@ -293,7 +293,7 @@ namespace OpenIddict.Core { if (names.Any(name => string.IsNullOrEmpty(name))) { - throw new ArgumentException(SR.GetResourceString(SR.ID1202), nameof(names)); + throw new ArgumentException(SR.GetResourceString(SR.ID0203), nameof(names)); } var scopes = Options.CurrentValue.DisableEntityCaching ? @@ -334,7 +334,7 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(resource)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1061), nameof(resource)); + throw new ArgumentException(SR.GetResourceString(SR.ID0062), nameof(resource)); } var scopes = Options.CurrentValue.DisableEntityCaching ? @@ -841,7 +841,7 @@ namespace OpenIddict.Core if (results.Any(result => result != ValidationResult.Success)) { var builder = new StringBuilder(); - builder.AppendLine(SR.GetResourceString(SR.ID1223)); + builder.AppendLine(SR.GetResourceString(SR.ID0224)); builder.AppendLine(); foreach (var result in results) @@ -919,12 +919,12 @@ namespace OpenIddict.Core var name = await Store.GetNameAsync(scope, cancellationToken); if (string.IsNullOrEmpty(name)) { - yield return new ValidationResult(Localizer[SR.ID3044]); + yield return new ValidationResult(Localizer[SR.ID2044]); } else if (name!.Contains(Separators.Space[0])) { - yield return new ValidationResult(Localizer[SR.ID3045]); + yield return new ValidationResult(Localizer[SR.ID2045]); } else @@ -938,7 +938,7 @@ namespace OpenIddict.Core await Store.GetIdAsync(other, cancellationToken), await Store.GetIdAsync(scope, cancellationToken), StringComparison.Ordinal)) { - yield return new ValidationResult(Localizer[SR.ID3060]); + yield return new ValidationResult(Localizer[SR.ID2060]); } } } diff --git a/src/OpenIddict.Core/Managers/OpenIddictTokenManager.cs b/src/OpenIddict.Core/Managers/OpenIddictTokenManager.cs index eaa513f4..222fb3fb 100644 --- a/src/OpenIddict.Core/Managers/OpenIddictTokenManager.cs +++ b/src/OpenIddict.Core/Managers/OpenIddictTokenManager.cs @@ -139,7 +139,7 @@ namespace OpenIddict.Core if (results.Any(result => result != ValidationResult.Success)) { var builder = new StringBuilder(); - builder.AppendLine(SR.GetResourceString(SR.ID1224)); + builder.AppendLine(SR.GetResourceString(SR.ID0225)); builder.AppendLine(); foreach (var result in results) @@ -190,7 +190,7 @@ namespace OpenIddict.Core var token = await Store.InstantiateAsync(cancellationToken); if (token is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1225)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0226)); } await PopulateAsync(token, descriptor, cancellationToken); @@ -235,12 +235,12 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } var tokens = Options.CurrentValue.DisableEntityCaching ? @@ -284,17 +284,17 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } if (string.IsNullOrEmpty(status)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1198), nameof(status)); + throw new ArgumentException(SR.GetResourceString(SR.ID0199), nameof(status)); } var tokens = Options.CurrentValue.DisableEntityCaching ? @@ -339,22 +339,22 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } if (string.IsNullOrEmpty(status)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1198), nameof(status)); + throw new ArgumentException(SR.GetResourceString(SR.ID0199), nameof(status)); } if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1199), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0200), nameof(type)); } var tokens = Options.CurrentValue.DisableEntityCaching ? @@ -395,7 +395,7 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } var tokens = Options.CurrentValue.DisableEntityCaching ? @@ -436,7 +436,7 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } var tokens = Options.CurrentValue.DisableEntityCaching ? @@ -479,7 +479,7 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } var token = Options.CurrentValue.DisableEntityCaching ? @@ -517,7 +517,7 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } identifier = await ObfuscateReferenceIdAsync(identifier, cancellationToken); @@ -555,7 +555,7 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } var tokens = Options.CurrentValue.DisableEntityCaching ? @@ -838,7 +838,7 @@ namespace OpenIddict.Core if (string.IsNullOrEmpty(status)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1198), nameof(status)); + throw new ArgumentException(SR.GetResourceString(SR.ID0199), nameof(status)); } return string.Equals(await Store.GetStatusAsync(token, cancellationToken), status, StringComparison.OrdinalIgnoreCase); @@ -860,7 +860,7 @@ namespace OpenIddict.Core if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1199), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0200), nameof(type)); } return string.Equals(await Store.GetTypeAsync(token, cancellationToken), type, StringComparison.OrdinalIgnoreCase); @@ -1065,12 +1065,12 @@ namespace OpenIddict.Core if (date is not null) { - Logger.LogInformation(SR.GetResourceString(SR.ID7167), await Store.GetIdAsync(token, cancellationToken), date); + Logger.LogInformation(SR.GetResourceString(SR.ID6167), await Store.GetIdAsync(token, cancellationToken), date); } else { - Logger.LogInformation(SR.GetResourceString(SR.ID7168), await Store.GetIdAsync(token, cancellationToken)); + Logger.LogInformation(SR.GetResourceString(SR.ID6168), await Store.GetIdAsync(token, cancellationToken)); } return true; @@ -1078,14 +1078,14 @@ namespace OpenIddict.Core catch (ConcurrencyException exception) { - Logger.LogDebug(exception, SR.GetResourceString(SR.ID7169), await Store.GetIdAsync(token, cancellationToken)); + Logger.LogDebug(exception, SR.GetResourceString(SR.ID6169), await Store.GetIdAsync(token, cancellationToken)); return false; } catch (Exception exception) { - Logger.LogWarning(exception, SR.GetResourceString(SR.ID7170), await Store.GetIdAsync(token, cancellationToken)); + Logger.LogWarning(exception, SR.GetResourceString(SR.ID6170), await Store.GetIdAsync(token, cancellationToken)); return false; } @@ -1116,21 +1116,21 @@ namespace OpenIddict.Core { await UpdateAsync(token, cancellationToken); - Logger.LogInformation(SR.GetResourceString(SR.ID7171), await Store.GetIdAsync(token, cancellationToken)); + Logger.LogInformation(SR.GetResourceString(SR.ID6171), await Store.GetIdAsync(token, cancellationToken)); return true; } catch (ConcurrencyException exception) { - Logger.LogDebug(exception, SR.GetResourceString(SR.ID7172), await Store.GetIdAsync(token, cancellationToken)); + Logger.LogDebug(exception, SR.GetResourceString(SR.ID6172), await Store.GetIdAsync(token, cancellationToken)); return false; } catch (Exception exception) { - Logger.LogWarning(exception, SR.GetResourceString(SR.ID7173), await Store.GetIdAsync(token, cancellationToken)); + Logger.LogWarning(exception, SR.GetResourceString(SR.ID6173), await Store.GetIdAsync(token, cancellationToken)); return false; } @@ -1161,21 +1161,21 @@ namespace OpenIddict.Core { await UpdateAsync(token, cancellationToken); - Logger.LogInformation(SR.GetResourceString(SR.ID7174), await Store.GetIdAsync(token, cancellationToken)); + Logger.LogInformation(SR.GetResourceString(SR.ID6174), await Store.GetIdAsync(token, cancellationToken)); return true; } catch (ConcurrencyException exception) { - Logger.LogDebug(exception, SR.GetResourceString(SR.ID7175), await Store.GetIdAsync(token, cancellationToken)); + Logger.LogDebug(exception, SR.GetResourceString(SR.ID6175), await Store.GetIdAsync(token, cancellationToken)); return false; } catch (Exception exception) { - Logger.LogWarning(exception, SR.GetResourceString(SR.ID7176), await Store.GetIdAsync(token, cancellationToken)); + Logger.LogWarning(exception, SR.GetResourceString(SR.ID6176), await Store.GetIdAsync(token, cancellationToken)); return false; } @@ -1206,21 +1206,21 @@ namespace OpenIddict.Core { await UpdateAsync(token, cancellationToken); - Logger.LogInformation(SR.GetResourceString(SR.ID7177), await Store.GetIdAsync(token, cancellationToken)); + Logger.LogInformation(SR.GetResourceString(SR.ID6177), await Store.GetIdAsync(token, cancellationToken)); return true; } catch (ConcurrencyException exception) { - Logger.LogDebug(exception, SR.GetResourceString(SR.ID7178), await Store.GetIdAsync(token, cancellationToken)); + Logger.LogDebug(exception, SR.GetResourceString(SR.ID6178), await Store.GetIdAsync(token, cancellationToken)); return false; } catch (Exception exception) { - Logger.LogWarning(exception, SR.GetResourceString(SR.ID7179), await Store.GetIdAsync(token, cancellationToken)); + Logger.LogWarning(exception, SR.GetResourceString(SR.ID6179), await Store.GetIdAsync(token, cancellationToken)); return false; } @@ -1245,7 +1245,7 @@ namespace OpenIddict.Core if (results.Any(result => result != ValidationResult.Success)) { var builder = new StringBuilder(); - builder.AppendLine(SR.GetResourceString(SR.ID1226)); + builder.AppendLine(SR.GetResourceString(SR.ID0227)); builder.AppendLine(); foreach (var result in results) @@ -1343,19 +1343,19 @@ namespace OpenIddict.Core await Store.GetIdAsync(other, cancellationToken), await Store.GetIdAsync(token, cancellationToken), StringComparison.Ordinal)) { - yield return new ValidationResult(Localizer[SR.ID3085]); + yield return new ValidationResult(Localizer[SR.ID2085]); } } var type = await Store.GetTypeAsync(token, cancellationToken); if (string.IsNullOrEmpty(type)) { - yield return new ValidationResult(Localizer[SR.ID3086]); + yield return new ValidationResult(Localizer[SR.ID2086]); } if (string.IsNullOrEmpty(await Store.GetStatusAsync(token, cancellationToken))) { - yield return new ValidationResult(Localizer[SR.ID3038]); + yield return new ValidationResult(Localizer[SR.ID2038]); } } @@ -1372,7 +1372,7 @@ namespace OpenIddict.Core { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } // Compute the digest of the generated identifier and use it as the hashed identifier of the reference token. diff --git a/src/OpenIddict.Core/OpenIddictCoreBuilder.cs b/src/OpenIddict.Core/OpenIddictCoreBuilder.cs index f4b24f86..3e134f56 100644 --- a/src/OpenIddict.Core/OpenIddictCoreBuilder.cs +++ b/src/OpenIddict.Core/OpenIddictCoreBuilder.cs @@ -82,7 +82,7 @@ namespace Microsoft.Extensions.DependencyInjection var root = OpenIddictHelpers.FindGenericBaseType(type, typeof(IOpenIddictApplicationStore<>)); if (root is null) { - throw new ArgumentException(SR.GetResourceString(SR.ID1231), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0232), nameof(type)); } // Note: managers can be either open generics (e.g OpenIddictApplicationStore<>) @@ -91,7 +91,7 @@ namespace Microsoft.Extensions.DependencyInjection { if (type.GetGenericArguments().Length != 1) { - throw new ArgumentException(SR.GetResourceString(SR.ID1231), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0232), nameof(type)); } Services.Replace(new ServiceDescriptor(typeof(IOpenIddictApplicationStore<>), type, lifetime)); @@ -138,7 +138,7 @@ namespace Microsoft.Extensions.DependencyInjection var root = OpenIddictHelpers.FindGenericBaseType(type, typeof(IOpenIddictAuthorizationStore<>)); if (root is null) { - throw new ArgumentException(SR.GetResourceString(SR.ID1231), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0232), nameof(type)); } // Note: managers can be either open generics (e.g OpenIddictAuthorizationStore<>) @@ -147,7 +147,7 @@ namespace Microsoft.Extensions.DependencyInjection { if (type.GetGenericArguments().Length != 1) { - throw new ArgumentException(SR.GetResourceString(SR.ID1231), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0232), nameof(type)); } Services.Replace(new ServiceDescriptor(typeof(IOpenIddictAuthorizationStore<>), type, lifetime)); @@ -194,7 +194,7 @@ namespace Microsoft.Extensions.DependencyInjection var root = OpenIddictHelpers.FindGenericBaseType(type, typeof(IOpenIddictScopeStore<>)); if (root is null) { - throw new ArgumentException(SR.GetResourceString(SR.ID1231), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0232), nameof(type)); } // Note: managers can be either open generics (e.g OpenIddictScopeStore<>) @@ -203,7 +203,7 @@ namespace Microsoft.Extensions.DependencyInjection { if (type.GetGenericArguments().Length != 1) { - throw new ArgumentException(SR.GetResourceString(SR.ID1231), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0232), nameof(type)); } Services.Replace(new ServiceDescriptor(typeof(IOpenIddictScopeStore<>), type, lifetime)); @@ -250,7 +250,7 @@ namespace Microsoft.Extensions.DependencyInjection var root = OpenIddictHelpers.FindGenericBaseType(type, typeof(IOpenIddictTokenStore<>)); if (root is null) { - throw new ArgumentException(SR.GetResourceString(SR.ID1231), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0232), nameof(type)); } // Note: managers can be either open generics (e.g OpenIddictTokenStore<>) @@ -259,7 +259,7 @@ namespace Microsoft.Extensions.DependencyInjection { if (type.GetGenericArguments().Length != 1) { - throw new ArgumentException(SR.GetResourceString(SR.ID1231), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0232), nameof(type)); } Services.Replace(new ServiceDescriptor(typeof(IOpenIddictTokenStore<>), type, lifetime)); @@ -304,7 +304,7 @@ namespace Microsoft.Extensions.DependencyInjection var root = OpenIddictHelpers.FindGenericBaseType(type, typeof(OpenIddictApplicationManager<>)); if (root is null) { - throw new ArgumentException(SR.GetResourceString(SR.ID1231), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0232), nameof(type)); } // Note: managers can be either open generics (e.g OpenIddictApplicationManager<>) @@ -313,7 +313,7 @@ namespace Microsoft.Extensions.DependencyInjection { if (type.GetGenericArguments().Length != 1) { - throw new ArgumentException(SR.GetResourceString(SR.ID1231), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0232), nameof(type)); } Services.Replace(ServiceDescriptor.Scoped(type, type)); @@ -360,7 +360,7 @@ namespace Microsoft.Extensions.DependencyInjection if (!typeof(IOpenIddictApplicationStoreResolver).IsAssignableFrom(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1231), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0232), nameof(type)); } Services.Replace(new ServiceDescriptor(typeof(IOpenIddictApplicationStoreResolver), type, lifetime)); @@ -398,7 +398,7 @@ namespace Microsoft.Extensions.DependencyInjection var root = OpenIddictHelpers.FindGenericBaseType(type, typeof(OpenIddictAuthorizationManager<>)); if (root is null) { - throw new ArgumentException(SR.GetResourceString(SR.ID1231), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0232), nameof(type)); } // Note: managers can be either open generics (e.g OpenIddictAuthorizationManager<>) @@ -407,7 +407,7 @@ namespace Microsoft.Extensions.DependencyInjection { if (type.GetGenericArguments().Length != 1) { - throw new ArgumentException(SR.GetResourceString(SR.ID1231), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0232), nameof(type)); } Services.Replace(ServiceDescriptor.Scoped(type, type)); @@ -454,7 +454,7 @@ namespace Microsoft.Extensions.DependencyInjection if (!typeof(IOpenIddictAuthorizationStoreResolver).IsAssignableFrom(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1231), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0232), nameof(type)); } Services.Replace(new ServiceDescriptor(typeof(IOpenIddictAuthorizationStoreResolver), type, lifetime)); @@ -492,7 +492,7 @@ namespace Microsoft.Extensions.DependencyInjection var root = OpenIddictHelpers.FindGenericBaseType(type, typeof(OpenIddictScopeManager<>)); if (root is null) { - throw new ArgumentException(SR.GetResourceString(SR.ID1231), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0232), nameof(type)); } // Note: managers can be either open generics (e.g OpenIddictScopeManager<>) @@ -501,7 +501,7 @@ namespace Microsoft.Extensions.DependencyInjection { if (type.GetGenericArguments().Length != 1) { - throw new ArgumentException(SR.GetResourceString(SR.ID1231), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0232), nameof(type)); } Services.Replace(ServiceDescriptor.Scoped(type, type)); @@ -548,7 +548,7 @@ namespace Microsoft.Extensions.DependencyInjection if (!typeof(IOpenIddictScopeStoreResolver).IsAssignableFrom(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1231), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0232), nameof(type)); } Services.Replace(new ServiceDescriptor(typeof(IOpenIddictScopeStoreResolver), type, lifetime)); @@ -586,7 +586,7 @@ namespace Microsoft.Extensions.DependencyInjection var root = OpenIddictHelpers.FindGenericBaseType(type, typeof(OpenIddictTokenManager<>)); if (root is null) { - throw new ArgumentException(SR.GetResourceString(SR.ID1231), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0232), nameof(type)); } // Note: managers can be either open generics (e.g OpenIddictTokenManager<>) @@ -595,7 +595,7 @@ namespace Microsoft.Extensions.DependencyInjection { if (type.GetGenericArguments().Length != 1) { - throw new ArgumentException(SR.GetResourceString(SR.ID1231), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0232), nameof(type)); } Services.Replace(ServiceDescriptor.Scoped(type, type)); @@ -642,7 +642,7 @@ namespace Microsoft.Extensions.DependencyInjection if (!typeof(IOpenIddictTokenStoreResolver).IsAssignableFrom(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1231), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0232), nameof(type)); } Services.Replace(new ServiceDescriptor(typeof(IOpenIddictTokenStoreResolver), type, lifetime)); @@ -691,7 +691,7 @@ namespace Microsoft.Extensions.DependencyInjection if (type.IsValueType) { - throw new ArgumentException(SR.GetResourceString(SR.ID1231), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0232), nameof(type)); } return Configure(options => options.DefaultApplicationType = type); @@ -718,7 +718,7 @@ namespace Microsoft.Extensions.DependencyInjection if (type.IsValueType) { - throw new ArgumentException(SR.GetResourceString(SR.ID1231), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0232), nameof(type)); } return Configure(options => options.DefaultAuthorizationType = type); @@ -745,7 +745,7 @@ namespace Microsoft.Extensions.DependencyInjection if (type.IsValueType) { - throw new ArgumentException(SR.GetResourceString(SR.ID1231), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0232), nameof(type)); } return Configure(options => options.DefaultScopeType = type); @@ -772,7 +772,7 @@ namespace Microsoft.Extensions.DependencyInjection if (type.IsValueType) { - throw new ArgumentException(SR.GetResourceString(SR.ID1231), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0232), nameof(type)); } return Configure(options => options.DefaultTokenType = type); @@ -788,7 +788,7 @@ namespace Microsoft.Extensions.DependencyInjection { if (limit < 10) { - throw new ArgumentException(SR.GetResourceString(SR.ID1232), nameof(limit)); + throw new ArgumentException(SR.GetResourceString(SR.ID0233), nameof(limit)); } return Configure(options => options.EntityCacheLimit = limit); diff --git a/src/OpenIddict.Core/OpenIddictCoreExtensions.cs b/src/OpenIddict.Core/OpenIddictCoreExtensions.cs index 1e8e217d..6fac6481 100644 --- a/src/OpenIddict.Core/OpenIddictCoreExtensions.cs +++ b/src/OpenIddict.Core/OpenIddictCoreExtensions.cs @@ -59,7 +59,7 @@ namespace Microsoft.Extensions.DependencyInjection var options = provider.GetRequiredService>().CurrentValue; if (options.DefaultApplicationType is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1272)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0273)); } return (IOpenIddictApplicationManager) provider.GetRequiredService( @@ -71,7 +71,7 @@ namespace Microsoft.Extensions.DependencyInjection var options = provider.GetRequiredService>().CurrentValue; if (options.DefaultAuthorizationType is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1273)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0274)); } return (IOpenIddictAuthorizationManager) provider.GetRequiredService( @@ -83,7 +83,7 @@ namespace Microsoft.Extensions.DependencyInjection var options = provider.GetRequiredService>().CurrentValue; if (options.DefaultScopeType is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1274)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0275)); } return (IOpenIddictScopeManager) provider.GetRequiredService( @@ -95,7 +95,7 @@ namespace Microsoft.Extensions.DependencyInjection var options = provider.GetRequiredService>().CurrentValue; if (options.DefaultTokenType is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1275)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0276)); } return (IOpenIddictTokenManager) provider.GetRequiredService( diff --git a/src/OpenIddict.Core/Resolvers/OpenIddictApplicationStoreResolver.cs b/src/OpenIddict.Core/Resolvers/OpenIddictApplicationStoreResolver.cs index 05cad2c5..9a9e9345 100644 --- a/src/OpenIddict.Core/Resolvers/OpenIddictApplicationStoreResolver.cs +++ b/src/OpenIddict.Core/Resolvers/OpenIddictApplicationStoreResolver.cs @@ -23,6 +23,6 @@ namespace OpenIddict.Core /// An . public IOpenIddictApplicationStore Get() where TApplication : class => _provider.GetService>() ?? - throw new InvalidOperationException(SR.GetResourceString(SR.ID1227)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0228)); } } diff --git a/src/OpenIddict.Core/Resolvers/OpenIddictAuthorizationStoreResolver.cs b/src/OpenIddict.Core/Resolvers/OpenIddictAuthorizationStoreResolver.cs index 7827d2a6..4122b628 100644 --- a/src/OpenIddict.Core/Resolvers/OpenIddictAuthorizationStoreResolver.cs +++ b/src/OpenIddict.Core/Resolvers/OpenIddictAuthorizationStoreResolver.cs @@ -23,6 +23,6 @@ namespace OpenIddict.Core /// An . public IOpenIddictAuthorizationStore Get() where TAuthorization : class => _provider.GetService>() ?? - throw new InvalidOperationException(SR.GetResourceString(SR.ID1228)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0229)); } } diff --git a/src/OpenIddict.Core/Resolvers/OpenIddictScopeStoreResolver.cs b/src/OpenIddict.Core/Resolvers/OpenIddictScopeStoreResolver.cs index 5baf5658..1bbd9a5d 100644 --- a/src/OpenIddict.Core/Resolvers/OpenIddictScopeStoreResolver.cs +++ b/src/OpenIddict.Core/Resolvers/OpenIddictScopeStoreResolver.cs @@ -23,6 +23,6 @@ namespace OpenIddict.Core /// An . public IOpenIddictScopeStore Get() where TScope : class => _provider.GetService>() ?? - throw new InvalidOperationException(SR.GetResourceString(SR.ID1229)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0230)); } } diff --git a/src/OpenIddict.Core/Resolvers/OpenIddictTokenStoreResolver.cs b/src/OpenIddict.Core/Resolvers/OpenIddictTokenStoreResolver.cs index 7e9c14bc..33fbdcd2 100644 --- a/src/OpenIddict.Core/Resolvers/OpenIddictTokenStoreResolver.cs +++ b/src/OpenIddict.Core/Resolvers/OpenIddictTokenStoreResolver.cs @@ -23,6 +23,6 @@ namespace OpenIddict.Core /// An . public IOpenIddictTokenStore Get() where TToken : class => _provider.GetService>() ?? - throw new InvalidOperationException(SR.GetResourceString(SR.ID1230)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0231)); } } diff --git a/src/OpenIddict.EntityFramework/OpenIddictEntityFrameworkBuilder.cs b/src/OpenIddict.EntityFramework/OpenIddictEntityFrameworkBuilder.cs index 1a542ff3..9f25f11b 100644 --- a/src/OpenIddict.EntityFramework/OpenIddictEntityFrameworkBuilder.cs +++ b/src/OpenIddict.EntityFramework/OpenIddictEntityFrameworkBuilder.cs @@ -69,7 +69,7 @@ namespace Microsoft.Extensions.DependencyInjection if (typeof(TApplication).IsGenericType || typeof(TAuthorization).IsGenericType || typeof(TScope).IsGenericType || typeof(TToken).IsGenericType) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1276)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0277)); } Services.Configure(options => @@ -106,7 +106,7 @@ namespace Microsoft.Extensions.DependencyInjection if (!typeof(DbContext).IsAssignableFrom(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1231), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0232), nameof(type)); } Services.TryAddScoped(type); diff --git a/src/OpenIddict.EntityFramework/Resolvers/OpenIddictEntityFrameworkApplicationStoreResolver.cs b/src/OpenIddict.EntityFramework/Resolvers/OpenIddictEntityFrameworkApplicationStoreResolver.cs index 5e9d43ae..76409bea 100644 --- a/src/OpenIddict.EntityFramework/Resolvers/OpenIddictEntityFrameworkApplicationStoreResolver.cs +++ b/src/OpenIddict.EntityFramework/Resolvers/OpenIddictEntityFrameworkApplicationStoreResolver.cs @@ -53,13 +53,13 @@ namespace OpenIddict.EntityFramework var root = OpenIddictHelpers.FindGenericBaseType(key, typeof(OpenIddictEntityFrameworkApplication<,,>)); if (root is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1233)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0234)); } var context = _options.CurrentValue.DbContextType; if (context is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1234)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0235)); } return typeof(OpenIddictEntityFrameworkApplicationStore<,,,,>).MakeGenericType( diff --git a/src/OpenIddict.EntityFramework/Resolvers/OpenIddictEntityFrameworkAuthorizationStoreResolver.cs b/src/OpenIddict.EntityFramework/Resolvers/OpenIddictEntityFrameworkAuthorizationStoreResolver.cs index 707f24ac..c40e8128 100644 --- a/src/OpenIddict.EntityFramework/Resolvers/OpenIddictEntityFrameworkAuthorizationStoreResolver.cs +++ b/src/OpenIddict.EntityFramework/Resolvers/OpenIddictEntityFrameworkAuthorizationStoreResolver.cs @@ -53,13 +53,13 @@ namespace OpenIddict.EntityFramework var root = OpenIddictHelpers.FindGenericBaseType(key, typeof(OpenIddictEntityFrameworkAuthorization<,,>)); if (root is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1235)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0236)); } var context = _options.CurrentValue.DbContextType; if (context is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1234)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0235)); } return typeof(OpenIddictEntityFrameworkAuthorizationStore<,,,,>).MakeGenericType( diff --git a/src/OpenIddict.EntityFramework/Resolvers/OpenIddictEntityFrameworkScopeStoreResolver.cs b/src/OpenIddict.EntityFramework/Resolvers/OpenIddictEntityFrameworkScopeStoreResolver.cs index e142c52d..2957fcf3 100644 --- a/src/OpenIddict.EntityFramework/Resolvers/OpenIddictEntityFrameworkScopeStoreResolver.cs +++ b/src/OpenIddict.EntityFramework/Resolvers/OpenIddictEntityFrameworkScopeStoreResolver.cs @@ -53,13 +53,13 @@ namespace OpenIddict.EntityFramework var root = OpenIddictHelpers.FindGenericBaseType(key, typeof(OpenIddictEntityFrameworkScope<>)); if (root is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1236)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0237)); } var context = _options.CurrentValue.DbContextType; if (context is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1234)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0235)); } return typeof(OpenIddictEntityFrameworkScopeStore<,,>).MakeGenericType( diff --git a/src/OpenIddict.EntityFramework/Resolvers/OpenIddictEntityFrameworkTokenStoreResolver.cs b/src/OpenIddict.EntityFramework/Resolvers/OpenIddictEntityFrameworkTokenStoreResolver.cs index 3fd72865..0884ae90 100644 --- a/src/OpenIddict.EntityFramework/Resolvers/OpenIddictEntityFrameworkTokenStoreResolver.cs +++ b/src/OpenIddict.EntityFramework/Resolvers/OpenIddictEntityFrameworkTokenStoreResolver.cs @@ -53,13 +53,13 @@ namespace OpenIddict.EntityFramework var root = OpenIddictHelpers.FindGenericBaseType(key, typeof(OpenIddictEntityFrameworkToken<,,>)); if (root is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1237)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0238)); } var context = _options.CurrentValue.DbContextType; if (context is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1234)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0235)); } return typeof(OpenIddictEntityFrameworkTokenStore<,,,,>).MakeGenericType( diff --git a/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkApplicationStore.cs b/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkApplicationStore.cs index 88189ff4..237c17a0 100644 --- a/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkApplicationStore.cs +++ b/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkApplicationStore.cs @@ -210,7 +210,7 @@ namespace OpenIddict.EntityFramework Context.Entry(token).State = EntityState.Unchanged; } - throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID1238), exception); + throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0239), exception); } } @@ -219,7 +219,7 @@ namespace OpenIddict.EntityFramework { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } var key = ConvertIdentifierFromString(identifier); @@ -234,7 +234,7 @@ namespace OpenIddict.EntityFramework { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } return await (from application in Applications @@ -248,7 +248,7 @@ namespace OpenIddict.EntityFramework { if (string.IsNullOrEmpty(address)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1142), nameof(address)); + throw new ArgumentException(SR.GetResourceString(SR.ID0143), nameof(address)); } // To optimize the efficiency of the query a bit, only applications whose stringified @@ -282,7 +282,7 @@ namespace OpenIddict.EntityFramework { if (string.IsNullOrEmpty(address)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1142), nameof(address)); + throw new ArgumentException(SR.GetResourceString(SR.ID0143), nameof(address)); } // To optimize the efficiency of the query a bit, only applications whose stringified @@ -610,7 +610,7 @@ namespace OpenIddict.EntityFramework catch (MemberAccessException exception) { return new ValueTask(Task.FromException( - new InvalidOperationException(SR.GetResourceString(SR.ID1239), exception))); + new InvalidOperationException(SR.GetResourceString(SR.ID0240), exception))); } } @@ -965,7 +965,7 @@ namespace OpenIddict.EntityFramework // Reset the state of the entity to prevents future calls to SaveChangesAsync() from failing. Context.Entry(application).State = EntityState.Unchanged; - throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID1238), exception); + throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0239), exception); } } diff --git a/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkAuthorizationStore.cs b/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkAuthorizationStore.cs index d7e1ebf2..aee02c36 100644 --- a/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkAuthorizationStore.cs +++ b/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkAuthorizationStore.cs @@ -185,7 +185,7 @@ namespace OpenIddict.EntityFramework Context.Entry(token).State = EntityState.Unchanged; } - throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID1240), exception); + throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0241), exception); } } @@ -195,12 +195,12 @@ namespace OpenIddict.EntityFramework { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } var key = ConvertIdentifierFromString(client); @@ -218,17 +218,17 @@ namespace OpenIddict.EntityFramework { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } if (string.IsNullOrEmpty(status)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1198), nameof(status)); + throw new ArgumentException(SR.GetResourceString(SR.ID0199), nameof(status)); } var key = ConvertIdentifierFromString(client); @@ -247,22 +247,22 @@ namespace OpenIddict.EntityFramework { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } if (string.IsNullOrEmpty(status)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1198), nameof(status)); + throw new ArgumentException(SR.GetResourceString(SR.ID0199), nameof(status)); } if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1199), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0200), nameof(type)); } var key = ConvertIdentifierFromString(client); @@ -283,22 +283,22 @@ namespace OpenIddict.EntityFramework { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } if (string.IsNullOrEmpty(status)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1198), nameof(status)); + throw new ArgumentException(SR.GetResourceString(SR.ID0199), nameof(status)); } if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1199), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0200), nameof(type)); } return ExecuteAsync(cancellationToken); @@ -330,7 +330,7 @@ namespace OpenIddict.EntityFramework { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } var key = ConvertIdentifierFromString(identifier); @@ -345,7 +345,7 @@ namespace OpenIddict.EntityFramework { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } var key = ConvertIdentifierFromString(identifier); @@ -361,7 +361,7 @@ namespace OpenIddict.EntityFramework { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } return (from authorization in Authorizations.Include(authorization => authorization.Application) @@ -547,7 +547,7 @@ namespace OpenIddict.EntityFramework catch (MemberAccessException exception) { return new ValueTask(Task.FromException( - new InvalidOperationException(SR.GetResourceString(SR.ID1241), exception))); + new InvalidOperationException(SR.GetResourceString(SR.ID0242), exception))); } } @@ -653,7 +653,7 @@ namespace OpenIddict.EntityFramework if (exceptions is not null) { - throw new AggregateException(SR.GetResourceString(SR.ID1242), exceptions); + throw new AggregateException(SR.GetResourceString(SR.ID0243), exceptions); } } @@ -671,7 +671,7 @@ namespace OpenIddict.EntityFramework var application = await Applications.FindAsync(cancellationToken, ConvertIdentifierFromString(identifier)); if (application is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1243)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0244)); } authorization.Application = application; @@ -851,7 +851,7 @@ namespace OpenIddict.EntityFramework // Reset the state of the entity to prevents future calls to SaveChangesAsync() from failing. Context.Entry(authorization).State = EntityState.Unchanged; - throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID1240), exception); + throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0241), exception); } } diff --git a/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkScopeStore.cs b/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkScopeStore.cs index 9997775d..24cfa345 100644 --- a/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkScopeStore.cs +++ b/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkScopeStore.cs @@ -133,7 +133,7 @@ namespace OpenIddict.EntityFramework // 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.ID1244), exception); + throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0245), exception); } } @@ -142,7 +142,7 @@ namespace OpenIddict.EntityFramework { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } var key = ConvertIdentifierFromString(identifier); @@ -157,7 +157,7 @@ namespace OpenIddict.EntityFramework { if (string.IsNullOrEmpty(name)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1201), nameof(name)); + throw new ArgumentException(SR.GetResourceString(SR.ID0202), nameof(name)); } return await (from scope in Scopes @@ -171,7 +171,7 @@ namespace OpenIddict.EntityFramework { if (names.Any(name => string.IsNullOrEmpty(name))) { - throw new ArgumentException(SR.GetResourceString(SR.ID1202), nameof(names)); + throw new ArgumentException(SR.GetResourceString(SR.ID0203), nameof(names)); } // Note: Enumerable.Contains() is deliberately used without the extension method syntax to ensure @@ -187,7 +187,7 @@ namespace OpenIddict.EntityFramework { if (string.IsNullOrEmpty(resource)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1061), nameof(resource)); + throw new ArgumentException(SR.GetResourceString(SR.ID0062), nameof(resource)); } // To optimize the efficiency of the query a bit, only scopes whose stringified @@ -423,7 +423,7 @@ namespace OpenIddict.EntityFramework catch (MemberAccessException exception) { return new ValueTask(Task.FromException( - new InvalidOperationException(SR.GetResourceString(SR.ID1245), exception))); + new InvalidOperationException(SR.GetResourceString(SR.ID0246), exception))); } } @@ -677,7 +677,7 @@ namespace OpenIddict.EntityFramework // 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.ID1244), exception); + throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0245), exception); } } diff --git a/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkTokenStore.cs b/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkTokenStore.cs index e7b76620..2bbaa70b 100644 --- a/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkTokenStore.cs +++ b/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkTokenStore.cs @@ -149,7 +149,7 @@ namespace OpenIddict.EntityFramework // Reset the state of the entity to prevents future calls to SaveChangesAsync() from failing. Context.Entry(token).State = EntityState.Unchanged; - throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID1246), exception); + throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0247), exception); } } @@ -159,12 +159,12 @@ namespace OpenIddict.EntityFramework { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } var key = ConvertIdentifierFromString(client); @@ -182,17 +182,17 @@ namespace OpenIddict.EntityFramework { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } if (string.IsNullOrEmpty(status)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1198), nameof(status)); + throw new ArgumentException(SR.GetResourceString(SR.ID0199), nameof(status)); } var key = ConvertIdentifierFromString(client); @@ -211,22 +211,22 @@ namespace OpenIddict.EntityFramework { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } if (string.IsNullOrEmpty(status)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1198), nameof(status)); + throw new ArgumentException(SR.GetResourceString(SR.ID0199), nameof(status)); } if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1199), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0200), nameof(type)); } var key = ConvertIdentifierFromString(client); @@ -244,7 +244,7 @@ namespace OpenIddict.EntityFramework { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } var key = ConvertIdentifierFromString(identifier); @@ -259,7 +259,7 @@ namespace OpenIddict.EntityFramework { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } var key = ConvertIdentifierFromString(identifier); @@ -274,7 +274,7 @@ namespace OpenIddict.EntityFramework { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } var key = ConvertIdentifierFromString(identifier); @@ -289,7 +289,7 @@ namespace OpenIddict.EntityFramework { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } return await (from token in Tokens.Include(token => token.Application).Include(token => token.Authorization) @@ -302,7 +302,7 @@ namespace OpenIddict.EntityFramework { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } return (from token in Tokens.Include(token => token.Application).Include(token => token.Authorization) @@ -515,7 +515,7 @@ namespace OpenIddict.EntityFramework catch (MemberAccessException exception) { return new ValueTask(Task.FromException( - new InvalidOperationException(SR.GetResourceString(SR.ID1247), exception))); + new InvalidOperationException(SR.GetResourceString(SR.ID0248), exception))); } } @@ -623,7 +623,7 @@ namespace OpenIddict.EntityFramework if (exceptions is not null) { - throw new AggregateException(SR.GetResourceString(SR.ID1248), exceptions); + throw new AggregateException(SR.GetResourceString(SR.ID0249), exceptions); } } @@ -640,7 +640,7 @@ namespace OpenIddict.EntityFramework var application = await Applications.FindAsync(cancellationToken, ConvertIdentifierFromString(identifier)); if (application is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1249)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0250)); } token.Application = application; @@ -677,7 +677,7 @@ namespace OpenIddict.EntityFramework var authorization = await Authorizations.FindAsync(cancellationToken, ConvertIdentifierFromString(identifier)); if (authorization is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1250)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0251)); } token.Authorization = authorization; @@ -857,7 +857,7 @@ namespace OpenIddict.EntityFramework // Reset the state of the entity to prevents future calls to SaveChangesAsync() from failing. Context.Entry(token).State = EntityState.Unchanged; - throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID1246), exception); + throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0247), exception); } } diff --git a/src/OpenIddict.EntityFrameworkCore/OpenIddictEntityFrameworkCoreBuilder.cs b/src/OpenIddict.EntityFrameworkCore/OpenIddictEntityFrameworkCoreBuilder.cs index c1b3b648..93026fda 100644 --- a/src/OpenIddict.EntityFrameworkCore/OpenIddictEntityFrameworkCoreBuilder.cs +++ b/src/OpenIddict.EntityFrameworkCore/OpenIddictEntityFrameworkCoreBuilder.cs @@ -108,7 +108,7 @@ namespace Microsoft.Extensions.DependencyInjection if (!typeof(DbContext).IsAssignableFrom(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1231), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0232), nameof(type)); } return Configure(options => options.DbContextType = type); diff --git a/src/OpenIddict.EntityFrameworkCore/Resolvers/OpenIddictEntityFrameworkCoreApplicationStoreResolver.cs b/src/OpenIddict.EntityFrameworkCore/Resolvers/OpenIddictEntityFrameworkCoreApplicationStoreResolver.cs index ef8b7918..4d85e87b 100644 --- a/src/OpenIddict.EntityFrameworkCore/Resolvers/OpenIddictEntityFrameworkCoreApplicationStoreResolver.cs +++ b/src/OpenIddict.EntityFrameworkCore/Resolvers/OpenIddictEntityFrameworkCoreApplicationStoreResolver.cs @@ -53,13 +53,13 @@ namespace OpenIddict.EntityFrameworkCore var root = OpenIddictHelpers.FindGenericBaseType(key, typeof(OpenIddictEntityFrameworkCoreApplication<,,>)); if (root is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1251)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0252)); } var context = _options.CurrentValue.DbContextType; if (context is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1252)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0253)); } return typeof(OpenIddictEntityFrameworkCoreApplicationStore<,,,,>).MakeGenericType( diff --git a/src/OpenIddict.EntityFrameworkCore/Resolvers/OpenIddictEntityFrameworkCoreAuthorizationStoreResolver.cs b/src/OpenIddict.EntityFrameworkCore/Resolvers/OpenIddictEntityFrameworkCoreAuthorizationStoreResolver.cs index 28cfd55d..6b473389 100644 --- a/src/OpenIddict.EntityFrameworkCore/Resolvers/OpenIddictEntityFrameworkCoreAuthorizationStoreResolver.cs +++ b/src/OpenIddict.EntityFrameworkCore/Resolvers/OpenIddictEntityFrameworkCoreAuthorizationStoreResolver.cs @@ -53,13 +53,13 @@ namespace OpenIddict.EntityFrameworkCore var root = OpenIddictHelpers.FindGenericBaseType(key, typeof(OpenIddictEntityFrameworkCoreAuthorization<,,>)); if (root is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1253)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0254)); } var context = _options.CurrentValue.DbContextType; if (context is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1252)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0253)); } return typeof(OpenIddictEntityFrameworkCoreAuthorizationStore<,,,,>).MakeGenericType( diff --git a/src/OpenIddict.EntityFrameworkCore/Resolvers/OpenIddictEntityFrameworkCoreScopeStoreResolver.cs b/src/OpenIddict.EntityFrameworkCore/Resolvers/OpenIddictEntityFrameworkCoreScopeStoreResolver.cs index 66fdedc5..ba27f58a 100644 --- a/src/OpenIddict.EntityFrameworkCore/Resolvers/OpenIddictEntityFrameworkCoreScopeStoreResolver.cs +++ b/src/OpenIddict.EntityFrameworkCore/Resolvers/OpenIddictEntityFrameworkCoreScopeStoreResolver.cs @@ -53,13 +53,13 @@ namespace OpenIddict.EntityFrameworkCore var root = OpenIddictHelpers.FindGenericBaseType(key, typeof(OpenIddictEntityFrameworkCoreScope<>)); if (root is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1254)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0255)); } var context = _options.CurrentValue.DbContextType; if (context is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1252)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0253)); } return typeof(OpenIddictEntityFrameworkCoreScopeStore<,,>).MakeGenericType( diff --git a/src/OpenIddict.EntityFrameworkCore/Resolvers/OpenIddictEntityFrameworkCoreTokenStoreResolver.cs b/src/OpenIddict.EntityFrameworkCore/Resolvers/OpenIddictEntityFrameworkCoreTokenStoreResolver.cs index 95190193..98638401 100644 --- a/src/OpenIddict.EntityFrameworkCore/Resolvers/OpenIddictEntityFrameworkCoreTokenStoreResolver.cs +++ b/src/OpenIddict.EntityFrameworkCore/Resolvers/OpenIddictEntityFrameworkCoreTokenStoreResolver.cs @@ -53,13 +53,13 @@ namespace OpenIddict.EntityFrameworkCore var root = OpenIddictHelpers.FindGenericBaseType(key, typeof(OpenIddictEntityFrameworkCoreToken<,,>)); if (root is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1255)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0256)); } var context = _options.CurrentValue.DbContextType; if (context is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1252)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0253)); } return typeof(OpenIddictEntityFrameworkCoreTokenStore<,,,,>).MakeGenericType( diff --git a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreApplicationStore.cs b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreApplicationStore.cs index ef4e5f9e..7ebfb481 100644 --- a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreApplicationStore.cs +++ b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreApplicationStore.cs @@ -261,7 +261,7 @@ namespace OpenIddict.EntityFrameworkCore Context.Entry(token).State = EntityState.Unchanged; } - throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID1238), exception); + throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0239), exception); } } @@ -270,7 +270,7 @@ namespace OpenIddict.EntityFrameworkCore { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } return await (from application in Applications.AsTracking() @@ -283,7 +283,7 @@ namespace OpenIddict.EntityFrameworkCore { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } var key = ConvertIdentifierFromString(identifier); @@ -299,7 +299,7 @@ namespace OpenIddict.EntityFrameworkCore { if (string.IsNullOrEmpty(address)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1142), nameof(address)); + throw new ArgumentException(SR.GetResourceString(SR.ID0143), nameof(address)); } // To optimize the efficiency of the query a bit, only applications whose stringified @@ -333,7 +333,7 @@ namespace OpenIddict.EntityFrameworkCore { if (string.IsNullOrEmpty(address)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1142), nameof(address)); + throw new ArgumentException(SR.GetResourceString(SR.ID0143), nameof(address)); } // To optimize the efficiency of the query a bit, only applications whose stringified @@ -661,7 +661,7 @@ namespace OpenIddict.EntityFrameworkCore catch (MemberAccessException exception) { return new ValueTask(Task.FromException( - new InvalidOperationException(SR.GetResourceString(SR.ID1239), exception))); + new InvalidOperationException(SR.GetResourceString(SR.ID0240), exception))); } } @@ -1015,7 +1015,7 @@ namespace OpenIddict.EntityFrameworkCore // Reset the state of the entity to prevents future calls to SaveChangesAsync() from failing. Context.Entry(application).State = EntityState.Unchanged; - throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID1238), exception); + throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0239), exception); } } diff --git a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreAuthorizationStore.cs b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreAuthorizationStore.cs index 79759f3d..dc817452 100644 --- a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreAuthorizationStore.cs +++ b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreAuthorizationStore.cs @@ -223,7 +223,7 @@ namespace OpenIddict.EntityFrameworkCore Context.Entry(token).State = EntityState.Unchanged; } - throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID1240), exception); + throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0241), exception); } } @@ -233,12 +233,12 @@ namespace OpenIddict.EntityFrameworkCore { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } // Note: due to a bug in Entity Framework Core's query visitor, the authorizations can't be @@ -262,17 +262,17 @@ namespace OpenIddict.EntityFrameworkCore { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } if (string.IsNullOrEmpty(status)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1198), nameof(status)); + throw new ArgumentException(SR.GetResourceString(SR.ID0199), nameof(status)); } // Note: due to a bug in Entity Framework Core's query visitor, the authorizations can't be @@ -296,22 +296,22 @@ namespace OpenIddict.EntityFrameworkCore { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } if (string.IsNullOrEmpty(status)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1198), nameof(status)); + throw new ArgumentException(SR.GetResourceString(SR.ID0199), nameof(status)); } if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1199), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0200), nameof(type)); } // Note: due to a bug in Entity Framework Core's query visitor, the authorizations can't be @@ -338,22 +338,22 @@ namespace OpenIddict.EntityFrameworkCore { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } if (string.IsNullOrEmpty(status)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1198), nameof(status)); + throw new ArgumentException(SR.GetResourceString(SR.ID0199), nameof(status)); } if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1199), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0200), nameof(type)); } return ExecuteAsync(cancellationToken); @@ -391,7 +391,7 @@ namespace OpenIddict.EntityFrameworkCore { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } // Note: due to a bug in Entity Framework Core's query visitor, the authorizations can't be @@ -412,7 +412,7 @@ namespace OpenIddict.EntityFrameworkCore { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } var key = ConvertIdentifierFromString(identifier); @@ -428,7 +428,7 @@ namespace OpenIddict.EntityFrameworkCore { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } return (from authorization in Authorizations.Include(authorization => authorization.Application).AsTracking() @@ -615,7 +615,7 @@ namespace OpenIddict.EntityFrameworkCore catch (MemberAccessException exception) { return new ValueTask(Task.FromException( - new InvalidOperationException(SR.GetResourceString(SR.ID1241), exception))); + new InvalidOperationException(SR.GetResourceString(SR.ID0242), exception))); } } @@ -733,7 +733,7 @@ namespace OpenIddict.EntityFrameworkCore if (exceptions is not null) { - throw new AggregateException(SR.GetResourceString(SR.ID1242), exceptions); + throw new AggregateException(SR.GetResourceString(SR.ID0243), exceptions); } } @@ -757,7 +757,7 @@ namespace OpenIddict.EntityFrameworkCore if (application is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1243)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0244)); } authorization.Application = application; @@ -940,7 +940,7 @@ namespace OpenIddict.EntityFrameworkCore // Reset the state of the entity to prevents future calls to SaveChangesAsync() from failing. Context.Entry(authorization).State = EntityState.Unchanged; - throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID1240), exception); + throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0241), exception); } } diff --git a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreScopeStore.cs b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreScopeStore.cs index 2db4effc..85d26cce 100644 --- a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreScopeStore.cs +++ b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreScopeStore.cs @@ -149,7 +149,7 @@ namespace OpenIddict.EntityFrameworkCore // 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.ID1244), exception); + throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0245), exception); } } @@ -158,7 +158,7 @@ namespace OpenIddict.EntityFrameworkCore { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } var key = ConvertIdentifierFromString(identifier); @@ -173,7 +173,7 @@ namespace OpenIddict.EntityFrameworkCore { if (string.IsNullOrEmpty(name)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1201), nameof(name)); + throw new ArgumentException(SR.GetResourceString(SR.ID0202), nameof(name)); } return await (from scope in Scopes.AsTracking() @@ -187,7 +187,7 @@ namespace OpenIddict.EntityFrameworkCore { if (names.Any(name => string.IsNullOrEmpty(name))) { - throw new ArgumentException(SR.GetResourceString(SR.ID1202), nameof(names)); + throw new ArgumentException(SR.GetResourceString(SR.ID0203), nameof(names)); } // Note: Enumerable.Contains() is deliberately used without the extension method syntax to ensure @@ -203,7 +203,7 @@ namespace OpenIddict.EntityFrameworkCore { if (string.IsNullOrEmpty(resource)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1061), nameof(resource)); + throw new ArgumentException(SR.GetResourceString(SR.ID0062), nameof(resource)); } // To optimize the efficiency of the query a bit, only scopes whose stringified @@ -439,7 +439,7 @@ namespace OpenIddict.EntityFrameworkCore catch (MemberAccessException exception) { return new ValueTask(Task.FromException( - new InvalidOperationException(SR.GetResourceString(SR.ID1245), exception))); + new InvalidOperationException(SR.GetResourceString(SR.ID0246), exception))); } } @@ -693,7 +693,7 @@ namespace OpenIddict.EntityFrameworkCore // 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.ID1244), exception); + throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0245), exception); } } diff --git a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreTokenStore.cs b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreTokenStore.cs index 0a8559fc..29c101f5 100644 --- a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreTokenStore.cs +++ b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreTokenStore.cs @@ -171,7 +171,7 @@ namespace OpenIddict.EntityFrameworkCore // Reset the state of the entity to prevents future calls to SaveChangesAsync() from failing. Context.Entry(token).State = EntityState.Unchanged; - throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID1246), exception); + throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0247), exception); } } @@ -180,12 +180,12 @@ namespace OpenIddict.EntityFrameworkCore { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } // Note: due to a bug in Entity Framework Core's query visitor, the authorizations can't be @@ -209,17 +209,17 @@ namespace OpenIddict.EntityFrameworkCore { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } if (string.IsNullOrEmpty(status)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1198), nameof(status)); + throw new ArgumentException(SR.GetResourceString(SR.ID0199), nameof(status)); } // Note: due to a bug in Entity Framework Core's query visitor, the authorizations can't be @@ -244,22 +244,22 @@ namespace OpenIddict.EntityFrameworkCore { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } if (string.IsNullOrEmpty(status)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1198), nameof(status)); + throw new ArgumentException(SR.GetResourceString(SR.ID0199), nameof(status)); } if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1199), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0200), nameof(type)); } // Note: due to a bug in Entity Framework Core's query visitor, the authorizations can't be @@ -283,7 +283,7 @@ namespace OpenIddict.EntityFrameworkCore { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } // Note: due to a bug in Entity Framework Core's query visitor, the tokens can't be @@ -304,7 +304,7 @@ namespace OpenIddict.EntityFrameworkCore { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } // Note: due to a bug in Entity Framework Core's query visitor, the tokens can't be @@ -325,7 +325,7 @@ namespace OpenIddict.EntityFrameworkCore { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } var key = ConvertIdentifierFromString(identifier); @@ -340,7 +340,7 @@ namespace OpenIddict.EntityFrameworkCore { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } return await (from token in Tokens.Include(token => token.Application).Include(token => token.Authorization).AsTracking() @@ -353,7 +353,7 @@ namespace OpenIddict.EntityFrameworkCore { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } return (from token in Tokens.Include(token => token.Application).Include(token => token.Authorization).AsTracking() @@ -567,7 +567,7 @@ namespace OpenIddict.EntityFrameworkCore catch (MemberAccessException exception) { return new ValueTask(Task.FromException( - new InvalidOperationException(SR.GetResourceString(SR.ID1247), exception))); + new InvalidOperationException(SR.GetResourceString(SR.ID0248), exception))); } } @@ -686,7 +686,7 @@ namespace OpenIddict.EntityFrameworkCore if (exceptions is not null) { - throw new AggregateException(SR.GetResourceString(SR.ID1248), exceptions); + throw new AggregateException(SR.GetResourceString(SR.ID0249), exceptions); } } @@ -709,7 +709,7 @@ namespace OpenIddict.EntityFrameworkCore if (application is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1249)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0250)); } token.Application = application; @@ -752,7 +752,7 @@ namespace OpenIddict.EntityFrameworkCore if (authorization is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1250)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0251)); } token.Authorization = authorization; @@ -932,7 +932,7 @@ namespace OpenIddict.EntityFrameworkCore // Reset the state of the entity to prevents future calls to SaveChangesAsync() from failing. Context.Entry(token).State = EntityState.Unchanged; - throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID1246), exception); + throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0247), exception); } } diff --git a/src/OpenIddict.MongoDb/OpenIddictMongoDbBuilder.cs b/src/OpenIddict.MongoDb/OpenIddictMongoDbBuilder.cs index 445c3652..b68ec59f 100644 --- a/src/OpenIddict.MongoDb/OpenIddictMongoDbBuilder.cs +++ b/src/OpenIddict.MongoDb/OpenIddictMongoDbBuilder.cs @@ -107,7 +107,7 @@ namespace Microsoft.Extensions.DependencyInjection { if (string.IsNullOrEmpty(name)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1260), nameof(name)); + throw new ArgumentException(SR.GetResourceString(SR.ID0261), nameof(name)); } return Configure(options => options.ApplicationsCollectionName = name); @@ -122,7 +122,7 @@ namespace Microsoft.Extensions.DependencyInjection { if (string.IsNullOrEmpty(name)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1260), nameof(name)); + throw new ArgumentException(SR.GetResourceString(SR.ID0261), nameof(name)); } return Configure(options => options.AuthorizationsCollectionName = name); @@ -137,7 +137,7 @@ namespace Microsoft.Extensions.DependencyInjection { if (string.IsNullOrEmpty(name)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1260), nameof(name)); + throw new ArgumentException(SR.GetResourceString(SR.ID0261), nameof(name)); } return Configure(options => options.ScopesCollectionName = name); @@ -152,7 +152,7 @@ namespace Microsoft.Extensions.DependencyInjection { if (string.IsNullOrEmpty(name)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1260), nameof(name)); + throw new ArgumentException(SR.GetResourceString(SR.ID0261), nameof(name)); } return Configure(options => options.TokensCollectionName = name); diff --git a/src/OpenIddict.MongoDb/OpenIddictMongoDbContext.cs b/src/OpenIddict.MongoDb/OpenIddictMongoDbContext.cs index ceec6a7b..82c5e4ec 100644 --- a/src/OpenIddict.MongoDb/OpenIddictMongoDbContext.cs +++ b/src/OpenIddict.MongoDb/OpenIddictMongoDbContext.cs @@ -45,7 +45,7 @@ namespace OpenIddict.MongoDb if (database is null) { return new ValueTask(Task.FromException( - new InvalidOperationException(SR.GetResourceString(SR.ID1261)))); + new InvalidOperationException(SR.GetResourceString(SR.ID0262)))); } return new ValueTask(database); diff --git a/src/OpenIddict.MongoDb/Resolvers/OpenIddictMongoDbApplicationStoreResolver.cs b/src/OpenIddict.MongoDb/Resolvers/OpenIddictMongoDbApplicationStoreResolver.cs index 5ad11b1c..35c60ab7 100644 --- a/src/OpenIddict.MongoDb/Resolvers/OpenIddictMongoDbApplicationStoreResolver.cs +++ b/src/OpenIddict.MongoDb/Resolvers/OpenIddictMongoDbApplicationStoreResolver.cs @@ -42,7 +42,7 @@ namespace OpenIddict.MongoDb { if (!typeof(OpenIddictMongoDbApplication).IsAssignableFrom(key)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1256)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0257)); } return typeof(OpenIddictMongoDbApplicationStore<>).MakeGenericType(key); diff --git a/src/OpenIddict.MongoDb/Resolvers/OpenIddictMongoDbAuthorizationStoreResolver.cs b/src/OpenIddict.MongoDb/Resolvers/OpenIddictMongoDbAuthorizationStoreResolver.cs index 6095ae5c..45039b31 100644 --- a/src/OpenIddict.MongoDb/Resolvers/OpenIddictMongoDbAuthorizationStoreResolver.cs +++ b/src/OpenIddict.MongoDb/Resolvers/OpenIddictMongoDbAuthorizationStoreResolver.cs @@ -42,7 +42,7 @@ namespace OpenIddict.MongoDb { if (!typeof(OpenIddictMongoDbAuthorization).IsAssignableFrom(key)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1257)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0258)); } return typeof(OpenIddictMongoDbAuthorizationStore<>).MakeGenericType(key); diff --git a/src/OpenIddict.MongoDb/Resolvers/OpenIddictMongoDbScopeStoreResolver.cs b/src/OpenIddict.MongoDb/Resolvers/OpenIddictMongoDbScopeStoreResolver.cs index 37e926d1..f1336e47 100644 --- a/src/OpenIddict.MongoDb/Resolvers/OpenIddictMongoDbScopeStoreResolver.cs +++ b/src/OpenIddict.MongoDb/Resolvers/OpenIddictMongoDbScopeStoreResolver.cs @@ -42,7 +42,7 @@ namespace OpenIddict.MongoDb { if (!typeof(OpenIddictMongoDbScope).IsAssignableFrom(key)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1258)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0259)); } return typeof(OpenIddictMongoDbScopeStore<>).MakeGenericType(key); diff --git a/src/OpenIddict.MongoDb/Resolvers/OpenIddictMongoDbTokenStoreResolver.cs b/src/OpenIddict.MongoDb/Resolvers/OpenIddictMongoDbTokenStoreResolver.cs index 8fd8bbf8..28432394 100644 --- a/src/OpenIddict.MongoDb/Resolvers/OpenIddictMongoDbTokenStoreResolver.cs +++ b/src/OpenIddict.MongoDb/Resolvers/OpenIddictMongoDbTokenStoreResolver.cs @@ -42,7 +42,7 @@ namespace OpenIddict.MongoDb { if (!typeof(OpenIddictMongoDbToken).IsAssignableFrom(key)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1259)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0260)); } return typeof(OpenIddictMongoDbTokenStore<>).MakeGenericType(key); diff --git a/src/OpenIddict.MongoDb/Stores/OpenIddictMongoDbApplicationStore.cs b/src/OpenIddict.MongoDb/Stores/OpenIddictMongoDbApplicationStore.cs index 16d708dd..60780695 100644 --- a/src/OpenIddict.MongoDb/Stores/OpenIddictMongoDbApplicationStore.cs +++ b/src/OpenIddict.MongoDb/Stores/OpenIddictMongoDbApplicationStore.cs @@ -104,7 +104,7 @@ namespace OpenIddict.MongoDb entity.Id == application.Id && entity.ConcurrencyToken == application.ConcurrencyToken)).DeletedCount == 0) { - throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID1238)); + throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0239)); } // Delete the authorizations associated with the application. @@ -121,7 +121,7 @@ namespace OpenIddict.MongoDb { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } var database = await Context.GetDatabaseAsync(cancellationToken); @@ -135,7 +135,7 @@ namespace OpenIddict.MongoDb { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } var database = await Context.GetDatabaseAsync(cancellationToken); @@ -151,7 +151,7 @@ namespace OpenIddict.MongoDb { if (string.IsNullOrEmpty(address)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1142), nameof(address)); + throw new ArgumentException(SR.GetResourceString(SR.ID0143), nameof(address)); } return ExecuteAsync(cancellationToken); @@ -175,7 +175,7 @@ namespace OpenIddict.MongoDb { if (string.IsNullOrEmpty(address)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1142), nameof(address)); + throw new ArgumentException(SR.GetResourceString(SR.ID0143), nameof(address)); } return ExecuteAsync(cancellationToken); @@ -393,7 +393,7 @@ namespace OpenIddict.MongoDb catch (MemberAccessException exception) { return new ValueTask(Task.FromException( - new InvalidOperationException(SR.GetResourceString(SR.ID1239), exception))); + new InvalidOperationException(SR.GetResourceString(SR.ID0240), exception))); } } @@ -672,7 +672,7 @@ namespace OpenIddict.MongoDb entity.Id == application.Id && entity.ConcurrencyToken == timestamp, application, null as ReplaceOptions, cancellationToken)).MatchedCount == 0) { - throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID1238)); + throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0239)); } } } diff --git a/src/OpenIddict.MongoDb/Stores/OpenIddictMongoDbAuthorizationStore.cs b/src/OpenIddict.MongoDb/Stores/OpenIddictMongoDbAuthorizationStore.cs index 6354efcb..56a7f5a4 100644 --- a/src/OpenIddict.MongoDb/Stores/OpenIddictMongoDbAuthorizationStore.cs +++ b/src/OpenIddict.MongoDb/Stores/OpenIddictMongoDbAuthorizationStore.cs @@ -103,7 +103,7 @@ namespace OpenIddict.MongoDb entity.Id == authorization.Id && entity.ConcurrencyToken == authorization.ConcurrencyToken)).DeletedCount == 0) { - throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID1240)); + throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0241)); } // Delete the tokens associated with the authorization. @@ -117,12 +117,12 @@ namespace OpenIddict.MongoDb { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } return ExecuteAsync(cancellationToken); @@ -148,17 +148,17 @@ namespace OpenIddict.MongoDb { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } if (string.IsNullOrEmpty(status)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1198), nameof(status)); + throw new ArgumentException(SR.GetResourceString(SR.ID0199), nameof(status)); } return ExecuteAsync(cancellationToken); @@ -185,22 +185,22 @@ namespace OpenIddict.MongoDb { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } if (string.IsNullOrEmpty(status)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1198), nameof(status)); + throw new ArgumentException(SR.GetResourceString(SR.ID0199), nameof(status)); } if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1199), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0200), nameof(type)); } return ExecuteAsync(cancellationToken); @@ -229,22 +229,22 @@ namespace OpenIddict.MongoDb { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } if (string.IsNullOrEmpty(status)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1198), nameof(status)); + throw new ArgumentException(SR.GetResourceString(SR.ID0199), nameof(status)); } if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1199), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0200), nameof(type)); } return ExecuteAsync(cancellationToken); @@ -274,7 +274,7 @@ namespace OpenIddict.MongoDb { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } return ExecuteAsync(cancellationToken); @@ -297,7 +297,7 @@ namespace OpenIddict.MongoDb { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } var database = await Context.GetDatabaseAsync(cancellationToken); @@ -313,7 +313,7 @@ namespace OpenIddict.MongoDb { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } return ExecuteAsync(cancellationToken); @@ -469,7 +469,7 @@ namespace OpenIddict.MongoDb catch (MemberAccessException exception) { return new ValueTask(Task.FromException( - new InvalidOperationException(SR.GetResourceString(SR.ID1241), exception))); + new InvalidOperationException(SR.GetResourceString(SR.ID0242), exception))); } } @@ -727,7 +727,7 @@ namespace OpenIddict.MongoDb entity.Id == authorization.Id && entity.ConcurrencyToken == timestamp, authorization, null as ReplaceOptions, cancellationToken)).MatchedCount == 0) { - throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID1240)); + throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0241)); } } } diff --git a/src/OpenIddict.MongoDb/Stores/OpenIddictMongoDbScopeStore.cs b/src/OpenIddict.MongoDb/Stores/OpenIddictMongoDbScopeStore.cs index 9dc91b9d..d1de7a8c 100644 --- a/src/OpenIddict.MongoDb/Stores/OpenIddictMongoDbScopeStore.cs +++ b/src/OpenIddict.MongoDb/Stores/OpenIddictMongoDbScopeStore.cs @@ -104,7 +104,7 @@ namespace OpenIddict.MongoDb entity.Id == scope.Id && entity.ConcurrencyToken == scope.ConcurrencyToken)).DeletedCount == 0) { - throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID1244)); + throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0245)); } } @@ -113,7 +113,7 @@ namespace OpenIddict.MongoDb { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } var database = await Context.GetDatabaseAsync(cancellationToken); @@ -127,7 +127,7 @@ namespace OpenIddict.MongoDb { if (string.IsNullOrEmpty(name)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1201), nameof(name)); + throw new ArgumentException(SR.GetResourceString(SR.ID0202), nameof(name)); } var database = await Context.GetDatabaseAsync(cancellationToken); @@ -141,7 +141,7 @@ namespace OpenIddict.MongoDb { if (names.Any(name => string.IsNullOrEmpty(name))) { - throw new ArgumentException(SR.GetResourceString(SR.ID1202), nameof(names)); + throw new ArgumentException(SR.GetResourceString(SR.ID0203), nameof(names)); } return ExecuteAsync(cancellationToken); @@ -165,7 +165,7 @@ namespace OpenIddict.MongoDb { if (string.IsNullOrEmpty(resource)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1061), nameof(resource)); + throw new ArgumentException(SR.GetResourceString(SR.ID0062), nameof(resource)); } return ExecuteAsync(cancellationToken); @@ -325,7 +325,7 @@ namespace OpenIddict.MongoDb catch (MemberAccessException exception) { return new ValueTask(Task.FromException( - new InvalidOperationException(SR.GetResourceString(SR.ID1245), exception))); + new InvalidOperationException(SR.GetResourceString(SR.ID0246), exception))); } } @@ -524,7 +524,7 @@ namespace OpenIddict.MongoDb entity.Id == scope.Id && entity.ConcurrencyToken == timestamp, scope, null as ReplaceOptions, cancellationToken)).MatchedCount == 0) { - throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID1244)); + throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0245)); } } } diff --git a/src/OpenIddict.MongoDb/Stores/OpenIddictMongoDbTokenStore.cs b/src/OpenIddict.MongoDb/Stores/OpenIddictMongoDbTokenStore.cs index 7116af99..fc3883cd 100644 --- a/src/OpenIddict.MongoDb/Stores/OpenIddictMongoDbTokenStore.cs +++ b/src/OpenIddict.MongoDb/Stores/OpenIddictMongoDbTokenStore.cs @@ -104,7 +104,7 @@ namespace OpenIddict.MongoDb entity.Id == token.Id && entity.ConcurrencyToken == token.ConcurrencyToken)).DeletedCount == 0) { - throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID1246)); + throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0247)); } } @@ -114,12 +114,12 @@ namespace OpenIddict.MongoDb { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } return ExecuteAsync(cancellationToken); @@ -145,17 +145,17 @@ namespace OpenIddict.MongoDb { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } if (string.IsNullOrEmpty(status)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1198), nameof(status)); + throw new ArgumentException(SR.GetResourceString(SR.ID0199), nameof(status)); } return ExecuteAsync(cancellationToken); @@ -182,22 +182,22 @@ namespace OpenIddict.MongoDb { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } if (string.IsNullOrEmpty(client)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(client)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(client)); } if (string.IsNullOrEmpty(status)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1198), nameof(status)); + throw new ArgumentException(SR.GetResourceString(SR.ID0199), nameof(status)); } if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1199), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0200), nameof(type)); } return ExecuteAsync(cancellationToken); @@ -223,7 +223,7 @@ namespace OpenIddict.MongoDb { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } return ExecuteAsync(cancellationToken); @@ -246,7 +246,7 @@ namespace OpenIddict.MongoDb { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } return ExecuteAsync(cancellationToken); @@ -269,7 +269,7 @@ namespace OpenIddict.MongoDb { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } var database = await Context.GetDatabaseAsync(cancellationToken); @@ -283,7 +283,7 @@ namespace OpenIddict.MongoDb { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1194), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0195), nameof(identifier)); } var database = await Context.GetDatabaseAsync(cancellationToken); @@ -297,7 +297,7 @@ namespace OpenIddict.MongoDb { if (string.IsNullOrEmpty(subject)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1197), nameof(subject)); + throw new ArgumentException(SR.GetResourceString(SR.ID0198), nameof(subject)); } return ExecuteAsync(cancellationToken); @@ -485,7 +485,7 @@ namespace OpenIddict.MongoDb catch (MemberAccessException exception) { return new ValueTask(Task.FromException( - new InvalidOperationException(SR.GetResourceString(SR.ID1247), exception))); + new InvalidOperationException(SR.GetResourceString(SR.ID0248), exception))); } } @@ -781,7 +781,7 @@ namespace OpenIddict.MongoDb entity.Id == token.Id && entity.ConcurrencyToken == timestamp, token, null as ReplaceOptions, cancellationToken)).MatchedCount == 0) { - throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID1246)); + throw new OpenIddictExceptions.ConcurrencyException(SR.GetResourceString(SR.ID0247)); } } } diff --git a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreBuilder.cs b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreBuilder.cs index f823a0a5..d898a06b 100644 --- a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreBuilder.cs +++ b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreBuilder.cs @@ -158,7 +158,7 @@ namespace Microsoft.Extensions.DependencyInjection { if (string.IsNullOrEmpty(realm)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1106), nameof(realm)); + throw new ArgumentException(SR.GetResourceString(SR.ID0107), nameof(realm)); } return Configure(options => options.Realm = realm); diff --git a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreConfiguration.cs b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreConfiguration.cs index 8edf836d..72aaf11e 100644 --- a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreConfiguration.cs +++ b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreConfiguration.cs @@ -35,7 +35,7 @@ namespace OpenIddict.Server.AspNetCore if (options.SchemeMap.TryGetValue(OpenIddictServerAspNetCoreDefaults.AuthenticationScheme, out var builder) && builder.HandlerType != typeof(OpenIddictServerAspNetCoreHandler)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1107)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0108)); } options.AddScheme( @@ -72,7 +72,7 @@ namespace OpenIddict.Server.AspNetCore !TryValidate(options.SchemeMap, options.DefaultSignInScheme) || !TryValidate(options.SchemeMap, options.DefaultSignOutScheme)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1108)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0109)); } static bool TryValidate(IDictionary map, string? scheme) @@ -102,7 +102,7 @@ namespace OpenIddict.Server.AspNetCore if (options.EnableErrorPassthrough && options.EnableStatusCodePagesIntegration) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1109)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0110)); } } } diff --git a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandler.cs b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandler.cs index 7cc7cd33..2dccc01d 100644 --- a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandler.cs +++ b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandler.cs @@ -102,7 +102,7 @@ namespace OpenIddict.Server.AspNetCore return false; } - throw new InvalidOperationException(SR.GetResourceString(SR.ID1110)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0111)); } return false; @@ -112,7 +112,7 @@ namespace OpenIddict.Server.AspNetCore protected override async Task HandleAuthenticateAsync() { var transaction = Context.Features.Get()?.Transaction ?? - throw new InvalidOperationException(SR.GetResourceString(SR.ID1111)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0112)); // Note: in many cases, the authentication token was already validated by the time this action is called // (generally later in the pipeline, when using the pass-through mode). To avoid having to re-validate it, @@ -150,14 +150,14 @@ namespace OpenIddict.Server.AspNetCore [OpenIddictServerAspNetCoreConstants.Properties.ErrorUri] = context.ErrorUri }); - return AuthenticateResult.Fail(SR.GetResourceString(SR.ID1112), properties); + return AuthenticateResult.Fail(SR.GetResourceString(SR.ID0113), properties); } else { - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); - Debug.Assert(!string.IsNullOrEmpty(context.Principal.GetTokenType()), SR.GetResourceString(SR.ID5009)); - Debug.Assert(!string.IsNullOrEmpty(context.Token), SR.GetResourceString(SR.ID5010)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); + Debug.Assert(!string.IsNullOrEmpty(context.Principal.GetTokenType()), SR.GetResourceString(SR.ID4009)); + Debug.Assert(!string.IsNullOrEmpty(context.Token), SR.GetResourceString(SR.ID4010)); // Store the token to allow any OWIN/Katana component (e.g a controller) // to retrieve it (e.g to make an API request to another application). @@ -181,7 +181,7 @@ namespace OpenIddict.Server.AspNetCore protected override async Task HandleChallengeAsync(AuthenticationProperties? properties) { var transaction = Context.Features.Get()?.Transaction ?? - throw new InvalidOperationException(SR.GetResourceString(SR.ID1111)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0112)); transaction.Properties[typeof(AuthenticationProperties).FullName!] = properties ?? new AuthenticationProperties(); @@ -216,7 +216,7 @@ namespace OpenIddict.Server.AspNetCore return; } - throw new InvalidOperationException(SR.GetResourceString(SR.ID1110)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0111)); } } @@ -233,7 +233,7 @@ namespace OpenIddict.Server.AspNetCore } var transaction = Context.Features.Get()?.Transaction ?? - throw new InvalidOperationException(SR.GetResourceString(SR.ID1111)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0112)); transaction.Properties[typeof(AuthenticationProperties).FullName!] = properties ?? new AuthenticationProperties(); @@ -269,7 +269,7 @@ namespace OpenIddict.Server.AspNetCore return; } - throw new InvalidOperationException(SR.GetResourceString(SR.ID1110)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0111)); } } @@ -277,7 +277,7 @@ namespace OpenIddict.Server.AspNetCore public async Task SignOutAsync(AuthenticationProperties? properties) { var transaction = Context.Features.Get()?.Transaction ?? - throw new InvalidOperationException(SR.GetResourceString(SR.ID1111)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0112)); var context = new ProcessSignOutContext(transaction) { @@ -312,7 +312,7 @@ namespace OpenIddict.Server.AspNetCore return; } - throw new InvalidOperationException(SR.GetResourceString(SR.ID1110)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0111)); } } } diff --git a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.Authentication.cs b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.Authentication.cs index bad76c91..e9973394 100644 --- a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.Authentication.cs +++ b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.Authentication.cs @@ -70,7 +70,7 @@ namespace OpenIddict.Server.AspNetCore { private readonly IDistributedCache _cache; - public RestoreCachedRequestParameters() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1115)); + public RestoreCachedRequestParameters() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0116)); public RestoreCachedRequestParameters(IDistributedCache cache) => _cache = cache; @@ -95,7 +95,7 @@ namespace OpenIddict.Server.AspNetCore throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Request is not null, SR.GetResourceString(SR.ID5008)); + Debug.Assert(context.Request is not null, SR.GetResourceString(SR.ID4008)); // If a request_id parameter can be found in the authorization request, // restore the complete authorization request from the distributed cache. @@ -110,11 +110,11 @@ namespace OpenIddict.Server.AspNetCore var token = await _cache.GetStringAsync(Cache.AuthorizationRequest + context.Request.RequestId); if (token is null || !context.Options.JsonWebTokenHandler.CanReadToken(token)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7146), Parameters.RequestId); + context.Logger.LogError(SR.GetResourceString(SR.ID6146), Parameters.RequestId); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3052, Parameters.RequestId]); + description: context.Localizer[SR.ID2052, Parameters.RequestId]); return; } @@ -127,11 +127,11 @@ namespace OpenIddict.Server.AspNetCore var result = context.Options.JsonWebTokenHandler.ValidateToken(token, parameters); if (!result.IsValid) { - context.Logger.LogError(SR.GetResourceString(SR.ID7146), Parameters.RequestId); + context.Logger.LogError(SR.GetResourceString(SR.ID6146), Parameters.RequestId); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3052, Parameters.RequestId]); + description: context.Localizer[SR.ID2052, Parameters.RequestId]); return; } @@ -140,7 +140,7 @@ namespace OpenIddict.Server.AspNetCore Base64UrlEncoder.Decode(((JsonWebToken) result.SecurityToken).InnerToken.EncodedPayload)); if (document.RootElement.ValueKind != JsonValueKind.Object) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1116)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0117)); } // Restore the authorization request parameters from the serialized payload. @@ -166,7 +166,7 @@ namespace OpenIddict.Server.AspNetCore private readonly IDistributedCache _cache; private readonly IOptionsMonitor _options; - public CacheRequestParameters() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1115)); + public CacheRequestParameters() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0116)); public CacheRequestParameters( IDistributedCache cache, @@ -196,14 +196,14 @@ namespace OpenIddict.Server.AspNetCore throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Request is not null, SR.GetResourceString(SR.ID5008)); + Debug.Assert(context.Request is not null, SR.GetResourceString(SR.ID4008)); // This handler only applies to ASP.NET Core requests. If the HTTP context cannot be resolved, // this may indicate that the request was incorrectly processed by another server stack. var request = context.Transaction.GetHttpRequest(); if (request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1113)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0114)); } // Don't cache the request if the request doesn't include any parameter. @@ -275,7 +275,7 @@ namespace OpenIddict.Server.AspNetCore { private readonly IDistributedCache _cache; - public RemoveCachedRequest() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1115)); + public RemoveCachedRequest() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0116)); public RemoveCachedRequest(IDistributedCache cache) => _cache = cache; @@ -350,7 +350,7 @@ namespace OpenIddict.Server.AspNetCore var response = context.Transaction.GetHttpRequest()?.HttpContext.Response; if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1113)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0114)); } if (string.IsNullOrEmpty(context.RedirectUri) || @@ -359,7 +359,7 @@ namespace OpenIddict.Server.AspNetCore return; } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7147), context.RedirectUri, context.Response); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6147), context.RedirectUri, context.Response); using (var buffer = new MemoryStream()) using (var writer = new StreamWriter(buffer)) @@ -440,7 +440,7 @@ namespace OpenIddict.Server.AspNetCore var response = context.Transaction.GetHttpRequest()?.HttpContext.Response; if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1113)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0114)); } if (string.IsNullOrEmpty(context.RedirectUri) || @@ -449,7 +449,7 @@ namespace OpenIddict.Server.AspNetCore return default; } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7148), context.RedirectUri, context.Response); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6148), context.RedirectUri, context.Response); var location = context.RedirectUri; @@ -504,7 +504,7 @@ namespace OpenIddict.Server.AspNetCore var response = context.Transaction.GetHttpRequest()?.HttpContext.Response; if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1113)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0114)); } if (string.IsNullOrEmpty(context.RedirectUri) || @@ -513,7 +513,7 @@ namespace OpenIddict.Server.AspNetCore return default; } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7149), context.RedirectUri, context.Response); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6149), context.RedirectUri, context.Response); var builder = new StringBuilder(context.RedirectUri); diff --git a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.Session.cs b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.Session.cs index 38fdcd02..08e3ef10 100644 --- a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.Session.cs +++ b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.Session.cs @@ -67,7 +67,7 @@ namespace OpenIddict.Server.AspNetCore { private readonly IDistributedCache _cache; - public RestoreCachedRequestParameters() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1115)); + public RestoreCachedRequestParameters() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0116)); public RestoreCachedRequestParameters(IDistributedCache cache) => _cache = cache; @@ -92,7 +92,7 @@ namespace OpenIddict.Server.AspNetCore throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Request is not null, SR.GetResourceString(SR.ID5008)); + Debug.Assert(context.Request is not null, SR.GetResourceString(SR.ID4008)); // If a request_id parameter can be found in the logout request, // restore the complete logout request from the distributed cache. @@ -107,11 +107,11 @@ namespace OpenIddict.Server.AspNetCore var token = await _cache.GetStringAsync(Cache.LogoutRequest + context.Request.RequestId); if (token is null || !context.Options.JsonWebTokenHandler.CanReadToken(token)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7150), Parameters.RequestId); + context.Logger.LogError(SR.GetResourceString(SR.ID6150), Parameters.RequestId); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3052, Parameters.RequestId]); + description: context.Localizer[SR.ID2052, Parameters.RequestId]); return; } @@ -124,11 +124,11 @@ namespace OpenIddict.Server.AspNetCore var result = context.Options.JsonWebTokenHandler.ValidateToken(token, parameters); if (!result.IsValid) { - context.Logger.LogError(SR.GetResourceString(SR.ID7150), Parameters.RequestId); + context.Logger.LogError(SR.GetResourceString(SR.ID6150), Parameters.RequestId); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3052, Parameters.RequestId]); + description: context.Localizer[SR.ID2052, Parameters.RequestId]); return; } @@ -137,7 +137,7 @@ namespace OpenIddict.Server.AspNetCore Base64UrlEncoder.Decode(((JsonWebToken) result.SecurityToken).InnerToken.EncodedPayload)); if (document.RootElement.ValueKind != JsonValueKind.Object) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1117)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0118)); } // Restore the authorization request parameters from the serialized payload. @@ -163,7 +163,7 @@ namespace OpenIddict.Server.AspNetCore private readonly IDistributedCache _cache; private readonly IOptionsMonitor _options; - public CacheRequestParameters() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1115)); + public CacheRequestParameters() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0116)); public CacheRequestParameters( IDistributedCache cache, @@ -193,14 +193,14 @@ namespace OpenIddict.Server.AspNetCore throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Request is not null, SR.GetResourceString(SR.ID5008)); + Debug.Assert(context.Request is not null, SR.GetResourceString(SR.ID4008)); // This handler only applies to ASP.NET Core requests. If the HTTP context cannot be resolved, // this may indicate that the request was incorrectly processed by another server stack. var request = context.Transaction.GetHttpRequest(); if (request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1113)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0114)); } // Don't cache the request if the request doesn't include any parameter. @@ -272,7 +272,7 @@ namespace OpenIddict.Server.AspNetCore { private readonly IDistributedCache _cache; - public RemoveCachedRequest() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1115)); + public RemoveCachedRequest() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0116)); public RemoveCachedRequest(IDistributedCache cache) => _cache = cache; @@ -342,7 +342,7 @@ namespace OpenIddict.Server.AspNetCore var response = context.Transaction.GetHttpRequest()?.HttpContext.Response; if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1113)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0114)); } if (string.IsNullOrEmpty(context.PostLogoutRedirectUri)) @@ -350,7 +350,7 @@ namespace OpenIddict.Server.AspNetCore return default; } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7151), context.PostLogoutRedirectUri, response); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6151), context.PostLogoutRedirectUri, response); var location = context.PostLogoutRedirectUri; diff --git a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.cs b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.cs index 38fdd9fc..54d48db7 100644 --- a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.cs +++ b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandlers.cs @@ -97,7 +97,7 @@ namespace OpenIddict.Server.AspNetCore var request = context.Transaction.GetHttpRequest(); if (request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1113)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0114)); } context.EndpointType = @@ -115,7 +115,7 @@ namespace OpenIddict.Server.AspNetCore if (context.EndpointType != OpenIddictServerEndpointType.Unknown) { - context.Logger.LogInformation(SR.GetResourceString(SR.ID7053), context.EndpointType); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6053), context.EndpointType); } return default; @@ -199,7 +199,7 @@ namespace OpenIddict.Server.AspNetCore var request = context.Transaction.GetHttpRequest(); if (request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1113)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0114)); } // Don't require that the request host be present if the request is not handled @@ -213,7 +213,7 @@ namespace OpenIddict.Server.AspNetCore { context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3081, HeaderNames.Host]); + description: context.Localizer[SR.ID2081, HeaderNames.Host]); return default; } @@ -223,7 +223,7 @@ namespace OpenIddict.Server.AspNetCore { context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3082, HeaderNames.Host]); + description: context.Localizer[SR.ID2082, HeaderNames.Host]); return default; } @@ -265,7 +265,7 @@ namespace OpenIddict.Server.AspNetCore var request = context.Transaction.GetHttpRequest(); if (request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1113)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0114)); } // Don't require that the host be present if the request is not handled by OpenIddict. @@ -279,7 +279,7 @@ namespace OpenIddict.Server.AspNetCore { context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3083]); + description: context.Localizer[SR.ID2083]); return default; } @@ -351,7 +351,7 @@ namespace OpenIddict.Server.AspNetCore throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID5007)); + Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID4007)); var properties = context.Transaction.GetProperty(typeof(AuthenticationProperties).FullName!); if (properties is null) @@ -372,7 +372,7 @@ namespace OpenIddict.Server.AspNetCore string value => value, string[] value => value, - _ => throw new InvalidOperationException(SR.GetResourceString(SR.ID1114)) + _ => throw new InvalidOperationException(SR.GetResourceString(SR.ID0115)) }); } @@ -410,7 +410,7 @@ namespace OpenIddict.Server.AspNetCore var request = context.Transaction.GetHttpRequest(); if (request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1113)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0114)); } if (HttpMethods.IsGet(request.Method)) @@ -420,11 +420,11 @@ namespace OpenIddict.Server.AspNetCore else { - context.Logger.LogError(SR.GetResourceString(SR.ID7137), request.Method); + context.Logger.LogError(SR.GetResourceString(SR.ID6137), request.Method); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3084]); + description: context.Localizer[SR.ID2084]); return default; } @@ -463,7 +463,7 @@ namespace OpenIddict.Server.AspNetCore var request = context.Transaction.GetHttpRequest(); if (request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1113)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0114)); } if (HttpMethods.IsGet(request.Method)) @@ -476,11 +476,11 @@ namespace OpenIddict.Server.AspNetCore // See http://openid.net/specs/openid-connect-core-1_0.html#FormSerialization if (string.IsNullOrEmpty(request.ContentType)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7138), HeaderNames.ContentType); + context.Logger.LogError(SR.GetResourceString(SR.ID6138), HeaderNames.ContentType); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3081, HeaderNames.ContentType]); + description: context.Localizer[SR.ID2081, HeaderNames.ContentType]); return; } @@ -488,11 +488,11 @@ namespace OpenIddict.Server.AspNetCore // May have media/type; charset=utf-8, allow partial match. if (!request.ContentType.StartsWith("application/x-www-form-urlencoded", StringComparison.OrdinalIgnoreCase)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7139), HeaderNames.ContentType, request.ContentType); + context.Logger.LogError(SR.GetResourceString(SR.ID6139), HeaderNames.ContentType, request.ContentType); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3082, HeaderNames.ContentType]); + description: context.Localizer[SR.ID2082, HeaderNames.ContentType]); return; } @@ -502,11 +502,11 @@ namespace OpenIddict.Server.AspNetCore else { - context.Logger.LogError(SR.GetResourceString(SR.ID7137), request.Method); + context.Logger.LogError(SR.GetResourceString(SR.ID6137), request.Method); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3084]); + description: context.Localizer[SR.ID2084]); return; } @@ -543,7 +543,7 @@ namespace OpenIddict.Server.AspNetCore var request = context.Transaction.GetHttpRequest(); if (request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1113)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0114)); } if (HttpMethods.IsPost(request.Method)) @@ -551,11 +551,11 @@ namespace OpenIddict.Server.AspNetCore // See http://openid.net/specs/openid-connect-core-1_0.html#FormSerialization if (string.IsNullOrEmpty(request.ContentType)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7138), HeaderNames.ContentType); + context.Logger.LogError(SR.GetResourceString(SR.ID6138), HeaderNames.ContentType); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3081, HeaderNames.ContentType]); + description: context.Localizer[SR.ID2081, HeaderNames.ContentType]); return; } @@ -563,11 +563,11 @@ namespace OpenIddict.Server.AspNetCore // May have media/type; charset=utf-8, allow partial match. if (!request.ContentType.StartsWith("application/x-www-form-urlencoded", StringComparison.OrdinalIgnoreCase)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7139), HeaderNames.ContentType, request.ContentType); + context.Logger.LogError(SR.GetResourceString(SR.ID6139), HeaderNames.ContentType, request.ContentType); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3082, HeaderNames.ContentType]); + description: context.Localizer[SR.ID2082, HeaderNames.ContentType]); return; } @@ -577,11 +577,11 @@ namespace OpenIddict.Server.AspNetCore else { - context.Logger.LogError(SR.GetResourceString(SR.ID7137), request.Method); + context.Logger.LogError(SR.GetResourceString(SR.ID6137), request.Method); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3084]); + description: context.Localizer[SR.ID2084]); return; } @@ -614,14 +614,14 @@ namespace OpenIddict.Server.AspNetCore throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Transaction.Request is not null, SR.GetResourceString(SR.ID5008)); + Debug.Assert(context.Transaction.Request is not null, SR.GetResourceString(SR.ID4008)); // This handler only applies to ASP.NET Core requests. If the HTTP context cannot be resolved, // this may indicate that the request was incorrectly processed by another server stack. var request = context.Transaction.GetHttpRequest(); if (request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1113)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0114)); } string header = request.Headers[HeaderNames.Authorization]; @@ -635,11 +635,11 @@ namespace OpenIddict.Server.AspNetCore if (!string.IsNullOrEmpty(context.Transaction.Request.ClientAssertion) || !string.IsNullOrEmpty(context.Transaction.Request.ClientSecret)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7140)); + context.Logger.LogError(SR.GetResourceString(SR.ID6140)); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3087]); + description: context.Localizer[SR.ID2087]); return default; } @@ -654,7 +654,7 @@ namespace OpenIddict.Server.AspNetCore { context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3055]); + description: context.Localizer[SR.ID2055]); return default; } @@ -670,7 +670,7 @@ namespace OpenIddict.Server.AspNetCore { context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3055]); + description: context.Localizer[SR.ID2055]); return default; } @@ -718,10 +718,10 @@ namespace OpenIddict.Server.AspNetCore var request = context.Transaction.GetHttpRequest(); if (request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1113)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0114)); } - Debug.Assert(context.Transaction.Request is not null, SR.GetResourceString(SR.ID5008)); + Debug.Assert(context.Transaction.Request is not null, SR.GetResourceString(SR.ID4008)); string header = request.Headers[HeaderNames.Authorization]; if (string.IsNullOrEmpty(header) || !header.StartsWith("Bearer ", StringComparison.OrdinalIgnoreCase)) @@ -800,10 +800,10 @@ namespace OpenIddict.Server.AspNetCore var response = context.Transaction.GetHttpRequest()?.HttpContext.Response; if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1113)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0114)); } - Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID5007)); + Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID4007)); // When client authentication is made using basic authentication, the authorization server MUST return // a 401 response with a valid WWW-Authenticate header containing the Basic scheme and a non-empty realm. @@ -860,7 +860,7 @@ namespace OpenIddict.Server.AspNetCore var response = context.Transaction.GetHttpRequest()?.HttpContext.Response; if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1113)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0114)); } // Prevent the response from being cached. @@ -907,10 +907,10 @@ namespace OpenIddict.Server.AspNetCore var response = context.Transaction.GetHttpRequest()?.HttpContext.Response; if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1113)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0114)); } - Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID5007)); + Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID4007)); // When client authentication is made using basic authentication, the authorization server MUST return // a 401 response with a valid WWW-Authenticate header containing the HTTP Basic authentication scheme. @@ -1021,7 +1021,7 @@ namespace OpenIddict.Server.AspNetCore var response = context.Transaction.GetHttpRequest()?.HttpContext.Response; if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1113)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0114)); } // If the response doesn't contain a WWW-Authenticate header, don't return an empty response. @@ -1030,7 +1030,7 @@ namespace OpenIddict.Server.AspNetCore return default; } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7141), context.Transaction.Response); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6141), context.Transaction.Response); context.HandleRequest(); return default; @@ -1062,17 +1062,17 @@ namespace OpenIddict.Server.AspNetCore throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID5007)); + Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID4007)); // This handler only applies to ASP.NET Core requests. If the HTTP context cannot be resolved, // this may indicate that the request was incorrectly processed by another server stack. var response = context.Transaction.GetHttpRequest()?.HttpContext.Response; if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1113)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0114)); } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7142), context.Transaction.Response); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6142), context.Transaction.Response); using var stream = new MemoryStream(); using var writer = new Utf8JsonWriter(stream, new JsonWriterOptions @@ -1129,10 +1129,10 @@ namespace OpenIddict.Server.AspNetCore var response = context.Transaction.GetHttpRequest()?.HttpContext.Response; if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1113)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0114)); } - Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID5007)); + Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID4007)); if (string.IsNullOrEmpty(context.Transaction.Response.Error)) { @@ -1177,10 +1177,10 @@ namespace OpenIddict.Server.AspNetCore var response = context.Transaction.GetHttpRequest()?.HttpContext.Response; if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1113)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0114)); } - Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID5007)); + Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID4007)); if (string.IsNullOrEmpty(context.Transaction.Response.Error)) { @@ -1236,10 +1236,10 @@ namespace OpenIddict.Server.AspNetCore var response = context.Transaction.GetHttpRequest()?.HttpContext.Response; if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1113)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0114)); } - Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID5007)); + Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID4007)); if (string.IsNullOrEmpty(context.Transaction.Response.Error)) { @@ -1249,7 +1249,7 @@ namespace OpenIddict.Server.AspNetCore // Don't return the state originally sent by the client application. context.Transaction.Response.State = null; - context.Logger.LogInformation(SR.GetResourceString(SR.ID7143), context.Transaction.Response); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6143), context.Transaction.Response); using var stream = new MemoryStream(); using var writer = new StreamWriter(stream); @@ -1313,7 +1313,7 @@ namespace OpenIddict.Server.AspNetCore var response = context.Transaction.GetHttpRequest()?.HttpContext.Response; if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1113)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0114)); } var properties = context.Transaction.GetProperty(typeof(AuthenticationProperties).FullName!); @@ -1321,7 +1321,7 @@ namespace OpenIddict.Server.AspNetCore { response.Redirect(properties.RedirectUri); - context.Logger.LogInformation(SR.GetResourceString(SR.ID7144)); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6144)); context.HandleRequest(); } @@ -1355,7 +1355,7 @@ namespace OpenIddict.Server.AspNetCore throw new ArgumentNullException(nameof(context)); } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7145)); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6145)); context.HandleRequest(); return default; diff --git a/src/OpenIddict.Server.DataProtection/OpenIddictServerDataProtectionHandlers.cs b/src/OpenIddict.Server.DataProtection/OpenIddictServerDataProtectionHandlers.cs index 2f469a10..1e057f49 100644 --- a/src/OpenIddict.Server.DataProtection/OpenIddictServerDataProtectionHandlers.cs +++ b/src/OpenIddict.Server.DataProtection/OpenIddictServerDataProtectionHandlers.cs @@ -102,14 +102,14 @@ namespace OpenIddict.Server.DataProtection OpenIddictServerEndpointType.Token => Errors.InvalidGrant, _ => Errors.InvalidToken }, - description: context.Localizer[SR.ID3004]); + description: context.Localizer[SR.ID2004]); return default; } context.Principal = principal; - context.Logger.LogTrace(SR.GetResourceString(SR.ID7152), context.Token, context.Principal.Claims); + context.Logger.LogTrace(SR.GetResourceString(SR.ID6152), context.Token, context.Principal.Claims); return default; @@ -139,7 +139,7 @@ namespace OpenIddict.Server.DataProtection TokenTypeHints.RefreshToken => new[] { Handlers.Server, Formats.RefreshToken, Schemes.Server }, TokenTypeHints.UserCode => new[] { Handlers.Server, Formats.UserCode, Schemes.Server }, - _ => throw new InvalidOperationException(SR.GetResourceString(SR.ID1002)) + _ => throw new InvalidOperationException(SR.GetResourceString(SR.ID0003)) }); try @@ -154,7 +154,7 @@ namespace OpenIddict.Server.DataProtection catch (Exception exception) { - context.Logger.LogTrace(exception, SR.GetResourceString(SR.ID7153), token); + context.Logger.LogTrace(exception, SR.GetResourceString(SR.ID6153), token); return null; } @@ -200,7 +200,7 @@ namespace OpenIddict.Server.DataProtection if (context.AccessTokenPrincipal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1021)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0022)); } // Create a Data Protection protector using the provider registered in the options. @@ -217,7 +217,7 @@ namespace OpenIddict.Server.DataProtection context.Response.AccessToken = Base64UrlEncoder.Encode(protector.Protect(buffer.ToArray())); - context.Logger.LogTrace(SR.GetResourceString(SR.ID7013), + context.Logger.LogTrace(SR.GetResourceString(SR.ID6013), context.AccessTokenPrincipal.GetClaim(Claims.JwtId), context.Response.AccessToken, context.AccessTokenPrincipal.Claims); @@ -263,7 +263,7 @@ namespace OpenIddict.Server.DataProtection if (context.AuthorizationCodePrincipal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1021)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0022)); } // Create a Data Protection protector using the provider registered in the options. @@ -280,7 +280,7 @@ namespace OpenIddict.Server.DataProtection context.Response.Code = Base64UrlEncoder.Encode(protector.Protect(buffer.ToArray())); - context.Logger.LogTrace(SR.GetResourceString(SR.ID7016), + context.Logger.LogTrace(SR.GetResourceString(SR.ID6016), context.AuthorizationCodePrincipal.GetClaim(Claims.JwtId), context.Response.Code, context.AuthorizationCodePrincipal.Claims); @@ -326,7 +326,7 @@ namespace OpenIddict.Server.DataProtection if (context.DeviceCodePrincipal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1021)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0022)); } // Create a Data Protection protector using the provider registered in the options. @@ -343,7 +343,7 @@ namespace OpenIddict.Server.DataProtection context.Response.DeviceCode = Base64UrlEncoder.Encode(protector.Protect(buffer.ToArray())); - context.Logger.LogTrace(SR.GetResourceString(SR.ID7019), + context.Logger.LogTrace(SR.GetResourceString(SR.ID6019), context.DeviceCodePrincipal.GetClaim(Claims.JwtId), context.Response.DeviceCode, context.DeviceCodePrincipal.Claims); @@ -389,7 +389,7 @@ namespace OpenIddict.Server.DataProtection if (context.RefreshTokenPrincipal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1021)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0022)); } // Create a Data Protection protector using the provider registered in the options. @@ -406,7 +406,7 @@ namespace OpenIddict.Server.DataProtection context.Response.RefreshToken = Base64UrlEncoder.Encode(protector.Protect(buffer.ToArray())); - context.Logger.LogTrace(SR.GetResourceString(SR.ID7023), + context.Logger.LogTrace(SR.GetResourceString(SR.ID6023), context.RefreshTokenPrincipal.GetClaim(Claims.JwtId), context.Response.RefreshToken, context.RefreshTokenPrincipal.Claims); @@ -452,7 +452,7 @@ namespace OpenIddict.Server.DataProtection if (context.UserCodePrincipal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1021)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0022)); } // Create a Data Protection protector using the provider registered in the options. @@ -469,7 +469,7 @@ namespace OpenIddict.Server.DataProtection context.Response.UserCode = Base64UrlEncoder.Encode(protector.Protect(buffer.ToArray())); - context.Logger.LogTrace(SR.GetResourceString(SR.ID7026), + context.Logger.LogTrace(SR.GetResourceString(SR.ID6026), context.UserCodePrincipal.GetClaim(Claims.JwtId), context.Response.UserCode, context.UserCodePrincipal.Claims); diff --git a/src/OpenIddict.Server.Owin/OpenIddictServerOwinBuilder.cs b/src/OpenIddict.Server.Owin/OpenIddictServerOwinBuilder.cs index 8b803c99..0a8ab5e2 100644 --- a/src/OpenIddict.Server.Owin/OpenIddictServerOwinBuilder.cs +++ b/src/OpenIddict.Server.Owin/OpenIddictServerOwinBuilder.cs @@ -147,7 +147,7 @@ namespace Microsoft.Extensions.DependencyInjection { if (string.IsNullOrEmpty(realm)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1106), nameof(realm)); + throw new ArgumentException(SR.GetResourceString(SR.ID0107), nameof(realm)); } return Configure(options => options.Realm = realm); diff --git a/src/OpenIddict.Server.Owin/OpenIddictServerOwinConfiguration.cs b/src/OpenIddict.Server.Owin/OpenIddictServerOwinConfiguration.cs index 9f5492e1..199d9868 100644 --- a/src/OpenIddict.Server.Owin/OpenIddictServerOwinConfiguration.cs +++ b/src/OpenIddict.Server.Owin/OpenIddictServerOwinConfiguration.cs @@ -37,7 +37,7 @@ namespace OpenIddict.Server.Owin if (options.AuthenticationMode == AuthenticationMode.Active) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1118)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0119)); } } } diff --git a/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandler.cs b/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandler.cs index 051597c3..4eedbb83 100644 --- a/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandler.cs +++ b/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandler.cs @@ -72,10 +72,10 @@ namespace OpenIddict.Server.Owin // active authentication is used, as AuthenticateCoreAsync() is always called before InvokeAsync() in this case. var transaction = Context.Get(typeof(OpenIddictServerTransaction).FullName) ?? - throw new InvalidOperationException(SR.GetResourceString(SR.ID1111)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0112)); var context = transaction.GetProperty(typeof(ProcessRequestContext).FullName!) ?? - throw new InvalidOperationException(SR.GetResourceString(SR.ID1111)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0112)); if (context.IsRequestHandled) { @@ -110,7 +110,7 @@ namespace OpenIddict.Server.Owin { return false; } - throw new InvalidOperationException(SR.GetResourceString(SR.ID1110)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0111)); } @@ -123,7 +123,7 @@ namespace OpenIddict.Server.Owin var transaction = Context.Get(typeof(OpenIddictServerTransaction).FullName); if (transaction is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1111)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0112)); } // Note: in many cases, the authentication token was already validated by the time this action is called @@ -167,9 +167,9 @@ namespace OpenIddict.Server.Owin else { - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); - Debug.Assert(!string.IsNullOrEmpty(context.Principal.GetTokenType()), SR.GetResourceString(SR.ID5009)); - Debug.Assert(!string.IsNullOrEmpty(context.Token), SR.GetResourceString(SR.ID5010)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); + Debug.Assert(!string.IsNullOrEmpty(context.Principal.GetTokenType()), SR.GetResourceString(SR.ID4009)); + Debug.Assert(!string.IsNullOrEmpty(context.Token), SR.GetResourceString(SR.ID4010)); // Store the token to allow any OWIN/Katana component (e.g a controller) // to retrieve it (e.g to make an API request to another application). @@ -204,7 +204,7 @@ namespace OpenIddict.Server.Owin if (challenge is not null && (Response.StatusCode == 401 || Response.StatusCode == 403)) { var transaction = Context.Get(typeof(OpenIddictServerTransaction).FullName) ?? - throw new InvalidOperationException(SR.GetResourceString(SR.ID1111)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0112)); transaction.Properties[typeof(AuthenticationProperties).FullName!] = challenge.Properties ?? new AuthenticationProperties(); @@ -239,7 +239,7 @@ namespace OpenIddict.Server.Owin return; } - throw new InvalidOperationException(SR.GetResourceString(SR.ID1110)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0111)); } } @@ -247,7 +247,7 @@ namespace OpenIddict.Server.Owin if (signin is not null) { var transaction = Context.Get(typeof(OpenIddictServerTransaction).FullName) ?? - throw new InvalidOperationException(SR.GetResourceString(SR.ID1111)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0112)); transaction.Properties[typeof(AuthenticationProperties).FullName!] = signin.Properties ?? new AuthenticationProperties(); @@ -283,7 +283,7 @@ namespace OpenIddict.Server.Owin return; } - throw new InvalidOperationException(SR.GetResourceString(SR.ID1110)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0111)); } } @@ -291,7 +291,7 @@ namespace OpenIddict.Server.Owin if (signout is not null) { var transaction = Context.Get(typeof(OpenIddictServerTransaction).FullName) ?? - throw new InvalidOperationException(SR.GetResourceString(SR.ID1111)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0112)); transaction.Properties[typeof(AuthenticationProperties).FullName!] = signout.Properties ?? new AuthenticationProperties(); @@ -326,7 +326,7 @@ namespace OpenIddict.Server.Owin return; } - throw new InvalidOperationException(SR.GetResourceString(SR.ID1110)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0111)); } } } diff --git a/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.Authentication.cs b/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.Authentication.cs index 0e84ac99..41ee3c78 100644 --- a/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.Authentication.cs +++ b/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.Authentication.cs @@ -69,7 +69,7 @@ namespace OpenIddict.Server.Owin { private readonly IDistributedCache _cache; - public RestoreCachedRequestParameters() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1115)); + public RestoreCachedRequestParameters() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0116)); public RestoreCachedRequestParameters(IDistributedCache cache) => _cache = cache; @@ -94,7 +94,7 @@ namespace OpenIddict.Server.Owin throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Request is not null, SR.GetResourceString(SR.ID5008)); + Debug.Assert(context.Request is not null, SR.GetResourceString(SR.ID4008)); // If a request_id parameter can be found in the authorization request, // restore the complete authorization request from the distributed cache. @@ -109,11 +109,11 @@ namespace OpenIddict.Server.Owin var token = await _cache.GetStringAsync(Cache.AuthorizationRequest + context.Request.RequestId); if (token is null || !context.Options.JsonWebTokenHandler.CanReadToken(token)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7146), Parameters.RequestId); + context.Logger.LogError(SR.GetResourceString(SR.ID6146), Parameters.RequestId); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3052, Parameters.RequestId]); + description: context.Localizer[SR.ID2052, Parameters.RequestId]); return; } @@ -126,11 +126,11 @@ namespace OpenIddict.Server.Owin var result = context.Options.JsonWebTokenHandler.ValidateToken(token, parameters); if (!result.IsValid) { - context.Logger.LogError(SR.GetResourceString(SR.ID7146), Parameters.RequestId); + context.Logger.LogError(SR.GetResourceString(SR.ID6146), Parameters.RequestId); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3052, Parameters.RequestId]); + description: context.Localizer[SR.ID2052, Parameters.RequestId]); return; } @@ -139,7 +139,7 @@ namespace OpenIddict.Server.Owin Base64UrlEncoder.Decode(((JsonWebToken) result.SecurityToken).InnerToken.EncodedPayload)); if (document.RootElement.ValueKind != JsonValueKind.Object) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1116)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0117)); } // Restore the authorization request parameters from the serialized payload. @@ -165,7 +165,7 @@ namespace OpenIddict.Server.Owin private readonly IDistributedCache _cache; private readonly IOptionsMonitor _options; - public CacheRequestParameters() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1115)); + public CacheRequestParameters() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0116)); public CacheRequestParameters( IDistributedCache cache, @@ -195,14 +195,14 @@ namespace OpenIddict.Server.Owin throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Request is not null, SR.GetResourceString(SR.ID5008)); + Debug.Assert(context.Request is not null, SR.GetResourceString(SR.ID4008)); // This handler only applies to OWIN requests. If The OWIN request cannot be resolved, // this may indicate that the request was incorrectly processed by another server stack. var request = context.Transaction.GetOwinRequest(); if (request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1119)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0120)); } // Don't cache the request if the request doesn't include any parameter. @@ -269,7 +269,7 @@ namespace OpenIddict.Server.Owin { private readonly IDistributedCache _cache; - public RemoveCachedRequest() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1115)); + public RemoveCachedRequest() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0116)); public RemoveCachedRequest(IDistributedCache cache) => _cache = cache; @@ -344,7 +344,7 @@ namespace OpenIddict.Server.Owin var response = context.Transaction.GetOwinRequest()?.Context.Response; if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1119)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0120)); } if (string.IsNullOrEmpty(context.RedirectUri) || @@ -353,7 +353,7 @@ namespace OpenIddict.Server.Owin return; } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7147), context.RedirectUri, context.Response); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6147), context.RedirectUri, context.Response); using (var buffer = new MemoryStream()) using (var writer = new StreamWriter(buffer)) @@ -435,7 +435,7 @@ namespace OpenIddict.Server.Owin var response = context.Transaction.GetOwinRequest()?.Context.Response; if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1119)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0120)); } if (string.IsNullOrEmpty(context.RedirectUri) || @@ -444,7 +444,7 @@ namespace OpenIddict.Server.Owin return default; } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7148), context.RedirectUri, context.Response); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6148), context.RedirectUri, context.Response); var location = context.RedirectUri; @@ -499,7 +499,7 @@ namespace OpenIddict.Server.Owin var response = context.Transaction.GetOwinRequest()?.Context.Response; if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1119)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0120)); } if (string.IsNullOrEmpty(context.RedirectUri) || @@ -508,7 +508,7 @@ namespace OpenIddict.Server.Owin return default; } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7149), context.RedirectUri, context.Response); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6149), context.RedirectUri, context.Response); var builder = new StringBuilder(context.RedirectUri); diff --git a/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.Session.cs b/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.Session.cs index 752aed6c..a3b52582 100644 --- a/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.Session.cs +++ b/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.Session.cs @@ -66,7 +66,7 @@ namespace OpenIddict.Server.Owin { private readonly IDistributedCache _cache; - public RestoreCachedRequestParameters() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1115)); + public RestoreCachedRequestParameters() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0116)); public RestoreCachedRequestParameters(IDistributedCache cache) => _cache = cache; @@ -91,7 +91,7 @@ namespace OpenIddict.Server.Owin throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Request is not null, SR.GetResourceString(SR.ID5008)); + Debug.Assert(context.Request is not null, SR.GetResourceString(SR.ID4008)); // If a request_id parameter can be found in the logout request, // restore the complete logout request from the distributed cache. @@ -106,11 +106,11 @@ namespace OpenIddict.Server.Owin var token = await _cache.GetStringAsync(Cache.LogoutRequest + context.Request.RequestId); if (token is null || !context.Options.JsonWebTokenHandler.CanReadToken(token)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7150), Parameters.RequestId); + context.Logger.LogError(SR.GetResourceString(SR.ID6150), Parameters.RequestId); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3052, Parameters.RequestId]); + description: context.Localizer[SR.ID2052, Parameters.RequestId]); return; } @@ -123,11 +123,11 @@ namespace OpenIddict.Server.Owin var result = context.Options.JsonWebTokenHandler.ValidateToken(token, parameters); if (!result.IsValid) { - context.Logger.LogError(SR.GetResourceString(SR.ID7150), Parameters.RequestId); + context.Logger.LogError(SR.GetResourceString(SR.ID6150), Parameters.RequestId); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3052, Parameters.RequestId]); + description: context.Localizer[SR.ID2052, Parameters.RequestId]); return; } @@ -136,7 +136,7 @@ namespace OpenIddict.Server.Owin Base64UrlEncoder.Decode(((JsonWebToken) result.SecurityToken).InnerToken.EncodedPayload)); if (document.RootElement.ValueKind != JsonValueKind.Object) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1117)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0118)); } // Restore the authorization request parameters from the serialized payload @@ -162,7 +162,7 @@ namespace OpenIddict.Server.Owin private readonly IDistributedCache _cache; private readonly IOptionsMonitor _options; - public CacheRequestParameters() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1115)); + public CacheRequestParameters() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0116)); public CacheRequestParameters( IDistributedCache cache, @@ -192,14 +192,14 @@ namespace OpenIddict.Server.Owin throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Request is not null, SR.GetResourceString(SR.ID5008)); + Debug.Assert(context.Request is not null, SR.GetResourceString(SR.ID4008)); // This handler only applies to OWIN requests. If The OWIN request cannot be resolved, // this may indicate that the request was incorrectly processed by another server stack. var request = context.Transaction.GetOwinRequest(); if (request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1119)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0120)); } // Don't cache the request if the request doesn't include any parameter. @@ -266,7 +266,7 @@ namespace OpenIddict.Server.Owin { private readonly IDistributedCache _cache; - public RemoveCachedRequest() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1115)); + public RemoveCachedRequest() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0116)); public RemoveCachedRequest(IDistributedCache cache) => _cache = cache; @@ -336,7 +336,7 @@ namespace OpenIddict.Server.Owin var response = context.Transaction.GetOwinRequest()?.Context.Response; if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1119)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0120)); } if (string.IsNullOrEmpty(context.PostLogoutRedirectUri)) @@ -344,7 +344,7 @@ namespace OpenIddict.Server.Owin return default; } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7151), context.PostLogoutRedirectUri, response); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6151), context.PostLogoutRedirectUri, response); var location = context.PostLogoutRedirectUri; diff --git a/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.cs b/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.cs index 777c10eb..47bcef0b 100644 --- a/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.cs +++ b/src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.cs @@ -85,7 +85,7 @@ namespace OpenIddict.Server.Owin var request = context.Transaction.GetOwinRequest(); if (request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1119)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0120)); } context.EndpointType = @@ -103,7 +103,7 @@ namespace OpenIddict.Server.Owin if (context.EndpointType != OpenIddictServerEndpointType.Unknown) { - context.Logger.LogInformation(SR.GetResourceString(SR.ID7053), context.EndpointType); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6053), context.EndpointType); } return default; @@ -187,7 +187,7 @@ namespace OpenIddict.Server.Owin var request = context.Transaction.GetOwinRequest(); if (request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1119)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0120)); } // Don't require that the request host be present if the request is not handled @@ -201,7 +201,7 @@ namespace OpenIddict.Server.Owin { context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3081, "Host"]); + description: context.Localizer[SR.ID2081, "Host"]); return default; } @@ -211,7 +211,7 @@ namespace OpenIddict.Server.Owin { context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3082, "Host"]); + description: context.Localizer[SR.ID2082, "Host"]); return default; } @@ -253,7 +253,7 @@ namespace OpenIddict.Server.Owin var request = context.Transaction.GetOwinRequest(); if (request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1119)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0120)); } // Don't require that the host be present if the request is not handled by OpenIddict. @@ -267,7 +267,7 @@ namespace OpenIddict.Server.Owin { context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3083]); + description: context.Localizer[SR.ID2083]); return default; } @@ -347,7 +347,7 @@ namespace OpenIddict.Server.Owin var request = context.Transaction.GetOwinRequest(); if (request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1119)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0120)); } if (string.Equals(request.Method, "GET", StringComparison.OrdinalIgnoreCase)) @@ -357,11 +357,11 @@ namespace OpenIddict.Server.Owin else { - context.Logger.LogError(SR.GetResourceString(SR.ID7137), request.Method); + context.Logger.LogError(SR.GetResourceString(SR.ID6137), request.Method); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3084]); + description: context.Localizer[SR.ID2084]); return default; } @@ -400,7 +400,7 @@ namespace OpenIddict.Server.Owin var request = context.Transaction.GetOwinRequest(); if (request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1119)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0120)); } if (string.Equals(request.Method, "GET", StringComparison.OrdinalIgnoreCase)) @@ -413,11 +413,11 @@ namespace OpenIddict.Server.Owin // See http://openid.net/specs/openid-connect-core-1_0.html#FormSerialization if (string.IsNullOrEmpty(request.ContentType)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7138), "Content-Type"); + context.Logger.LogError(SR.GetResourceString(SR.ID6138), "Content-Type"); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3081, "Content-Type"]); + description: context.Localizer[SR.ID2081, "Content-Type"]); return; } @@ -425,11 +425,11 @@ namespace OpenIddict.Server.Owin // May have media/type; charset=utf-8, allow partial match. if (!request.ContentType.StartsWith("application/x-www-form-urlencoded", StringComparison.OrdinalIgnoreCase)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7139), "Content-Type", request.ContentType); + context.Logger.LogError(SR.GetResourceString(SR.ID6139), "Content-Type", request.ContentType); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3082, "Content-Type"]); + description: context.Localizer[SR.ID2082, "Content-Type"]); return; } @@ -439,11 +439,11 @@ namespace OpenIddict.Server.Owin else { - context.Logger.LogError(SR.GetResourceString(SR.ID7137), request.Method); + context.Logger.LogError(SR.GetResourceString(SR.ID6137), request.Method); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3084]); + description: context.Localizer[SR.ID2084]); return; } @@ -480,7 +480,7 @@ namespace OpenIddict.Server.Owin var request = context.Transaction.GetOwinRequest(); if (request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1119)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0120)); } if (string.Equals(request.Method, "POST", StringComparison.OrdinalIgnoreCase)) @@ -488,11 +488,11 @@ namespace OpenIddict.Server.Owin // See http://openid.net/specs/openid-connect-core-1_0.html#FormSerialization if (string.IsNullOrEmpty(request.ContentType)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7138), "Content-Type"); + context.Logger.LogError(SR.GetResourceString(SR.ID6138), "Content-Type"); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3081, "Content-Type"]); + description: context.Localizer[SR.ID2081, "Content-Type"]); return; } @@ -500,11 +500,11 @@ namespace OpenIddict.Server.Owin // May have media/type; charset=utf-8, allow partial match. if (!request.ContentType.StartsWith("application/x-www-form-urlencoded", StringComparison.OrdinalIgnoreCase)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7139), "Content-Type", request.ContentType); + context.Logger.LogError(SR.GetResourceString(SR.ID6139), "Content-Type", request.ContentType); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3082, "Content-Type"]); + description: context.Localizer[SR.ID2082, "Content-Type"]); return; } @@ -514,11 +514,11 @@ namespace OpenIddict.Server.Owin else { - context.Logger.LogError(SR.GetResourceString(SR.ID7137), request.Method); + context.Logger.LogError(SR.GetResourceString(SR.ID6137), request.Method); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3084]); + description: context.Localizer[SR.ID2084]); return; } @@ -551,14 +551,14 @@ namespace OpenIddict.Server.Owin throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Transaction.Request is not null, SR.GetResourceString(SR.ID5008)); + Debug.Assert(context.Transaction.Request is not null, SR.GetResourceString(SR.ID4008)); // This handler only applies to OWIN requests. If The OWIN request cannot be resolved, // this may indicate that the request was incorrectly processed by another server stack. var request = context.Transaction.GetOwinRequest(); if (request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1119)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0120)); } var header = request.Headers["Authorization"]; @@ -572,11 +572,11 @@ namespace OpenIddict.Server.Owin if (!string.IsNullOrEmpty(context.Transaction.Request.ClientAssertion) || !string.IsNullOrEmpty(context.Transaction.Request.ClientSecret)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7140)); + context.Logger.LogError(SR.GetResourceString(SR.ID6140)); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3087]); + description: context.Localizer[SR.ID2087]); return default; } @@ -591,7 +591,7 @@ namespace OpenIddict.Server.Owin { context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3055]); + description: context.Localizer[SR.ID2055]); return default; } @@ -607,7 +607,7 @@ namespace OpenIddict.Server.Owin { context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3055]); + description: context.Localizer[SR.ID2055]); return default; } @@ -650,14 +650,14 @@ namespace OpenIddict.Server.Owin throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Transaction.Request is not null, SR.GetResourceString(SR.ID5008)); + Debug.Assert(context.Transaction.Request is not null, SR.GetResourceString(SR.ID4008)); // This handler only applies to OWIN requests. If The OWIN request cannot be resolved, // this may indicate that the request was incorrectly processed by another server stack. var request = context.Transaction.GetOwinRequest(); if (request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1119)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0120)); } var header = request.Headers["Authorization"]; @@ -732,14 +732,14 @@ namespace OpenIddict.Server.Owin throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID5007)); + Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID4007)); // This handler only applies to OWIN requests. If The OWIN request cannot be resolved, // this may indicate that the request was incorrectly processed by another server stack. var response = context.Transaction.GetOwinRequest()?.Context.Response; if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1119)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0120)); } // When client authentication is made using basic authentication, the authorization server MUST return @@ -797,7 +797,7 @@ namespace OpenIddict.Server.Owin var response = context.Transaction.GetOwinRequest()?.Context.Response; if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1119)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0120)); } // Prevent the response from being cached. @@ -839,14 +839,14 @@ namespace OpenIddict.Server.Owin throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID5007)); + Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID4007)); // This handler only applies to OWIN requests. If The OWIN request cannot be resolved, // this may indicate that the request was incorrectly processed by another server stack. var response = context.Transaction.GetOwinRequest()?.Context.Response; if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1119)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0120)); } // When client authentication is made using basic authentication, the authorization server MUST return @@ -958,7 +958,7 @@ namespace OpenIddict.Server.Owin var response = context.Transaction.GetOwinRequest()?.Context.Response; if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1119)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0120)); } // If the response doesn't contain a WWW-Authenticate header, don't return an empty response. @@ -967,7 +967,7 @@ namespace OpenIddict.Server.Owin return default; } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7141), context.Transaction.Response); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6141), context.Transaction.Response); context.HandleRequest(); return default; @@ -999,17 +999,17 @@ namespace OpenIddict.Server.Owin throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID5007)); + Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID4007)); // This handler only applies to OWIN requests. If The OWIN request cannot be resolved, // this may indicate that the request was incorrectly processed by another server stack. var response = context.Transaction.GetOwinRequest()?.Context.Response; if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1119)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0120)); } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7142), context.Transaction.Response); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6142), context.Transaction.Response); using var stream = new MemoryStream(); using var writer = new Utf8JsonWriter(stream, new JsonWriterOptions @@ -1061,14 +1061,14 @@ namespace OpenIddict.Server.Owin throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID5007)); + Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID4007)); // This handler only applies to OWIN requests. If The OWIN request cannot be resolved, // this may indicate that the request was incorrectly processed by another server stack. var response = context.Transaction.GetOwinRequest()?.Context.Response; if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1119)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0120)); } if (string.IsNullOrEmpty(context.Transaction.Response.Error)) @@ -1111,14 +1111,14 @@ namespace OpenIddict.Server.Owin throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID5007)); + Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID4007)); // This handler only applies to OWIN requests. If The OWIN request cannot be resolved, // this may indicate that the request was incorrectly processed by another server stack. var response = context.Transaction.GetOwinRequest()?.Context.Response; if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1119)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0120)); } if (string.IsNullOrEmpty(context.Transaction.Response.Error)) @@ -1129,7 +1129,7 @@ namespace OpenIddict.Server.Owin // Don't return the state originally sent by the client application. context.Transaction.Response.State = null; - context.Logger.LogInformation(SR.GetResourceString(SR.ID7143), context.Transaction.Response); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6143), context.Transaction.Response); using var stream = new MemoryStream(); using var writer = new StreamWriter(stream); @@ -1193,7 +1193,7 @@ namespace OpenIddict.Server.Owin var response = context.Transaction.GetOwinRequest()?.Context.Response; if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1119)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0120)); } var properties = context.Transaction.GetProperty(typeof(AuthenticationProperties).FullName!); @@ -1201,7 +1201,7 @@ namespace OpenIddict.Server.Owin { response.Redirect(properties.RedirectUri); - context.Logger.LogInformation(SR.GetResourceString(SR.ID7144)); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6144)); context.HandleRequest(); } @@ -1235,7 +1235,7 @@ namespace OpenIddict.Server.Owin throw new ArgumentNullException(nameof(context)); } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7145)); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6145)); context.HandleRequest(); return default; diff --git a/src/OpenIddict.Server.Owin/OpenIddictServerOwinMiddlewareFactory.cs b/src/OpenIddict.Server.Owin/OpenIddictServerOwinMiddlewareFactory.cs index 88155bef..c23edf6f 100644 --- a/src/OpenIddict.Server.Owin/OpenIddictServerOwinMiddlewareFactory.cs +++ b/src/OpenIddict.Server.Owin/OpenIddictServerOwinMiddlewareFactory.cs @@ -47,7 +47,7 @@ namespace OpenIddict.Server.Owin var provider = context.Get(typeof(IServiceProvider).FullName); if (provider is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1120)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0121)); } // Note: the Microsoft.Extensions.DependencyInjection container doesn't support resolving services @@ -63,7 +63,7 @@ namespace OpenIddict.Server.Owin return middleware.Invoke(context); static T GetRequiredService(IServiceProvider provider) => provider.GetService() ?? - throw new InvalidOperationException(SR.GetResourceString(SR.ID1121)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0122)); } } } diff --git a/src/OpenIddict.Server.Quartz/OpenIddictServerQuartzBuilder.cs b/src/OpenIddict.Server.Quartz/OpenIddictServerQuartzBuilder.cs index 07cfb04d..0c538b55 100644 --- a/src/OpenIddict.Server.Quartz/OpenIddictServerQuartzBuilder.cs +++ b/src/OpenIddict.Server.Quartz/OpenIddictServerQuartzBuilder.cs @@ -71,7 +71,7 @@ namespace Microsoft.Extensions.DependencyInjection { if (count < 0) { - throw new ArgumentOutOfRangeException(nameof(count), SR.GetResourceString(SR.ID1278)); + throw new ArgumentOutOfRangeException(nameof(count), SR.GetResourceString(SR.ID0279)); } return Configure(options => options.MaximumRefireCount = count); @@ -86,7 +86,7 @@ namespace Microsoft.Extensions.DependencyInjection { if (lifespan < TimeSpan.FromMinutes(10)) { - throw new ArgumentOutOfRangeException(nameof(lifespan), SR.GetResourceString(SR.ID1279)); + throw new ArgumentOutOfRangeException(nameof(lifespan), SR.GetResourceString(SR.ID0280)); } return Configure(options => options.MinimumAuthorizationLifespan = lifespan); @@ -101,7 +101,7 @@ namespace Microsoft.Extensions.DependencyInjection { if (lifespan < TimeSpan.FromMinutes(10)) { - throw new ArgumentOutOfRangeException(nameof(lifespan), SR.GetResourceString(SR.ID1279)); + throw new ArgumentOutOfRangeException(nameof(lifespan), SR.GetResourceString(SR.ID0280)); } return Configure(options => options.MinimumTokenLifespan = lifespan); diff --git a/src/OpenIddict.Server.Quartz/OpenIddictServerQuartzExtensions.cs b/src/OpenIddict.Server.Quartz/OpenIddictServerQuartzExtensions.cs index 0bc8b67f..a26ebe0b 100644 --- a/src/OpenIddict.Server.Quartz/OpenIddictServerQuartzExtensions.cs +++ b/src/OpenIddict.Server.Quartz/OpenIddictServerQuartzExtensions.cs @@ -47,7 +47,7 @@ namespace Microsoft.Extensions.DependencyInjection JobBuilder.Create() .StoreDurably() .WithIdentity(OpenIddictServerQuartzJob.Identity) - .WithDescription(SR.GetResourceString(SR.ID9000)) + .WithDescription(SR.GetResourceString(SR.ID8000)) .Build()); } @@ -65,7 +65,7 @@ namespace Microsoft.Extensions.DependencyInjection TriggerBuilder.Create() .ForJob(OpenIddictServerQuartzJob.Identity) .WithSimpleSchedule(options => options.WithIntervalInHours(1).RepeatForever()) - .WithDescription(SR.GetResourceString(SR.ID9001)) + .WithDescription(SR.GetResourceString(SR.ID8001)) .StartNow() .Build()); } diff --git a/src/OpenIddict.Server.Quartz/OpenIddictServerQuartzJob.cs b/src/OpenIddict.Server.Quartz/OpenIddictServerQuartzJob.cs index e610c03b..7da5f572 100644 --- a/src/OpenIddict.Server.Quartz/OpenIddictServerQuartzJob.cs +++ b/src/OpenIddict.Server.Quartz/OpenIddictServerQuartzJob.cs @@ -27,7 +27,7 @@ namespace OpenIddict.Server.Quartz /// /// Creates a new instance of the class. /// - public OpenIddictServerQuartzJob() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1081)); + public OpenIddictServerQuartzJob() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0082)); /// /// Creates a new instance of the class. @@ -76,7 +76,7 @@ namespace OpenIddict.Server.Quartz // Inform Quartz.NET that the triggers associated with this job should be removed, // as the future invocations will always fail until the application is correctly // re-configured to register the OpenIddict core services in the DI container. - throw new JobExecutionException(new InvalidOperationException(SR.GetResourceString(SR.ID1277))) + throw new JobExecutionException(new InvalidOperationException(SR.GetResourceString(SR.ID0278))) { RefireImmediately = false, UnscheduleAllTriggers = true, @@ -133,7 +133,7 @@ namespace OpenIddict.Server.Quartz // Inform Quartz.NET that the triggers associated with this job should be removed, // as the future invocations will always fail until the application is correctly // re-configured to register the OpenIddict core services in the DI container. - throw new JobExecutionException(new InvalidOperationException(SR.GetResourceString(SR.ID1277))) + throw new JobExecutionException(new InvalidOperationException(SR.GetResourceString(SR.ID0278))) { RefireImmediately = false, UnscheduleAllTriggers = true, diff --git a/src/OpenIddict.Server/OpenIddictServerBuilder.cs b/src/OpenIddict.Server/OpenIddictServerBuilder.cs index fbf8cddb..295b44b1 100644 --- a/src/OpenIddict.Server/OpenIddictServerBuilder.cs +++ b/src/OpenIddict.Server/OpenIddictServerBuilder.cs @@ -170,7 +170,7 @@ namespace Microsoft.Extensions.DependencyInjection if (key is AsymmetricSecurityKey asymmetricSecurityKey && asymmetricSecurityKey.PrivateKeyStatus == PrivateKeyStatus.DoesNotExist) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1054)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0055)); } if (key.IsSupportedAlgorithm(SecurityAlgorithms.Aes256KW)) @@ -185,7 +185,7 @@ namespace Microsoft.Extensions.DependencyInjection SecurityAlgorithms.RsaOAEP, SecurityAlgorithms.Aes256CbcHmacSha512)); } - throw new InvalidOperationException(SR.GetResourceString(SR.ID1055)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0056)); } /// @@ -273,7 +273,7 @@ namespace Microsoft.Extensions.DependencyInjection return AddEncryptionCertificate(certificate); #else - throw new PlatformNotSupportedException(SR.GetResourceString(SR.ID1263)); + throw new PlatformNotSupportedException(SR.GetResourceString(SR.ID0264)); #endif } @@ -299,7 +299,7 @@ namespace Microsoft.Extensions.DependencyInjection { if (string.IsNullOrEmpty(algorithm)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1056), nameof(algorithm)); + throw new ArgumentException(SR.GetResourceString(SR.ID0057), nameof(algorithm)); } switch (algorithm) @@ -313,7 +313,7 @@ namespace Microsoft.Extensions.DependencyInjection return AddEncryptionCredentials(new EncryptingCredentials(CreateRsaSecurityKey(2048), algorithm, SecurityAlgorithms.Aes256CbcHmacSha512)); - default: throw new InvalidOperationException(SR.GetResourceString(SR.ID1057)); + default: throw new InvalidOperationException(SR.GetResourceString(SR.ID0058)); } static SymmetricSecurityKey CreateSymmetricSecurityKey(int size) @@ -355,7 +355,7 @@ namespace Microsoft.Extensions.DependencyInjection if (algorithm.KeySize < size) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1058)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0059)); } return new RsaSecurityKey(algorithm); @@ -382,13 +382,13 @@ namespace Microsoft.Extensions.DependencyInjection var extensions = certificate.Extensions.OfType().ToList(); if (extensions.Count != 0 && !extensions.Any(extension => extension.KeyUsages.HasFlag(X509KeyUsageFlags.KeyEncipherment))) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1059)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0060)); } } if (!certificate.HasPrivateKey) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1060)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0061)); } return AddEncryptionKey(new X509SecurityKey(certificate)); @@ -430,18 +430,18 @@ namespace Microsoft.Extensions.DependencyInjection if (string.IsNullOrEmpty(resource)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1061), nameof(resource)); + throw new ArgumentException(SR.GetResourceString(SR.ID0062), nameof(resource)); } if (string.IsNullOrEmpty(password)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1062), nameof(password)); + throw new ArgumentException(SR.GetResourceString(SR.ID0063), nameof(password)); } using var stream = assembly.GetManifestResourceStream(resource); if (stream is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1063)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0064)); } return AddEncryptionCertificate(stream, password, flags); @@ -484,7 +484,7 @@ namespace Microsoft.Extensions.DependencyInjection if (string.IsNullOrEmpty(password)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1062), nameof(password)); + throw new ArgumentException(SR.GetResourceString(SR.ID0063), nameof(password)); } using var buffer = new MemoryStream(); @@ -502,13 +502,13 @@ namespace Microsoft.Extensions.DependencyInjection { if (string.IsNullOrEmpty(thumbprint)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1064), nameof(thumbprint)); + throw new ArgumentException(SR.GetResourceString(SR.ID0065), nameof(thumbprint)); } var certificate = GetCertificate(StoreLocation.CurrentUser, thumbprint) ?? GetCertificate(StoreLocation.LocalMachine, thumbprint); if (certificate is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1065)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0066)); } return AddEncryptionCertificate(certificate); @@ -535,7 +535,7 @@ namespace Microsoft.Extensions.DependencyInjection { if (string.IsNullOrEmpty(thumbprint)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1064), nameof(thumbprint)); + throw new ArgumentException(SR.GetResourceString(SR.ID0065), nameof(thumbprint)); } using var store = new X509Store(name, location); @@ -547,7 +547,7 @@ namespace Microsoft.Extensions.DependencyInjection if (certificate is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1065)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0066)); } return AddEncryptionCertificate(certificate); @@ -584,7 +584,7 @@ namespace Microsoft.Extensions.DependencyInjection if (key is AsymmetricSecurityKey asymmetricSecurityKey && asymmetricSecurityKey.PrivateKeyStatus == PrivateKeyStatus.DoesNotExist) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1066)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0067)); } if (key.IsSupportedAlgorithm(SecurityAlgorithms.RsaSha256)) @@ -618,11 +618,11 @@ namespace Microsoft.Extensions.DependencyInjection key.IsSupportedAlgorithm(SecurityAlgorithms.EcdsaSha384) || key.IsSupportedAlgorithm(SecurityAlgorithms.EcdsaSha512)) { - throw new PlatformNotSupportedException(SR.GetResourceString(SR.ID1068)); + throw new PlatformNotSupportedException(SR.GetResourceString(SR.ID0069)); } #endif - throw new InvalidOperationException(SR.GetResourceString(SR.ID1067)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0068)); } /// @@ -710,7 +710,7 @@ namespace Microsoft.Extensions.DependencyInjection return AddSigningCertificate(certificate); #else - throw new PlatformNotSupportedException(SR.GetResourceString(SR.ID1263)); + throw new PlatformNotSupportedException(SR.GetResourceString(SR.ID0264)); #endif } @@ -738,7 +738,7 @@ namespace Microsoft.Extensions.DependencyInjection { if (string.IsNullOrEmpty(algorithm)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1056), nameof(algorithm)); + throw new ArgumentException(SR.GetResourceString(SR.ID0057), nameof(algorithm)); } switch (algorithm) @@ -780,10 +780,10 @@ namespace Microsoft.Extensions.DependencyInjection case SecurityAlgorithms.EcdsaSha256Signature: case SecurityAlgorithms.EcdsaSha384Signature: case SecurityAlgorithms.EcdsaSha512Signature: - throw new PlatformNotSupportedException(SR.GetResourceString(SR.ID1068)); + throw new PlatformNotSupportedException(SR.GetResourceString(SR.ID0069)); #endif - default: throw new InvalidOperationException(SR.GetResourceString(SR.ID1057)); + default: throw new InvalidOperationException(SR.GetResourceString(SR.ID0058)); } [SuppressMessage("Reliability", "CA2000:Dispose objects before losing scope", @@ -811,7 +811,7 @@ namespace Microsoft.Extensions.DependencyInjection if (algorithm.KeySize < size) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1058)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0059)); } return new RsaSecurityKey(algorithm); @@ -838,13 +838,13 @@ namespace Microsoft.Extensions.DependencyInjection var extensions = certificate.Extensions.OfType().ToList(); if (extensions.Count != 0 && !extensions.Any(extension => extension.KeyUsages.HasFlag(X509KeyUsageFlags.DigitalSignature))) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1069)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0070)); } } if (!certificate.HasPrivateKey) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1060)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0061)); } return AddSigningKey(new X509SecurityKey(certificate)); @@ -886,18 +886,18 @@ namespace Microsoft.Extensions.DependencyInjection if (string.IsNullOrEmpty(resource)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1061), nameof(resource)); + throw new ArgumentException(SR.GetResourceString(SR.ID0062), nameof(resource)); } if (string.IsNullOrEmpty(password)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1062), nameof(password)); + throw new ArgumentException(SR.GetResourceString(SR.ID0063), nameof(password)); } using var stream = assembly.GetManifestResourceStream(resource); if (stream is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1063)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0064)); } return AddSigningCertificate(stream, password, flags); @@ -940,7 +940,7 @@ namespace Microsoft.Extensions.DependencyInjection if (string.IsNullOrEmpty(password)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1062), nameof(password)); + throw new ArgumentException(SR.GetResourceString(SR.ID0063), nameof(password)); } using var buffer = new MemoryStream(); @@ -958,13 +958,13 @@ namespace Microsoft.Extensions.DependencyInjection { if (string.IsNullOrEmpty(thumbprint)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1064), nameof(thumbprint)); + throw new ArgumentException(SR.GetResourceString(SR.ID0065), nameof(thumbprint)); } var certificate = GetCertificate(StoreLocation.CurrentUser, thumbprint) ?? GetCertificate(StoreLocation.LocalMachine, thumbprint); if (certificate is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1065)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0066)); } return AddSigningCertificate(certificate); @@ -991,7 +991,7 @@ namespace Microsoft.Extensions.DependencyInjection { if (string.IsNullOrEmpty(thumbprint)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1064), nameof(thumbprint)); + throw new ArgumentException(SR.GetResourceString(SR.ID0065), nameof(thumbprint)); } using var store = new X509Store(name, location); @@ -1003,7 +1003,7 @@ namespace Microsoft.Extensions.DependencyInjection if (certificate is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1065)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0066)); } return AddSigningCertificate(certificate); @@ -1036,7 +1036,7 @@ namespace Microsoft.Extensions.DependencyInjection { if (string.IsNullOrEmpty(type)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1070), nameof(type)); + throw new ArgumentException(SR.GetResourceString(SR.ID0071), nameof(type)); } return Configure(options => options.GrantTypes.Add(type)); @@ -1109,12 +1109,12 @@ namespace Microsoft.Extensions.DependencyInjection if (addresses.Any(address => !address.IsWellFormedOriginalString())) { - throw new ArgumentException(SR.GetResourceString(SR.ID1071), nameof(addresses)); + throw new ArgumentException(SR.GetResourceString(SR.ID0072), nameof(addresses)); } if (addresses.Any(address => address.OriginalString.StartsWith("~", StringComparison.OrdinalIgnoreCase))) { - throw new ArgumentException(SR.FormatID1080("~"), nameof(addresses)); + throw new ArgumentException(SR.FormatID0081("~"), nameof(addresses)); } return Configure(options => @@ -1157,12 +1157,12 @@ namespace Microsoft.Extensions.DependencyInjection if (addresses.Any(address => !address.IsWellFormedOriginalString())) { - throw new ArgumentException(SR.GetResourceString(SR.ID1071), nameof(addresses)); + throw new ArgumentException(SR.GetResourceString(SR.ID0072), nameof(addresses)); } if (addresses.Any(address => address.OriginalString.StartsWith("~", StringComparison.OrdinalIgnoreCase))) { - throw new ArgumentException(SR.FormatID1080("~"), nameof(addresses)); + throw new ArgumentException(SR.FormatID0081("~"), nameof(addresses)); } return Configure(options => @@ -1205,12 +1205,12 @@ namespace Microsoft.Extensions.DependencyInjection if (addresses.Any(address => !address.IsWellFormedOriginalString())) { - throw new ArgumentException(SR.GetResourceString(SR.ID1071), nameof(addresses)); + throw new ArgumentException(SR.GetResourceString(SR.ID0072), nameof(addresses)); } if (addresses.Any(address => address.OriginalString.StartsWith("~", StringComparison.OrdinalIgnoreCase))) { - throw new ArgumentException(SR.FormatID1080("~"), nameof(addresses)); + throw new ArgumentException(SR.FormatID0081("~"), nameof(addresses)); } return Configure(options => @@ -1253,12 +1253,12 @@ namespace Microsoft.Extensions.DependencyInjection if (addresses.Any(address => !address.IsWellFormedOriginalString())) { - throw new ArgumentException(SR.GetResourceString(SR.ID1071), nameof(addresses)); + throw new ArgumentException(SR.GetResourceString(SR.ID0072), nameof(addresses)); } if (addresses.Any(address => address.OriginalString.StartsWith("~", StringComparison.OrdinalIgnoreCase))) { - throw new ArgumentException(SR.FormatID1080("~"), nameof(addresses)); + throw new ArgumentException(SR.FormatID0081("~"), nameof(addresses)); } return Configure(options => @@ -1301,12 +1301,12 @@ namespace Microsoft.Extensions.DependencyInjection if (addresses.Any(address => !address.IsWellFormedOriginalString())) { - throw new ArgumentException(SR.GetResourceString(SR.ID1071), nameof(addresses)); + throw new ArgumentException(SR.GetResourceString(SR.ID0072), nameof(addresses)); } if (addresses.Any(address => address.OriginalString.StartsWith("~", StringComparison.OrdinalIgnoreCase))) { - throw new ArgumentException(SR.FormatID1080("~"), nameof(addresses)); + throw new ArgumentException(SR.FormatID0081("~"), nameof(addresses)); } return Configure(options => @@ -1349,12 +1349,12 @@ namespace Microsoft.Extensions.DependencyInjection if (addresses.Any(address => !address.IsWellFormedOriginalString())) { - throw new ArgumentException(SR.GetResourceString(SR.ID1071), nameof(addresses)); + throw new ArgumentException(SR.GetResourceString(SR.ID0072), nameof(addresses)); } if (addresses.Any(address => address.OriginalString.StartsWith("~", StringComparison.OrdinalIgnoreCase))) { - throw new ArgumentException(SR.FormatID1080("~"), nameof(addresses)); + throw new ArgumentException(SR.FormatID0081("~"), nameof(addresses)); } return Configure(options => @@ -1397,12 +1397,12 @@ namespace Microsoft.Extensions.DependencyInjection if (addresses.Any(address => !address.IsWellFormedOriginalString())) { - throw new ArgumentException(SR.GetResourceString(SR.ID1071), nameof(addresses)); + throw new ArgumentException(SR.GetResourceString(SR.ID0072), nameof(addresses)); } if (addresses.Any(address => address.OriginalString.StartsWith("~", StringComparison.OrdinalIgnoreCase))) { - throw new ArgumentException(SR.FormatID1080("~"), nameof(addresses)); + throw new ArgumentException(SR.FormatID0081("~"), nameof(addresses)); } return Configure(options => @@ -1445,12 +1445,12 @@ namespace Microsoft.Extensions.DependencyInjection if (addresses.Any(address => !address.IsWellFormedOriginalString())) { - throw new ArgumentException(SR.GetResourceString(SR.ID1071), nameof(addresses)); + throw new ArgumentException(SR.GetResourceString(SR.ID0072), nameof(addresses)); } if (addresses.Any(address => address.OriginalString.StartsWith("~", StringComparison.OrdinalIgnoreCase))) { - throw new ArgumentException(SR.FormatID1080("~"), nameof(addresses)); + throw new ArgumentException(SR.FormatID0081("~"), nameof(addresses)); } return Configure(options => @@ -1493,12 +1493,12 @@ namespace Microsoft.Extensions.DependencyInjection if (addresses.Any(address => !address.IsWellFormedOriginalString())) { - throw new ArgumentException(SR.GetResourceString(SR.ID1071), nameof(addresses)); + throw new ArgumentException(SR.GetResourceString(SR.ID0072), nameof(addresses)); } if (addresses.Any(address => address.OriginalString.StartsWith("~", StringComparison.OrdinalIgnoreCase))) { - throw new ArgumentException(SR.FormatID1080("~"), nameof(addresses)); + throw new ArgumentException(SR.FormatID0081("~"), nameof(addresses)); } return Configure(options => @@ -1541,12 +1541,12 @@ namespace Microsoft.Extensions.DependencyInjection if (addresses.Any(address => !address.IsWellFormedOriginalString())) { - throw new ArgumentException(SR.GetResourceString(SR.ID1071), nameof(addresses)); + throw new ArgumentException(SR.GetResourceString(SR.ID0072), nameof(addresses)); } if (addresses.Any(address => address.OriginalString.StartsWith("~", StringComparison.OrdinalIgnoreCase))) { - throw new ArgumentException(SR.FormatID1080("~"), nameof(addresses)); + throw new ArgumentException(SR.FormatID0081("~"), nameof(addresses)); } return Configure(options => @@ -1653,7 +1653,7 @@ namespace Microsoft.Extensions.DependencyInjection if (claims.Any(claim => string.IsNullOrEmpty(claim))) { - throw new ArgumentException(SR.GetResourceString(SR.ID1072), nameof(claims)); + throw new ArgumentException(SR.GetResourceString(SR.ID0073), nameof(claims)); } return Configure(options => options.Claims.UnionWith(claims)); @@ -1674,7 +1674,7 @@ namespace Microsoft.Extensions.DependencyInjection if (scopes.Any(scope => string.IsNullOrEmpty(scope))) { - throw new ArgumentException(SR.GetResourceString(SR.ID1073), nameof(scopes)); + throw new ArgumentException(SR.GetResourceString(SR.ID0074), nameof(scopes)); } return Configure(options => options.Scopes.UnionWith(scopes)); diff --git a/src/OpenIddict.Server/OpenIddictServerConfiguration.cs b/src/OpenIddict.Server/OpenIddictServerConfiguration.cs index b49d526d..eb7cd42d 100644 --- a/src/OpenIddict.Server/OpenIddictServerConfiguration.cs +++ b/src/OpenIddict.Server/OpenIddictServerConfiguration.cs @@ -50,13 +50,13 @@ namespace OpenIddict.Server if (options.JsonWebTokenHandler is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1074)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0075)); } // Ensure at least one flow has been enabled. if (options.GrantTypes.Count == 0) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1075)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0076)); } // Ensure the authorization endpoint has been enabled when @@ -64,13 +64,13 @@ namespace OpenIddict.Server if (options.AuthorizationEndpointUris.Count == 0 && (options.GrantTypes.Contains(GrantTypes.AuthorizationCode) || options.GrantTypes.Contains(GrantTypes.Implicit))) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1076)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0077)); } // Ensure the device endpoint has been enabled when the device grant is supported. if (options.DeviceEndpointUris.Count == 0 && options.GrantTypes.Contains(GrantTypes.DeviceCode)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1077)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0078)); } // Ensure the token endpoint has been enabled when the authorization code, @@ -81,50 +81,50 @@ namespace OpenIddict.Server options.GrantTypes.Contains(GrantTypes.Password) || options.GrantTypes.Contains(GrantTypes.RefreshToken))) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1078)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0079)); } // Ensure the verification endpoint has been enabled when the device grant is supported. if (options.VerificationEndpointUris.Count == 0 && options.GrantTypes.Contains(GrantTypes.DeviceCode)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1079)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0080)); } if (options.DisableTokenStorage) { if (options.UseReferenceAccessTokens || options.UseReferenceRefreshTokens) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1082)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0083)); } if (!options.DisableSlidingRefreshTokenExpiration && !options.UseRollingRefreshTokens) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1083)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0084)); } } if (options.EncryptionCredentials.Count == 0) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1084)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0085)); } if (!options.SigningCredentials.Any(credentials => credentials.Key is AsymmetricSecurityKey)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1085)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0086)); } // If all the registered encryption credentials are backed by a X.509 certificate, at least one of them must be valid. if (options.EncryptionCredentials.All(credentials => credentials.Key is X509SecurityKey x509SecurityKey && (x509SecurityKey.Certificate.NotBefore > DateTime.Now || x509SecurityKey.Certificate.NotAfter < DateTime.Now))) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1086)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0087)); } // If all the registered signing credentials are backed by a X.509 certificate, at least one of them must be valid. if (options.SigningCredentials.All(credentials => credentials.Key is X509SecurityKey x509SecurityKey && (x509SecurityKey.Certificate.NotBefore > DateTime.Now || x509SecurityKey.Certificate.NotAfter < DateTime.Now))) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1087)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0088)); } if (options.EnableDegradedMode) @@ -137,7 +137,7 @@ namespace OpenIddict.Server descriptor.Type == OpenIddictServerHandlerType.Custom && descriptor.FilterTypes.All(type => !typeof(RequireDegradedModeDisabled).IsAssignableFrom(type)))) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1088)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0089)); } if (options.DeviceEndpointUris.Count != 0 && !options.Handlers.Any( @@ -145,7 +145,7 @@ namespace OpenIddict.Server descriptor.Type == OpenIddictServerHandlerType.Custom && descriptor.FilterTypes.All(type => !typeof(RequireDegradedModeDisabled).IsAssignableFrom(type)))) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1089)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0090)); } if (options.IntrospectionEndpointUris.Count != 0 && !options.Handlers.Any( @@ -153,7 +153,7 @@ namespace OpenIddict.Server descriptor.Type == OpenIddictServerHandlerType.Custom && descriptor.FilterTypes.All(type => !typeof(RequireDegradedModeDisabled).IsAssignableFrom(type)))) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1090)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0091)); } if (options.LogoutEndpointUris.Count != 0 && !options.Handlers.Any( @@ -161,7 +161,7 @@ namespace OpenIddict.Server descriptor.Type == OpenIddictServerHandlerType.Custom && descriptor.FilterTypes.All(type => !typeof(RequireDegradedModeDisabled).IsAssignableFrom(type)))) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1091)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0092)); } if (options.RevocationEndpointUris.Count != 0 && !options.Handlers.Any( @@ -169,7 +169,7 @@ namespace OpenIddict.Server descriptor.Type == OpenIddictServerHandlerType.Custom && descriptor.FilterTypes.All(type => !typeof(RequireDegradedModeDisabled).IsAssignableFrom(type)))) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1092)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0093)); } if (options.TokenEndpointUris.Count != 0 && !options.Handlers.Any( @@ -177,7 +177,7 @@ namespace OpenIddict.Server descriptor.Type == OpenIddictServerHandlerType.Custom && descriptor.FilterTypes.All(type => !typeof(RequireDegradedModeDisabled).IsAssignableFrom(type)))) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1093)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0094)); } if (options.VerificationEndpointUris.Count != 0 && !options.Handlers.Any( @@ -185,7 +185,7 @@ namespace OpenIddict.Server descriptor.Type == OpenIddictServerHandlerType.Custom && descriptor.FilterTypes.All(type => !typeof(RequireDegradedModeDisabled).IsAssignableFrom(type)))) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1094)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0095)); } // If the degraded mode was enabled, ensure custom authentication/sign-in handlers @@ -198,7 +198,7 @@ namespace OpenIddict.Server descriptor.Type == OpenIddictServerHandlerType.Custom && descriptor.FilterTypes.All(type => !typeof(RequireDegradedModeDisabled).IsAssignableFrom(type)))) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1095)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0096)); } if (!options.Handlers.Any( @@ -206,7 +206,7 @@ namespace OpenIddict.Server descriptor.Type == OpenIddictServerHandlerType.Custom && descriptor.FilterTypes.All(type => !typeof(RequireDegradedModeDisabled).IsAssignableFrom(type)))) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1096)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0097)); } } } @@ -323,7 +323,7 @@ namespace OpenIddict.Server { parameters = rsaSecurityKey.Rsa.ExportParameters(includePrivateParameters: false); - Debug.Assert(parameters.Modulus is not null, SR.GetResourceString(SR.ID5003)); + Debug.Assert(parameters.Modulus is not null, SR.GetResourceString(SR.ID4003)); } // Only use the 40 first chars of the base64url-encoded modulus. @@ -337,7 +337,7 @@ namespace OpenIddict.Server // Extract the ECDSA parameters from the signing credentials. var parameters = ecsdaSecurityKey.ECDsa.ExportParameters(includePrivateParameters: false); - Debug.Assert(parameters.Q.X is not null, SR.GetResourceString(SR.ID5004)); + Debug.Assert(parameters.Q.X is not null, SR.GetResourceString(SR.ID4004)); // Only use the 40 first chars of the base64url-encoded X coordinate. var identifier = Base64UrlEncoder.Encode(parameters.Q.X); diff --git a/src/OpenIddict.Server/OpenIddictServerDispatcher.cs b/src/OpenIddict.Server/OpenIddictServerDispatcher.cs index 51dc2df4..0b7735b1 100644 --- a/src/OpenIddict.Server/OpenIddictServerDispatcher.cs +++ b/src/OpenIddict.Server/OpenIddictServerDispatcher.cs @@ -49,14 +49,14 @@ namespace OpenIddict.Server catch (Exception exception) when (_logger.IsEnabled(LogLevel.Debug)) { - _logger.LogDebug(exception, SR.GetResourceString(SR.ID7132), handler.GetType().FullName, typeof(TContext).FullName); + _logger.LogDebug(exception, SR.GetResourceString(SR.ID6132), handler.GetType().FullName, typeof(TContext).FullName); throw; } if (_logger.IsEnabled(LogLevel.Debug)) { - _logger.LogDebug(SR.GetResourceString(SR.ID7133), typeof(TContext).FullName, handler.GetType().FullName); + _logger.LogDebug(SR.GetResourceString(SR.ID6133), typeof(TContext).FullName, handler.GetType().FullName); } switch (context) @@ -64,21 +64,21 @@ namespace OpenIddict.Server case BaseRequestContext notification when notification.IsRequestHandled: if (_logger.IsEnabled(LogLevel.Debug)) { - _logger.LogDebug(SR.GetResourceString(SR.ID7134), typeof(TContext).FullName, handler.GetType().FullName); + _logger.LogDebug(SR.GetResourceString(SR.ID6134), typeof(TContext).FullName, handler.GetType().FullName); } return; case BaseRequestContext notification when notification.IsRequestSkipped: if (_logger.IsEnabled(LogLevel.Debug)) { - _logger.LogDebug(SR.GetResourceString(SR.ID7135), typeof(TContext).FullName, handler.GetType().FullName); + _logger.LogDebug(SR.GetResourceString(SR.ID6135), typeof(TContext).FullName, handler.GetType().FullName); } return; case BaseValidatingContext notification when notification.IsRejected: if (_logger.IsEnabled(LogLevel.Debug)) { - _logger.LogDebug(SR.GetResourceString(SR.ID7136), typeof(TContext).FullName, handler.GetType().FullName); + _logger.LogDebug(SR.GetResourceString(SR.ID6136), typeof(TContext).FullName, handler.GetType().FullName); } return; @@ -109,7 +109,7 @@ namespace OpenIddict.Server if (handler is null) { - throw new InvalidOperationException(SR.FormatID1097(descriptor.ServiceDescriptor.ServiceType)); + throw new InvalidOperationException(SR.FormatID0098(descriptor.ServiceDescriptor.ServiceType)); } yield return handler; @@ -122,7 +122,7 @@ namespace OpenIddict.Server { if (!(_provider.GetService(descriptor.FilterTypes[index]) is IOpenIddictServerHandlerFilter filter)) { - throw new InvalidOperationException(SR.FormatID1098(descriptor.FilterTypes[index])); + throw new InvalidOperationException(SR.FormatID0099(descriptor.FilterTypes[index])); } if (!await filter.IsActiveAsync(context)) diff --git a/src/OpenIddict.Server/OpenIddictServerEvents.Authentication.cs b/src/OpenIddict.Server/OpenIddictServerEvents.Authentication.cs index 3684c0b4..9350d710 100644 --- a/src/OpenIddict.Server/OpenIddictServerEvents.Authentication.cs +++ b/src/OpenIddict.Server/OpenIddictServerEvents.Authentication.cs @@ -80,7 +80,7 @@ namespace OpenIddict.Server { if (string.IsNullOrEmpty(address)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1099), nameof(address)); + throw new ArgumentException(SR.GetResourceString(SR.ID0100), nameof(address)); } // Don't allow validation to alter the redirect_uri parameter extracted @@ -88,7 +88,7 @@ namespace OpenIddict.Server if (!string.IsNullOrEmpty(Request?.RedirectUri) && !string.Equals(Request.RedirectUri, address, StringComparison.Ordinal)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1100)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0101)); } RedirectUri = address; diff --git a/src/OpenIddict.Server/OpenIddictServerEvents.Session.cs b/src/OpenIddict.Server/OpenIddictServerEvents.Session.cs index ccc4293f..58702e16 100644 --- a/src/OpenIddict.Server/OpenIddictServerEvents.Session.cs +++ b/src/OpenIddict.Server/OpenIddictServerEvents.Session.cs @@ -72,7 +72,7 @@ namespace OpenIddict.Server { if (string.IsNullOrEmpty(address)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1101), nameof(address)); + throw new ArgumentException(SR.GetResourceString(SR.ID0102), nameof(address)); } // Don't allow validation to alter the post_logout_redirect_uri parameter extracted @@ -80,7 +80,7 @@ namespace OpenIddict.Server if (!string.IsNullOrEmpty(Request?.PostLogoutRedirectUri) && !string.Equals(Request.PostLogoutRedirectUri, address, StringComparison.Ordinal)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1102)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0103)); } PostLogoutRedirectUri = address; diff --git a/src/OpenIddict.Server/OpenIddictServerHandlerDescriptor.cs b/src/OpenIddict.Server/OpenIddictServerHandlerDescriptor.cs index b5c143ea..3b5c66f2 100644 --- a/src/OpenIddict.Server/OpenIddictServerHandlerDescriptor.cs +++ b/src/OpenIddict.Server/OpenIddictServerHandlerDescriptor.cs @@ -86,7 +86,7 @@ namespace OpenIddict.Server if (!typeof(IOpenIddictServerHandlerFilter<>).MakeGenericType(typeof(TContext)).IsAssignableFrom(type)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1103)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0104)); } _filterTypes.Add(type); @@ -118,7 +118,7 @@ namespace OpenIddict.Server var type = descriptor.ServiceType; if (!typeof(IOpenIddictServerHandler<>).MakeGenericType(typeof(TContext)).IsAssignableFrom(type)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1103)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0104)); } _descriptor = descriptor; @@ -216,7 +216,7 @@ namespace OpenIddict.Server ContextType = typeof(TContext), FilterTypes = _filterTypes.ToImmutableArray(), Order = _order, - ServiceDescriptor = _descriptor ?? throw new InvalidOperationException(SR.GetResourceString(SR.ID1104)), + ServiceDescriptor = _descriptor ?? throw new InvalidOperationException(SR.GetResourceString(SR.ID0105)), Type = _type }; } diff --git a/src/OpenIddict.Server/OpenIddictServerHandlers.Authentication.cs b/src/OpenIddict.Server/OpenIddictServerHandlers.Authentication.cs index a283a161..6b22bbc0 100644 --- a/src/OpenIddict.Server/OpenIddictServerHandlers.Authentication.cs +++ b/src/OpenIddict.Server/OpenIddictServerHandlers.Authentication.cs @@ -119,10 +119,10 @@ namespace OpenIddict.Server if (notification.Request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1026)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0027)); } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7030), notification.Request); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6030), notification.Request); } } @@ -185,10 +185,10 @@ namespace OpenIddict.Server if (string.IsNullOrEmpty(notification.RedirectUri)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1027)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0028)); } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7031)); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6031)); } } @@ -277,7 +277,7 @@ namespace OpenIddict.Server } } - throw new InvalidOperationException(SR.GetResourceString(SR.ID1028)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0029)); } } @@ -325,7 +325,7 @@ namespace OpenIddict.Server return; } - throw new InvalidOperationException(SR.GetResourceString(SR.ID1029)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0030)); } } @@ -355,11 +355,11 @@ namespace OpenIddict.Server // Reject requests using the unsupported request parameter. if (!string.IsNullOrEmpty(context.Request.Request)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7032), Parameters.Request); + context.Logger.LogError(SR.GetResourceString(SR.ID6032), Parameters.Request); context.Reject( error: Errors.RequestNotSupported, - description: context.Localizer[SR.ID3028, Parameters.Request]); + description: context.Localizer[SR.ID2028, Parameters.Request]); return default; } @@ -394,11 +394,11 @@ namespace OpenIddict.Server // Reject requests using the unsupported request_uri parameter. if (!string.IsNullOrEmpty(context.Request.RequestUri)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7032), Parameters.RequestUri); + context.Logger.LogError(SR.GetResourceString(SR.ID6032), Parameters.RequestUri); context.Reject( error: Errors.RequestUriNotSupported, - description: context.Localizer[SR.ID3028, Parameters.RequestUri]); + description: context.Localizer[SR.ID2028, Parameters.RequestUri]); return default; } @@ -434,11 +434,11 @@ namespace OpenIddict.Server // See http://openid.net/specs/openid-connect-core-1_0.html#AuthRequest. if (string.IsNullOrEmpty(context.ClientId)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7033), Parameters.ClientId); + context.Logger.LogError(SR.GetResourceString(SR.ID6033), Parameters.ClientId); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3029, Parameters.ClientId]); + description: context.Localizer[SR.ID2029, Parameters.ClientId]); return default; } @@ -479,11 +479,11 @@ namespace OpenIddict.Server { if (context.Request.HasScope(Scopes.OpenId)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7033), Parameters.RedirectUri); + context.Logger.LogError(SR.GetResourceString(SR.ID6033), Parameters.RedirectUri); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3029, Parameters.RedirectUri]); + description: context.Localizer[SR.ID2029, Parameters.RedirectUri]); return default; } @@ -501,11 +501,11 @@ namespace OpenIddict.Server // See https://github.com/dotnet/corefx/issues/22098 for more information. if (!Uri.TryCreate(context.RedirectUri, UriKind.Absolute, out Uri? uri) || !uri.IsWellFormedOriginalString()) { - context.Logger.LogError(SR.GetResourceString(SR.ID7034), Parameters.RedirectUri, context.RedirectUri); + context.Logger.LogError(SR.GetResourceString(SR.ID6034), Parameters.RedirectUri, context.RedirectUri); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3030, Parameters.RedirectUri]); + description: context.Localizer[SR.ID2030, Parameters.RedirectUri]); return default; } @@ -515,11 +515,11 @@ namespace OpenIddict.Server // and http://openid.net/specs/openid-connect-core-1_0.html#AuthRequest if (!string.IsNullOrEmpty(uri.Fragment)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7035), Parameters.RedirectUri, context.RedirectUri); + context.Logger.LogError(SR.GetResourceString(SR.ID6035), Parameters.RedirectUri, context.RedirectUri); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3031, Parameters.RedirectUri]); + description: context.Localizer[SR.ID2031, Parameters.RedirectUri]); return default; } @@ -554,11 +554,11 @@ namespace OpenIddict.Server // Reject requests missing the mandatory response_type parameter. if (string.IsNullOrEmpty(context.Request.ResponseType)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7033), Parameters.ResponseType); + context.Logger.LogError(SR.GetResourceString(SR.ID6033), Parameters.ResponseType); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3029, Parameters.ResponseType]); + description: context.Localizer[SR.ID2029, Parameters.ResponseType]); return default; } @@ -568,11 +568,11 @@ namespace OpenIddict.Server if (!context.Options.ResponseTypes.Any(type => types.SetEquals(type.Split(Separators.Space, StringSplitOptions.RemoveEmptyEntries)))) { - context.Logger.LogError(SR.GetResourceString(SR.ID7036), context.Request.ResponseType); + context.Logger.LogError(SR.GetResourceString(SR.ID6036), context.Request.ResponseType); context.Reject( error: Errors.UnsupportedResponseType, - description: context.Localizer[SR.ID3032, Parameters.ResponseType]); + description: context.Localizer[SR.ID2032, Parameters.ResponseType]); return default; } @@ -610,11 +610,11 @@ namespace OpenIddict.Server if (context.Request.IsQueryResponseMode() && (context.Request.HasResponseType(ResponseTypes.IdToken) || context.Request.HasResponseType(ResponseTypes.Token))) { - context.Logger.LogError(SR.GetResourceString(SR.ID7037), context.Request.ResponseType, context.Request.ResponseMode); + context.Logger.LogError(SR.GetResourceString(SR.ID6037), context.Request.ResponseType, context.Request.ResponseMode); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3033, Parameters.ResponseType, Parameters.ResponseMode]); + description: context.Localizer[SR.ID2033, Parameters.ResponseType, Parameters.ResponseMode]); return default; } @@ -623,11 +623,11 @@ namespace OpenIddict.Server // if the default response_mode inferred from the response_type was explicitly disabled in the options. if (!ValidateResponseMode(context.Request, context.Options)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7038), context.Request.ResponseMode); + context.Logger.LogError(SR.GetResourceString(SR.ID6038), context.Request.ResponseMode); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3032, Parameters.ResponseMode]); + description: context.Localizer[SR.ID2032, Parameters.ResponseMode]); return default; } @@ -687,11 +687,11 @@ namespace OpenIddict.Server // Reject authorization requests containing the id_token response_type if no openid scope has been received. if (context.Request.HasResponseType(ResponseTypes.IdToken) && !context.Request.HasScope(Scopes.OpenId)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7039), Scopes.OpenId); + context.Logger.LogError(SR.GetResourceString(SR.ID6039), Scopes.OpenId); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3034, Scopes.OpenId]); + description: context.Localizer[SR.ID2034, Scopes.OpenId]); return default; } @@ -701,7 +701,7 @@ namespace OpenIddict.Server { context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3035, Scopes.OfflineAccess]); + description: context.Localizer[SR.ID2035, Scopes.OfflineAccess]); return default; } @@ -745,11 +745,11 @@ namespace OpenIddict.Server if (context.Request.IsImplicitFlow() || context.Request.IsHybridFlow()) { - context.Logger.LogError(SR.GetResourceString(SR.ID7033), Parameters.Nonce); + context.Logger.LogError(SR.GetResourceString(SR.ID6033), Parameters.Nonce); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3029, Parameters.Nonce]); + description: context.Localizer[SR.ID2029, Parameters.Nonce]); return default; } @@ -786,11 +786,11 @@ namespace OpenIddict.Server context.Request.HasPrompt(Prompts.Login) || context.Request.HasPrompt(Prompts.SelectAccount))) { - context.Logger.LogError(SR.GetResourceString(SR.ID7040)); + context.Logger.LogError(SR.GetResourceString(SR.ID6040)); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3052, Parameters.Prompt]); + description: context.Localizer[SR.ID2052, Parameters.Prompt]); return default; } @@ -831,11 +831,11 @@ namespace OpenIddict.Server // Ensure a code_challenge was specified if a code_challenge_method was used. if (string.IsNullOrEmpty(context.Request.CodeChallenge)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7033), Parameters.CodeChallenge); + context.Logger.LogError(SR.GetResourceString(SR.ID6033), Parameters.CodeChallenge); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3037, Parameters.CodeChallengeMethod, Parameters.CodeChallenge]); + description: context.Localizer[SR.ID2037, Parameters.CodeChallengeMethod, Parameters.CodeChallenge]); return default; } @@ -845,11 +845,11 @@ namespace OpenIddict.Server if (string.IsNullOrEmpty(context.Request.CodeChallengeMethod) && !context.Options.CodeChallengeMethods.Contains(CodeChallengeMethods.Plain)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7033), Parameters.CodeChallengeMethod); + context.Logger.LogError(SR.GetResourceString(SR.ID6033), Parameters.CodeChallengeMethod); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3029, Parameters.CodeChallengeMethod]); + description: context.Localizer[SR.ID2029, Parameters.CodeChallengeMethod]); return default; } @@ -858,11 +858,11 @@ namespace OpenIddict.Server if (!string.IsNullOrEmpty(context.Request.CodeChallengeMethod) && !context.Options.CodeChallengeMethods.Contains(context.Request.CodeChallengeMethod)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7041)); + context.Logger.LogError(SR.GetResourceString(SR.ID6041)); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3032, Parameters.CodeChallengeMethod]); + description: context.Localizer[SR.ID2032, Parameters.CodeChallengeMethod]); return default; } @@ -870,11 +870,11 @@ namespace OpenIddict.Server // When code_challenge or code_challenge_method is specified, ensure the response_type includes "code". if (!context.Request.HasResponseType(ResponseTypes.Code)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7042)); + context.Logger.LogError(SR.GetResourceString(SR.ID6042)); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3040, Parameters.CodeChallenge, + description: context.Localizer[SR.ID2040, Parameters.CodeChallenge, Parameters.CodeChallengeMethod, ResponseTypes.Code]); return default; @@ -883,11 +883,11 @@ namespace OpenIddict.Server // Reject authorization requests that contain response_type=token when a code_challenge is specified. if (context.Request.HasResponseType(ResponseTypes.Token)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7043)); + context.Logger.LogError(SR.GetResourceString(SR.ID6043)); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3041, Parameters.ResponseType]); + description: context.Localizer[SR.ID2041, Parameters.ResponseType]); return default; } @@ -904,7 +904,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictApplicationManager _applicationManager; - public ValidateClientId() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ValidateClientId() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ValidateClientId(IOpenIddictApplicationManager applicationManager) => _applicationManager = applicationManager; @@ -928,16 +928,16 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID5000(Parameters.ClientId)); + Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID4000(Parameters.ClientId)); var application = await _applicationManager.FindByClientIdAsync(context.ClientId); if (application is null) { - context.Logger.LogError(SR.GetResourceString(SR.ID7044), context.ClientId); + context.Logger.LogError(SR.GetResourceString(SR.ID6044), context.ClientId); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3052, Parameters.ClientId]); + description: context.Localizer[SR.ID2052, Parameters.ClientId]); return; } @@ -953,7 +953,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictApplicationManager _applicationManager; - public ValidateClientType() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ValidateClientType() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ValidateClientType(IOpenIddictApplicationManager applicationManager) => _applicationManager = applicationManager; @@ -977,12 +977,12 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID5000(Parameters.ClientId)); + Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID4000(Parameters.ClientId)); var application = await _applicationManager.FindByClientIdAsync(context.ClientId); if (application is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1031)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0032)); } // To prevent downgrade attacks, ensure that authorization requests returning an access token directly @@ -992,11 +992,11 @@ namespace OpenIddict.Server if (context.Request.HasResponseType(ResponseTypes.Token) && await _applicationManager.HasClientTypeAsync(application, ClientTypes.Confidential)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7045), context.ClientId); + context.Logger.LogError(SR.GetResourceString(SR.ID6045), context.ClientId); context.Reject( error: Errors.UnauthorizedClient, - description: context.Localizer[SR.ID3043, Parameters.ResponseType]); + description: context.Localizer[SR.ID2043, Parameters.ResponseType]); return; } @@ -1011,7 +1011,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictApplicationManager _applicationManager; - public ValidateClientRedirectUri() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ValidateClientRedirectUri() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ValidateClientRedirectUri(IOpenIddictApplicationManager applicationManager) => _applicationManager = applicationManager; @@ -1035,12 +1035,12 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID5000(Parameters.ClientId)); + Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID4000(Parameters.ClientId)); var application = await _applicationManager.FindByClientIdAsync(context.ClientId); if (application is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1031)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0032)); } // If no explicit redirect_uri was specified, retrieve the addresses associated with @@ -1050,11 +1050,11 @@ namespace OpenIddict.Server var addresses = await _applicationManager.GetRedirectUrisAsync(application); if (addresses.Length != 1) { - context.Logger.LogError(SR.GetResourceString(SR.ID7033), Parameters.RedirectUri); + context.Logger.LogError(SR.GetResourceString(SR.ID6033), Parameters.RedirectUri); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3029, Parameters.RedirectUri]); + description: context.Localizer[SR.ID2029, Parameters.RedirectUri]); return; } @@ -1067,11 +1067,11 @@ namespace OpenIddict.Server // Otherwise, ensure that the specified redirect_uri is valid and is associated with the client application. if (!await _applicationManager.ValidateRedirectUriAsync(application, context.RedirectUri)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7046), context.RedirectUri); + context.Logger.LogError(SR.GetResourceString(SR.ID6046), context.RedirectUri); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3043, Parameters.RedirectUri]); + description: context.Localizer[SR.ID2043, Parameters.RedirectUri]); return; } @@ -1121,7 +1121,7 @@ namespace OpenIddict.Server // even if the service was registered and resolved from the dependency injection container. if (scopes.Count != 0 && !context.Options.EnableDegradedMode) { - Debug.Assert(_scopeManager is not null, SR.GetResourceString(SR.ID5011)); + Debug.Assert(_scopeManager is not null, SR.GetResourceString(SR.ID4011)); await foreach (var scope in _scopeManager.FindByNamesAsync(scopes.ToImmutableArray())) { @@ -1136,11 +1136,11 @@ namespace OpenIddict.Server // If at least one scope was not recognized, return an error. if (scopes.Count != 0) { - context.Logger.LogError(SR.GetResourceString(SR.ID7047), scopes); + context.Logger.LogError(SR.GetResourceString(SR.ID6047), scopes); context.Reject( error: Errors.InvalidScope, - description: context.Localizer[SR.ID3052, Parameters.Scope]); + description: context.Localizer[SR.ID2052, Parameters.Scope]); return; } @@ -1155,7 +1155,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictApplicationManager _applicationManager; - public ValidateEndpointPermissions() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ValidateEndpointPermissions() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ValidateEndpointPermissions(IOpenIddictApplicationManager applicationManager) => _applicationManager = applicationManager; @@ -1180,22 +1180,22 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID5000(Parameters.ClientId)); + Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID4000(Parameters.ClientId)); var application = await _applicationManager.FindByClientIdAsync(context.ClientId); if (application is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1031)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0032)); } // Reject the request if the application is not allowed to use the authorization endpoint. if (!await _applicationManager.HasPermissionAsync(application, Permissions.Endpoints.Authorization)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7048), context.ClientId); + context.Logger.LogError(SR.GetResourceString(SR.ID6048), context.ClientId); context.Reject( error: Errors.UnauthorizedClient, - description: context.Localizer[SR.ID3046]); + description: context.Localizer[SR.ID2046]); return; } @@ -1210,7 +1210,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictApplicationManager _applicationManager; - public ValidateGrantTypePermissions() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ValidateGrantTypePermissions() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ValidateGrantTypePermissions(IOpenIddictApplicationManager applicationManager) => _applicationManager = applicationManager; @@ -1235,23 +1235,23 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID5000(Parameters.ClientId)); + Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID4000(Parameters.ClientId)); var application = await _applicationManager.FindByClientIdAsync(context.ClientId); if (application is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1031)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0032)); } // Reject the request if the application is not allowed to use the authorization code flow. if (context.Request.IsAuthorizationCodeFlow() && !await _applicationManager.HasPermissionAsync(application, Permissions.GrantTypes.AuthorizationCode)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7049), context.ClientId); + context.Logger.LogError(SR.GetResourceString(SR.ID6049), context.ClientId); context.Reject( error: Errors.UnauthorizedClient, - description: context.Localizer[SR.ID3047]); + description: context.Localizer[SR.ID2047]); return; } @@ -1260,11 +1260,11 @@ namespace OpenIddict.Server if (context.Request.IsImplicitFlow() && !await _applicationManager.HasPermissionAsync(application, Permissions.GrantTypes.Implicit)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7050), context.ClientId); + context.Logger.LogError(SR.GetResourceString(SR.ID6050), context.ClientId); context.Reject( error: Errors.UnauthorizedClient, - description: context.Localizer[SR.ID3048]); + description: context.Localizer[SR.ID2048]); return; } @@ -1274,11 +1274,11 @@ namespace OpenIddict.Server (!await _applicationManager.HasPermissionAsync(application, Permissions.GrantTypes.AuthorizationCode) || !await _applicationManager.HasPermissionAsync(application, Permissions.GrantTypes.Implicit))) { - context.Logger.LogError(SR.GetResourceString(SR.ID7051), context.ClientId); + context.Logger.LogError(SR.GetResourceString(SR.ID6051), context.ClientId); context.Reject( error: Errors.UnauthorizedClient, - description: context.Localizer[SR.ID3049]); + description: context.Localizer[SR.ID2049]); return; } @@ -1288,11 +1288,11 @@ namespace OpenIddict.Server if (context.Request.HasScope(Scopes.OfflineAccess) && !await _applicationManager.HasPermissionAsync(application, Permissions.GrantTypes.RefreshToken)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7052), context.ClientId, Scopes.OfflineAccess); + context.Logger.LogError(SR.GetResourceString(SR.ID6052), context.ClientId, Scopes.OfflineAccess); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3065, Scopes.OfflineAccess]); + description: context.Localizer[SR.ID2065, Scopes.OfflineAccess]); return; } @@ -1307,7 +1307,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictApplicationManager _applicationManager; - public ValidateScopePermissions() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ValidateScopePermissions() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ValidateScopePermissions(IOpenIddictApplicationManager applicationManager) => _applicationManager = applicationManager; @@ -1332,12 +1332,12 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID5000(Parameters.ClientId)); + Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID4000(Parameters.ClientId)); var application = await _applicationManager.FindByClientIdAsync(context.ClientId); if (application is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1031)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0032)); } foreach (var scope in context.Request.GetScopes()) @@ -1352,11 +1352,11 @@ namespace OpenIddict.Server // Reject the request if the application is not allowed to use the iterated scope. if (!await _applicationManager.HasPermissionAsync(application, Permissions.Prefixes.Scope + scope)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7052), context.ClientId, scope); + context.Logger.LogError(SR.GetResourceString(SR.ID6052), context.ClientId, scope); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3051]); + description: context.Localizer[SR.ID2051]); return; } @@ -1373,7 +1373,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictApplicationManager _applicationManager; - public ValidateProofKeyForCodeExchangeRequirement() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ValidateProofKeyForCodeExchangeRequirement() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ValidateProofKeyForCodeExchangeRequirement(IOpenIddictApplicationManager applicationManager) => _applicationManager = applicationManager; @@ -1397,7 +1397,7 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID5000(Parameters.ClientId)); + Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID4000(Parameters.ClientId)); // If a code_challenge was provided, the request is always considered valid, // whether the proof key for code exchange requirement is enforced or not. @@ -1409,16 +1409,16 @@ namespace OpenIddict.Server var application = await _applicationManager.FindByClientIdAsync(context.ClientId); if (application is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1031)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0032)); } if (await _applicationManager.HasRequirementAsync(application, Requirements.Features.ProofKeyForCodeExchange)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7033), Parameters.CodeChallenge); + context.Logger.LogError(SR.GetResourceString(SR.ID6033), Parameters.CodeChallenge); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3054, Parameters.CodeChallenge]); + description: context.Localizer[SR.ID2054, Parameters.CodeChallenge]); return; } diff --git a/src/OpenIddict.Server/OpenIddictServerHandlers.Device.cs b/src/OpenIddict.Server/OpenIddictServerHandlers.Device.cs index 93ba9d91..a3cbb1da 100644 --- a/src/OpenIddict.Server/OpenIddictServerHandlers.Device.cs +++ b/src/OpenIddict.Server/OpenIddictServerHandlers.Device.cs @@ -117,10 +117,10 @@ namespace OpenIddict.Server if (notification.Request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1030)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0031)); } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7054), notification.Request); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6054), notification.Request); } } @@ -177,7 +177,7 @@ namespace OpenIddict.Server return; } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7055)); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6055)); } } @@ -318,7 +318,7 @@ namespace OpenIddict.Server return; } - throw new InvalidOperationException(SR.GetResourceString(SR.ID1032)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0033)); } } @@ -349,11 +349,11 @@ namespace OpenIddict.Server // See https://tools.ietf.org/html/rfc8628#section-3.1 for more information. if (string.IsNullOrEmpty(context.ClientId)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7056)); + context.Logger.LogError(SR.GetResourceString(SR.ID6056)); context.Reject( error: Errors.InvalidClient, - description: context.Localizer[SR.ID3029, Parameters.ClientId]); + description: context.Localizer[SR.ID2029, Parameters.ClientId]); return default; } @@ -405,7 +405,7 @@ namespace OpenIddict.Server // even if the service was registered and resolved from the dependency injection container. if (scopes.Count != 0 && !context.Options.EnableDegradedMode) { - Debug.Assert(_scopeManager is not null, SR.GetResourceString(SR.ID5011)); + Debug.Assert(_scopeManager is not null, SR.GetResourceString(SR.ID4011)); await foreach (var scope in _scopeManager.FindByNamesAsync(scopes.ToImmutableArray())) { @@ -420,11 +420,11 @@ namespace OpenIddict.Server // If at least one scope was not recognized, return an error. if (scopes.Count != 0) { - context.Logger.LogError(SR.GetResourceString(SR.ID7057), scopes); + context.Logger.LogError(SR.GetResourceString(SR.ID6057), scopes); context.Reject( error: Errors.InvalidScope, - description: context.Localizer[SR.ID3052, Parameters.Scope]); + description: context.Localizer[SR.ID2052, Parameters.Scope]); return; } @@ -439,7 +439,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictApplicationManager _applicationManager; - public ValidateClientId() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ValidateClientId() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ValidateClientId(IOpenIddictApplicationManager applicationManager) => _applicationManager = applicationManager; @@ -464,18 +464,18 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID5000(Parameters.ClientId)); + Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID4000(Parameters.ClientId)); // Retrieve the application details corresponding to the requested client_id. // If no entity can be found, this likely indicates that the client_id is invalid. var application = await _applicationManager.FindByClientIdAsync(context.ClientId); if (application is null) { - context.Logger.LogError(SR.GetResourceString(SR.ID7058), context.ClientId); + context.Logger.LogError(SR.GetResourceString(SR.ID6058), context.ClientId); context.Reject( error: Errors.InvalidClient, - description: context.Localizer[SR.ID3052]); + description: context.Localizer[SR.ID2052]); return; } @@ -491,7 +491,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictApplicationManager _applicationManager; - public ValidateClientType() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ValidateClientType() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ValidateClientType(IOpenIddictApplicationManager applicationManager) => _applicationManager = applicationManager; @@ -516,12 +516,12 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID5000(Parameters.ClientId)); + Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID4000(Parameters.ClientId)); var application = await _applicationManager.FindByClientIdAsync(context.ClientId); if (application is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1031)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0032)); } if (await _applicationManager.HasClientTypeAsync(application, ClientTypes.Public)) @@ -529,11 +529,11 @@ namespace OpenIddict.Server // Reject device requests containing a client_secret when the client is a public application. if (!string.IsNullOrEmpty(context.ClientSecret)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7059), context.ClientId); + context.Logger.LogError(SR.GetResourceString(SR.ID6059), context.ClientId); context.Reject( error: Errors.InvalidClient, - description: context.Localizer[SR.ID3053, Parameters.ClientSecret]); + description: context.Localizer[SR.ID2053, Parameters.ClientSecret]); return; } @@ -544,11 +544,11 @@ namespace OpenIddict.Server // Confidential and hybrid applications MUST authenticate to protect them from impersonation attacks. if (string.IsNullOrEmpty(context.ClientSecret)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7060), context.ClientId); + context.Logger.LogError(SR.GetResourceString(SR.ID6060), context.ClientId); context.Reject( error: Errors.InvalidClient, - description: context.Localizer[SR.ID3054, Parameters.ClientSecret]); + description: context.Localizer[SR.ID2054, Parameters.ClientSecret]); return; } @@ -563,7 +563,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictApplicationManager _applicationManager; - public ValidateClientSecret() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ValidateClientSecret() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ValidateClientSecret(IOpenIddictApplicationManager applicationManager) => _applicationManager = applicationManager; @@ -588,12 +588,12 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID5000(Parameters.ClientId)); + Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID4000(Parameters.ClientId)); var application = await _applicationManager.FindByClientIdAsync(context.ClientId); if (application is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1031)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0032)); } // If the application is a public client, don't validate the client secret. @@ -602,15 +602,15 @@ namespace OpenIddict.Server return; } - Debug.Assert(!string.IsNullOrEmpty(context.ClientSecret), SR.FormatID5000(Parameters.ClientSecret)); + Debug.Assert(!string.IsNullOrEmpty(context.ClientSecret), SR.FormatID4000(Parameters.ClientSecret)); if (!await _applicationManager.ValidateClientSecretAsync(application, context.ClientSecret)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7061), context.ClientId); + context.Logger.LogError(SR.GetResourceString(SR.ID6061), context.ClientId); context.Reject( error: Errors.InvalidClient, - description: context.Localizer[SR.ID3055]); + description: context.Localizer[SR.ID2055]); return; } @@ -626,7 +626,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictApplicationManager _applicationManager; - public ValidateEndpointPermissions() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ValidateEndpointPermissions() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ValidateEndpointPermissions(IOpenIddictApplicationManager applicationManager) => _applicationManager = applicationManager; @@ -652,22 +652,22 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID5000(Parameters.ClientId)); + Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID4000(Parameters.ClientId)); var application = await _applicationManager.FindByClientIdAsync(context.ClientId); if (application is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1031)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0032)); } // Reject the request if the application is not allowed to use the device endpoint. if (!await _applicationManager.HasPermissionAsync(application, Permissions.Endpoints.Device)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7062), context.ClientId); + context.Logger.LogError(SR.GetResourceString(SR.ID6062), context.ClientId); context.Reject( error: Errors.UnauthorizedClient, - description: context.Localizer[SR.ID3056]); + description: context.Localizer[SR.ID2056]); return; } @@ -683,7 +683,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictApplicationManager _applicationManager; - public ValidateScopePermissions() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ValidateScopePermissions() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ValidateScopePermissions(IOpenIddictApplicationManager applicationManager) => _applicationManager = applicationManager; @@ -709,12 +709,12 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID5000(Parameters.ClientId)); + Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID4000(Parameters.ClientId)); var application = await _applicationManager.FindByClientIdAsync(context.ClientId); if (application is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1031)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0032)); } foreach (var scope in context.Request.GetScopes()) @@ -729,11 +729,11 @@ namespace OpenIddict.Server // Reject the request if the application is not allowed to use the iterated scope. if (!await _applicationManager.HasPermissionAsync(application, Permissions.Prefixes.Scope + scope)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7063), context.ClientId, scope); + context.Logger.LogError(SR.GetResourceString(SR.ID6063), context.ClientId, scope); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3051]); + description: context.Localizer[SR.ID2051]); return; } @@ -796,10 +796,10 @@ namespace OpenIddict.Server if (notification.Request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1033)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0034)); } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7064), notification.Request); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6064), notification.Request); } } @@ -856,7 +856,7 @@ namespace OpenIddict.Server return; } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7065)); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6065)); } } @@ -945,7 +945,7 @@ namespace OpenIddict.Server } } - throw new InvalidOperationException(SR.GetResourceString(SR.ID1034)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0035)); } } @@ -993,7 +993,7 @@ namespace OpenIddict.Server return; } - throw new InvalidOperationException(SR.GetResourceString(SR.ID1035)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0036)); } } diff --git a/src/OpenIddict.Server/OpenIddictServerHandlers.Discovery.cs b/src/OpenIddict.Server/OpenIddictServerHandlers.Discovery.cs index c3cc5a85..cd4eda92 100644 --- a/src/OpenIddict.Server/OpenIddictServerHandlers.Discovery.cs +++ b/src/OpenIddict.Server/OpenIddictServerHandlers.Discovery.cs @@ -121,10 +121,10 @@ namespace OpenIddict.Server if (notification.Request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1036)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0037)); } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7066), notification.Request); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6066), notification.Request); } } @@ -181,7 +181,7 @@ namespace OpenIddict.Server return; } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7067)); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6067)); } } @@ -315,7 +315,7 @@ namespace OpenIddict.Server return; } - throw new InvalidOperationException(SR.GetResourceString(SR.ID1271)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0272)); } } @@ -388,7 +388,7 @@ namespace OpenIddict.Server // At this stage, throw an exception if the issuer cannot be retrieved. if (issuer is null || !issuer.IsAbsoluteUri) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1022)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0023)); } // Ensure the issuer ends with a trailing slash, as it is necessary @@ -814,10 +814,10 @@ namespace OpenIddict.Server if (notification.Request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1037)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0038)); } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7068), notification.Request); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6068), notification.Request); } } @@ -874,7 +874,7 @@ namespace OpenIddict.Server return; } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7069)); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6069)); } } @@ -942,7 +942,7 @@ namespace OpenIddict.Server // See https://tools.ietf.org/html/rfc7517#section-4.1 if (string.IsNullOrEmpty(key.Kty)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7070), JsonWebKeyParameterNames.Kty); + context.Logger.LogError(SR.GetResourceString(SR.ID6070), JsonWebKeyParameterNames.Kty); continue; } @@ -1050,7 +1050,7 @@ namespace OpenIddict.Server return; } - throw new InvalidOperationException(SR.GetResourceString(SR.ID1038)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0039)); } } @@ -1086,7 +1086,7 @@ namespace OpenIddict.Server !credentials.Key.IsSupportedAlgorithm(SecurityAlgorithms.EcdsaSha384) && !credentials.Key.IsSupportedAlgorithm(SecurityAlgorithms.EcdsaSha512)) { - context.Logger.LogInformation(SR.GetResourceString(SR.ID7071), credentials.Key.GetType().Name); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6071), credentials.Key.GetType().Name); continue; } @@ -1094,7 +1094,7 @@ namespace OpenIddict.Server if (!credentials.Key.IsSupportedAlgorithm(SecurityAlgorithms.RsaSha256) && !credentials.Key.IsSupportedAlgorithm(SecurityAlgorithms.RsaSsaPssSha256)) { - context.Logger.LogInformation(SR.GetResourceString(SR.ID7072), credentials.Key.GetType().Name); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6072), credentials.Key.GetType().Name); continue; } @@ -1159,13 +1159,13 @@ namespace OpenIddict.Server if (parameters is null) { - context.Logger.LogWarning(SR.GetResourceString(SR.ID7073), credentials.Key.GetType().Name); + context.Logger.LogWarning(SR.GetResourceString(SR.ID6073), credentials.Key.GetType().Name); continue; } Debug.Assert(parameters.Value.Exponent is not null && - parameters.Value.Modulus is not null, SR.GetResourceString(SR.ID5003)); + parameters.Value.Modulus is not null, SR.GetResourceString(SR.ID4003)); key.Kty = JsonWebAlgorithmsKeyTypes.RSA; @@ -1193,15 +1193,15 @@ namespace OpenIddict.Server if (parameters is null) { - context.Logger.LogWarning(SR.GetResourceString(SR.ID7074), credentials.Key.GetType().Name); + context.Logger.LogWarning(SR.GetResourceString(SR.ID6074), credentials.Key.GetType().Name); continue; } Debug.Assert(parameters.Value.Q.X is not null && - parameters.Value.Q.Y is not null, SR.GetResourceString(SR.ID5004)); + parameters.Value.Q.Y is not null, SR.GetResourceString(SR.ID4004)); - Debug.Assert(parameters.Value.Curve.IsNamed, SR.GetResourceString(SR.ID5005)); + Debug.Assert(parameters.Value.Curve.IsNamed, SR.GetResourceString(SR.ID4005)); key.Kty = JsonWebAlgorithmsKeyTypes.EllipticCurve; key.Crv = IsCurve(parameters.Value, ECCurve.NamedCurves.nistP256) ? JsonWebKeyECTypes.P256 : @@ -1252,7 +1252,7 @@ namespace OpenIddict.Server using var hash = CryptoConfig.CreateFromName(algorithm.Name) as HashAlgorithm; if (hash is null || hash is KeyedHashAlgorithm) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1216)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0217)); } return hash.ComputeHash(certificate.RawData); diff --git a/src/OpenIddict.Server/OpenIddictServerHandlers.Exchange.cs b/src/OpenIddict.Server/OpenIddictServerHandlers.Exchange.cs index aaf22562..ee2a8160 100644 --- a/src/OpenIddict.Server/OpenIddictServerHandlers.Exchange.cs +++ b/src/OpenIddict.Server/OpenIddictServerHandlers.Exchange.cs @@ -125,10 +125,10 @@ namespace OpenIddict.Server if (notification.Request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1039)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0040)); } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7075), notification.Request); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6075), notification.Request); } } @@ -189,7 +189,7 @@ namespace OpenIddict.Server return; } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7076)); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6076)); } } @@ -278,7 +278,7 @@ namespace OpenIddict.Server } } - throw new InvalidOperationException(SR.GetResourceString(SR.ID1040)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0041)); } } @@ -326,7 +326,7 @@ namespace OpenIddict.Server return; } - throw new InvalidOperationException(SR.GetResourceString(SR.ID1041)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0042)); } } @@ -356,11 +356,11 @@ namespace OpenIddict.Server // Reject token requests missing the mandatory grant_type parameter. if (string.IsNullOrEmpty(context.Request.GrantType)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7077), Parameters.GrantType); + context.Logger.LogError(SR.GetResourceString(SR.ID6077), Parameters.GrantType); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3029, Parameters.GrantType]); + description: context.Localizer[SR.ID2029, Parameters.GrantType]); return default; } @@ -368,11 +368,11 @@ namespace OpenIddict.Server // Reject token requests that don't specify a supported grant type. if (!context.Options.GrantTypes.Contains(context.Request.GrantType)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7078), context.Request.GrantType); + context.Logger.LogError(SR.GetResourceString(SR.ID6078), context.Request.GrantType); context.Reject( error: Errors.UnsupportedGrantType, - description: context.Localizer[SR.ID3032, Parameters.GrantType]); + description: context.Localizer[SR.ID2032, Parameters.GrantType]); return default; } @@ -383,7 +383,7 @@ namespace OpenIddict.Server { context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3035, Scopes.OfflineAccess]); + description: context.Localizer[SR.ID2035, Scopes.OfflineAccess]); return default; } @@ -427,11 +427,11 @@ namespace OpenIddict.Server // See https://tools.ietf.org/html/rfc6749#section-4.1.3 for more information. if (!context.Options.AcceptAnonymousClients || context.Request.IsAuthorizationCodeGrantType()) { - context.Logger.LogError(SR.GetResourceString(SR.ID7077), Parameters.ClientId); + context.Logger.LogError(SR.GetResourceString(SR.ID6077), Parameters.ClientId); context.Reject( error: Errors.InvalidClient, - description: context.Localizer[SR.ID3029, Parameters.ClientId]); + description: context.Localizer[SR.ID2029, Parameters.ClientId]); return default; } @@ -468,11 +468,11 @@ namespace OpenIddict.Server // See https://tools.ietf.org/html/rfc6749#section-4.1.3 for more information. if (context.Request.IsAuthorizationCodeGrantType() && string.IsNullOrEmpty(context.Request.Code)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7077), Parameters.Code); + context.Logger.LogError(SR.GetResourceString(SR.ID6077), Parameters.Code); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3029, Parameters.Code]); + description: context.Localizer[SR.ID2029, Parameters.Code]); return default; } @@ -512,7 +512,7 @@ namespace OpenIddict.Server { context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3057, Parameters.ClientId, Parameters.ClientSecret]); + description: context.Localizer[SR.ID2057, Parameters.ClientId, Parameters.ClientSecret]); return default; } @@ -551,7 +551,7 @@ namespace OpenIddict.Server { context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3058, Parameters.DeviceCode]); + description: context.Localizer[SR.ID2058, Parameters.DeviceCode]); return default; } @@ -588,11 +588,11 @@ namespace OpenIddict.Server // See https://tools.ietf.org/html/rfc6749#section-6 for more information. if (context.Request.IsRefreshTokenGrantType() && string.IsNullOrEmpty(context.Request.RefreshToken)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7077), Parameters.RefreshToken); + context.Logger.LogError(SR.GetResourceString(SR.ID6077), Parameters.RefreshToken); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3029, Parameters.RefreshToken]); + description: context.Localizer[SR.ID2029, Parameters.RefreshToken]); return default; } @@ -630,11 +630,11 @@ namespace OpenIddict.Server if (context.Request.IsPasswordGrantType() && (string.IsNullOrEmpty(context.Request.Username) || string.IsNullOrEmpty(context.Request.Password))) { - context.Logger.LogError(SR.GetResourceString(SR.ID7079)); + context.Logger.LogError(SR.GetResourceString(SR.ID6079)); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3059, Parameters.Username, Parameters.Password]); + description: context.Localizer[SR.ID2059, Parameters.Username, Parameters.Password]); return default; } @@ -686,7 +686,7 @@ namespace OpenIddict.Server // even if the service was registered and resolved from the dependency injection container. if (scopes.Count != 0 && !context.Options.EnableDegradedMode) { - Debug.Assert(_scopeManager is not null, SR.GetResourceString(SR.ID5011)); + Debug.Assert(_scopeManager is not null, SR.GetResourceString(SR.ID4011)); await foreach (var scope in _scopeManager.FindByNamesAsync(scopes.ToImmutableArray())) { @@ -701,11 +701,11 @@ namespace OpenIddict.Server // If at least one scope was not recognized, return an error. if (scopes.Count != 0) { - context.Logger.LogError(SR.GetResourceString(SR.ID7080), scopes); + context.Logger.LogError(SR.GetResourceString(SR.ID6080), scopes); context.Reject( error: Errors.InvalidScope, - description: context.Localizer[SR.ID3052, Parameters.Scope]); + description: context.Localizer[SR.ID2052, Parameters.Scope]); return; } @@ -720,7 +720,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictApplicationManager _applicationManager; - public ValidateClientId() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ValidateClientId() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ValidateClientId(IOpenIddictApplicationManager applicationManager) => _applicationManager = applicationManager; @@ -745,18 +745,18 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID5000(Parameters.ClientId)); + Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID4000(Parameters.ClientId)); // Retrieve the application details corresponding to the requested client_id. // If no entity can be found, this likely indicates that the client_id is invalid. var application = await _applicationManager.FindByClientIdAsync(context.ClientId); if (application is null) { - context.Logger.LogError(SR.GetResourceString(SR.ID7081), context.ClientId); + context.Logger.LogError(SR.GetResourceString(SR.ID6081), context.ClientId); context.Reject( error: Errors.InvalidClient, - description: context.Localizer[SR.ID3052, Parameters.ClientId]); + description: context.Localizer[SR.ID2052, Parameters.ClientId]); return; } @@ -772,7 +772,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictApplicationManager _applicationManager; - public ValidateClientType() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ValidateClientType() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ValidateClientType(IOpenIddictApplicationManager applicationManager) => _applicationManager = applicationManager; @@ -797,12 +797,12 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID5000(Parameters.ClientId)); + Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID4000(Parameters.ClientId)); var application = await _applicationManager.FindByClientIdAsync(context.ClientId); if (application is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1031)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0032)); } if (await _applicationManager.HasClientTypeAsync(application, ClientTypes.Public)) @@ -810,11 +810,11 @@ namespace OpenIddict.Server // Public applications are not allowed to use the client credentials grant. if (context.Request.IsClientCredentialsGrantType()) { - context.Logger.LogError(SR.GetResourceString(SR.ID7082), context.Request.ClientId); + context.Logger.LogError(SR.GetResourceString(SR.ID6082), context.Request.ClientId); context.Reject( error: Errors.UnauthorizedClient, - description: context.Localizer[SR.ID3043, Parameters.GrantType]); + description: context.Localizer[SR.ID2043, Parameters.GrantType]); return; } @@ -822,11 +822,11 @@ namespace OpenIddict.Server // Reject token requests containing a client_secret when the client is a public application. if (!string.IsNullOrEmpty(context.ClientSecret)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7083), context.ClientId); + context.Logger.LogError(SR.GetResourceString(SR.ID6083), context.ClientId); context.Reject( error: Errors.InvalidClient, - description: context.Localizer[SR.ID3053, Parameters.ClientSecret]); + description: context.Localizer[SR.ID2053, Parameters.ClientSecret]); return; } @@ -837,11 +837,11 @@ namespace OpenIddict.Server // Confidential and hybrid applications MUST authenticate to protect them from impersonation attacks. if (string.IsNullOrEmpty(context.ClientSecret)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7084), context.ClientId); + context.Logger.LogError(SR.GetResourceString(SR.ID6084), context.ClientId); context.Reject( error: Errors.InvalidClient, - description: context.Localizer[SR.ID3054, Parameters.ClientSecret]); + description: context.Localizer[SR.ID2054, Parameters.ClientSecret]); return; } @@ -856,7 +856,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictApplicationManager _applicationManager; - public ValidateClientSecret() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ValidateClientSecret() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ValidateClientSecret(IOpenIddictApplicationManager applicationManager) => _applicationManager = applicationManager; @@ -881,12 +881,12 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID5000(Parameters.ClientId)); + Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID4000(Parameters.ClientId)); var application = await _applicationManager.FindByClientIdAsync(context.ClientId); if (application is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1031)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0032)); } // If the application is a public client, don't validate the client secret. @@ -895,15 +895,15 @@ namespace OpenIddict.Server return; } - Debug.Assert(!string.IsNullOrEmpty(context.ClientSecret), SR.FormatID5000(Parameters.ClientSecret)); + Debug.Assert(!string.IsNullOrEmpty(context.ClientSecret), SR.FormatID4000(Parameters.ClientSecret)); if (!await _applicationManager.ValidateClientSecretAsync(application, context.ClientSecret)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7085), context.ClientId); + context.Logger.LogError(SR.GetResourceString(SR.ID6085), context.ClientId); context.Reject( error: Errors.InvalidClient, - description: context.Localizer[SR.ID3055]); + description: context.Localizer[SR.ID2055]); return; } @@ -919,7 +919,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictApplicationManager _applicationManager; - public ValidateEndpointPermissions() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ValidateEndpointPermissions() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ValidateEndpointPermissions(IOpenIddictApplicationManager applicationManager) => _applicationManager = applicationManager; @@ -945,22 +945,22 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID5000(Parameters.ClientId)); + Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID4000(Parameters.ClientId)); var application = await _applicationManager.FindByClientIdAsync(context.ClientId); if (application is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1031)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0032)); } // Reject the request if the application is not allowed to use the token endpoint. if (!await _applicationManager.HasPermissionAsync(application, Permissions.Endpoints.Token)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7086), context.ClientId); + context.Logger.LogError(SR.GetResourceString(SR.ID6086), context.ClientId); context.Reject( error: Errors.UnauthorizedClient, - description: context.Localizer[SR.ID3063]); + description: context.Localizer[SR.ID2063]); return; } @@ -976,7 +976,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictApplicationManager _applicationManager; - public ValidateGrantTypePermissions() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ValidateGrantTypePermissions() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ValidateGrantTypePermissions(IOpenIddictApplicationManager applicationManager) => _applicationManager = applicationManager; @@ -1002,22 +1002,22 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID5000(Parameters.ClientId)); + Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID4000(Parameters.ClientId)); var application = await _applicationManager.FindByClientIdAsync(context.ClientId); if (application is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1031)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0032)); } // Reject the request if the application is not allowed to use the specified grant type. if (!await _applicationManager.HasPermissionAsync(application, Permissions.Prefixes.GrantType + context.Request.GrantType)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7087), context.ClientId, context.Request.GrantType); + context.Logger.LogError(SR.GetResourceString(SR.ID6087), context.ClientId, context.Request.GrantType); context.Reject( error: Errors.UnauthorizedClient, - description: context.Localizer[SR.ID3064]); + description: context.Localizer[SR.ID2064]); return; } @@ -1027,11 +1027,11 @@ namespace OpenIddict.Server if (context.Request.HasScope(Scopes.OfflineAccess) && !await _applicationManager.HasPermissionAsync(application, Permissions.GrantTypes.RefreshToken)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7088), context.ClientId, Scopes.OfflineAccess); + context.Logger.LogError(SR.GetResourceString(SR.ID6088), context.ClientId, Scopes.OfflineAccess); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3065, Scopes.OfflineAccess]); + description: context.Localizer[SR.ID2065, Scopes.OfflineAccess]); return; } @@ -1047,7 +1047,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictApplicationManager _applicationManager; - public ValidateScopePermissions() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ValidateScopePermissions() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ValidateScopePermissions(IOpenIddictApplicationManager applicationManager) => _applicationManager = applicationManager; @@ -1073,12 +1073,12 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID5000(Parameters.ClientId)); + Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID4000(Parameters.ClientId)); var application = await _applicationManager.FindByClientIdAsync(context.ClientId); if (application is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1031)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0032)); } foreach (var scope in context.Request.GetScopes()) @@ -1093,11 +1093,11 @@ namespace OpenIddict.Server // Reject the request if the application is not allowed to use the iterated scope. if (!await _applicationManager.HasPermissionAsync(application, Permissions.Prefixes.Scope + scope)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7089), context.ClientId, scope); + context.Logger.LogError(SR.GetResourceString(SR.ID6089), context.ClientId, scope); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3051]); + description: context.Localizer[SR.ID2051]); return; } @@ -1114,7 +1114,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictApplicationManager _applicationManager; - public ValidateProofKeyForCodeExchangeRequirement() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ValidateProofKeyForCodeExchangeRequirement() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ValidateProofKeyForCodeExchangeRequirement(IOpenIddictApplicationManager applicationManager) => _applicationManager = applicationManager; @@ -1151,21 +1151,21 @@ namespace OpenIddict.Server return; } - Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID5000(Parameters.ClientId)); + Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID4000(Parameters.ClientId)); var application = await _applicationManager.FindByClientIdAsync(context.ClientId); if (application is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1031)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0032)); } if (await _applicationManager.HasRequirementAsync(application, Requirements.Features.ProofKeyForCodeExchange)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7077), Parameters.CodeVerifier); + context.Logger.LogError(SR.GetResourceString(SR.ID6077), Parameters.CodeVerifier); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3054, Parameters.CodeVerifier]); + description: context.Localizer[SR.ID2054, Parameters.CodeVerifier]); return; } @@ -1272,7 +1272,7 @@ namespace OpenIddict.Server return default; } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); var presenters = context.Principal.GetPresenters(); if (presenters.IsDefaultOrEmpty) @@ -1281,12 +1281,12 @@ namespace OpenIddict.Server // was issued to a public client but cannot be null for an authorization or device code grant request. if (context.Request.IsAuthorizationCodeGrantType()) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1042)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0043)); } if (context.Request.IsDeviceCodeGrantType()) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1043)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0044)); } return default; @@ -1296,13 +1296,13 @@ namespace OpenIddict.Server // reject the request if the client_id of the caller cannot be retrieved or inferred. if (string.IsNullOrEmpty(context.ClientId)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7090)); + context.Logger.LogError(SR.GetResourceString(SR.ID6090)); context.Reject( error: Errors.InvalidGrant, - description: context.Request.IsAuthorizationCodeGrantType() ? context.Localizer[SR.ID3066] : - context.Request.IsDeviceCodeGrantType() ? context.Localizer[SR.ID3067] : - context.Localizer[SR.ID3068]); + description: context.Request.IsAuthorizationCodeGrantType() ? context.Localizer[SR.ID2066] : + context.Request.IsDeviceCodeGrantType() ? context.Localizer[SR.ID2067] : + context.Localizer[SR.ID2068]); return default; } @@ -1313,13 +1313,13 @@ namespace OpenIddict.Server // and http://openid.net/specs/openid-connect-core-1_0.html#RefreshingAccessToken. if (!presenters.Contains(context.ClientId)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7091)); + context.Logger.LogError(SR.GetResourceString(SR.ID6091)); context.Reject( error: Errors.InvalidGrant, - description: context.Request.IsAuthorizationCodeGrantType() ? context.Localizer[SR.ID3069] : - context.Request.IsDeviceCodeGrantType() ? context.Localizer[SR.ID3070] : - context.Localizer[SR.ID3071]); + description: context.Request.IsAuthorizationCodeGrantType() ? context.Localizer[SR.ID2069] : + context.Request.IsDeviceCodeGrantType() ? context.Localizer[SR.ID2070] : + context.Localizer[SR.ID2071]); return default; } @@ -1356,7 +1356,7 @@ namespace OpenIddict.Server return default; } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); // Validate the redirect_uri sent by the client application as part of this token request. // Note: for pure OAuth 2.0 requests, redirect_uri is only mandatory if the authorization request @@ -1373,22 +1373,22 @@ namespace OpenIddict.Server if (string.IsNullOrEmpty(context.Request.RedirectUri)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7077), Parameters.RedirectUri); + context.Logger.LogError(SR.GetResourceString(SR.ID6077), Parameters.RedirectUri); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3029, Parameters.RedirectUri]); + description: context.Localizer[SR.ID2029, Parameters.RedirectUri]); return default; } if (!string.Equals(address, context.Request.RedirectUri, StringComparison.Ordinal)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7092), Parameters.RedirectUri); + context.Logger.LogError(SR.GetResourceString(SR.ID6092), Parameters.RedirectUri); context.Reject( error: Errors.InvalidGrant, - description: context.Localizer[SR.ID3072, Parameters.RedirectUri]); + description: context.Localizer[SR.ID2072, Parameters.RedirectUri]); return default; } @@ -1425,7 +1425,7 @@ namespace OpenIddict.Server return default; } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); // Note: the ValidateProofKeyForCodeExchangeRequirement handler (invoked earlier) ensures // a code_verifier is specified if the proof key for code exchange requirement was enforced @@ -1440,11 +1440,11 @@ namespace OpenIddict.Server // when code_challenge private claim was attached to the authorization code. if (!string.IsNullOrEmpty(context.Request.CodeVerifier)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7093), Parameters.CodeVerifier); + context.Logger.LogError(SR.GetResourceString(SR.ID6093), Parameters.CodeVerifier); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3073, Parameters.CodeVerifier, Parameters.CodeChallenge]); + description: context.Localizer[SR.ID2073, Parameters.CodeVerifier, Parameters.CodeChallenge]); return default; } @@ -1455,11 +1455,11 @@ namespace OpenIddict.Server // Get the code verifier from the token request. If it cannot be found, return an invalid_grant error. if (string.IsNullOrEmpty(context.Request.CodeVerifier)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7077), Parameters.CodeVerifier); + context.Logger.LogError(SR.GetResourceString(SR.ID6077), Parameters.CodeVerifier); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3029, Parameters.CodeVerifier]); + description: context.Localizer[SR.ID2029, Parameters.CodeVerifier]); return default; } @@ -1468,7 +1468,7 @@ namespace OpenIddict.Server var method = context.Principal.GetClaim(Claims.Private.CodeChallengeMethod); if (string.IsNullOrEmpty(method)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1267)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0268)); } // Note: when using the "plain" code challenge method, no hashing is actually performed. @@ -1488,7 +1488,7 @@ namespace OpenIddict.Server else { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1044)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0045)); } // Compare the verifier and the code challenge: if the two don't match, return an error. @@ -1499,11 +1499,11 @@ namespace OpenIddict.Server if (!Arrays.ConstantTimeAreEqual(data, Encoding.ASCII.GetBytes(challenge))) #endif { - context.Logger.LogError(SR.GetResourceString(SR.ID7092), Parameters.CodeVerifier); + context.Logger.LogError(SR.GetResourceString(SR.ID6092), Parameters.CodeVerifier); context.Reject( error: Errors.InvalidGrant, - description: context.Localizer[SR.ID3052, Parameters.CodeVerifier]); + description: context.Localizer[SR.ID2052, Parameters.CodeVerifier]); return default; } @@ -1546,7 +1546,7 @@ namespace OpenIddict.Server return default; } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); // When an explicit scope parameter has been included in the token request // but was missing from the initial request, the request MUST be rejected. @@ -1554,11 +1554,11 @@ namespace OpenIddict.Server var scopes = new HashSet(context.Principal.GetScopes(), StringComparer.Ordinal); if (scopes.Count == 0) { - context.Logger.LogError(SR.GetResourceString(SR.ID7094), Parameters.Scope); + context.Logger.LogError(SR.GetResourceString(SR.ID6094), Parameters.Scope); context.Reject( error: Errors.InvalidGrant, - description: context.Localizer[SR.ID3074, Parameters.Scope]); + description: context.Localizer[SR.ID2074, Parameters.Scope]); return default; } @@ -1569,11 +1569,11 @@ namespace OpenIddict.Server // See https://tools.ietf.org/html/rfc6749#section-6 for more information. else if (!scopes.IsSupersetOf(context.Request.GetScopes())) { - context.Logger.LogError(SR.GetResourceString(SR.ID7095), Parameters.Scope); + context.Logger.LogError(SR.GetResourceString(SR.ID6095), Parameters.Scope); context.Reject( error: Errors.InvalidGrant, - description: context.Localizer[SR.ID3052, Parameters.Scope]); + description: context.Localizer[SR.ID2052, Parameters.Scope]); return default; } @@ -1613,7 +1613,7 @@ namespace OpenIddict.Server var notification = context.Transaction.GetProperty( typeof(ValidateTokenRequestContext).FullName!) ?? - throw new InvalidOperationException(SR.GetResourceString(SR.ID1006)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0007)); context.Principal ??= notification.Principal; diff --git a/src/OpenIddict.Server/OpenIddictServerHandlers.Introspection.cs b/src/OpenIddict.Server/OpenIddictServerHandlers.Introspection.cs index b31e941c..1b1eeec4 100644 --- a/src/OpenIddict.Server/OpenIddictServerHandlers.Introspection.cs +++ b/src/OpenIddict.Server/OpenIddictServerHandlers.Introspection.cs @@ -122,10 +122,10 @@ namespace OpenIddict.Server if (notification.Request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1045)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0046)); } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7096), notification.Request); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6096), notification.Request); } } @@ -186,7 +186,7 @@ namespace OpenIddict.Server return; } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7097)); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6097)); } } @@ -337,7 +337,7 @@ namespace OpenIddict.Server return; } - throw new InvalidOperationException(SR.GetResourceString(SR.ID1046)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0047)); } } @@ -367,11 +367,11 @@ namespace OpenIddict.Server // Reject introspection requests missing the mandatory token parameter. if (string.IsNullOrEmpty(context.Request.Token)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7098), Parameters.Token); + context.Logger.LogError(SR.GetResourceString(SR.ID6098), Parameters.Token); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3029, Parameters.Token]); + description: context.Localizer[SR.ID2029, Parameters.Token]); return default; } @@ -406,11 +406,11 @@ namespace OpenIddict.Server // At this stage, reject the introspection request unless the client identification requirement was disabled. if (!context.Options.AcceptAnonymousClients && string.IsNullOrEmpty(context.ClientId)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7098), Parameters.ClientId); + context.Logger.LogError(SR.GetResourceString(SR.ID6098), Parameters.ClientId); context.Reject( error: Errors.InvalidClient, - description: context.Localizer[SR.ID3029, Parameters.ClientId]); + description: context.Localizer[SR.ID2029, Parameters.ClientId]); return default; } @@ -427,7 +427,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictApplicationManager _applicationManager; - public ValidateClientId() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ValidateClientId() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ValidateClientId(IOpenIddictApplicationManager applicationManager) => _applicationManager = applicationManager; @@ -452,18 +452,18 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID5000(Parameters.ClientId)); + Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID4000(Parameters.ClientId)); // Retrieve the application details corresponding to the requested client_id. // If no entity can be found, this likely indicates that the client_id is invalid. var application = await _applicationManager.FindByClientIdAsync(context.ClientId); if (application is null) { - context.Logger.LogError(SR.GetResourceString(SR.ID7099), context.ClientId); + context.Logger.LogError(SR.GetResourceString(SR.ID6099), context.ClientId); context.Reject( error: Errors.InvalidClient, - description: context.Localizer[SR.ID3052, Parameters.ClientId]); + description: context.Localizer[SR.ID2052, Parameters.ClientId]); return; } @@ -479,7 +479,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictApplicationManager _applicationManager; - public ValidateClientType() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ValidateClientType() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ValidateClientType(IOpenIddictApplicationManager applicationManager) => _applicationManager = applicationManager; @@ -504,12 +504,12 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID5000(Parameters.ClientId)); + Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID4000(Parameters.ClientId)); var application = await _applicationManager.FindByClientIdAsync(context.ClientId); if (application is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1031)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0032)); } if (await _applicationManager.HasClientTypeAsync(application, ClientTypes.Public)) @@ -517,11 +517,11 @@ namespace OpenIddict.Server // Reject introspection requests containing a client_secret when the client is a public application. if (!string.IsNullOrEmpty(context.ClientSecret)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7100), context.ClientId); + context.Logger.LogError(SR.GetResourceString(SR.ID6100), context.ClientId); context.Reject( error: Errors.InvalidClient, - description: context.Localizer[SR.ID3053, Parameters.ClientSecret]); + description: context.Localizer[SR.ID2053, Parameters.ClientSecret]); return; } @@ -532,11 +532,11 @@ namespace OpenIddict.Server // Confidential and hybrid applications MUST authenticate to protect them from impersonation attacks. if (string.IsNullOrEmpty(context.ClientSecret)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7101), context.ClientId); + context.Logger.LogError(SR.GetResourceString(SR.ID6101), context.ClientId); context.Reject( error: Errors.InvalidClient, - description: context.Localizer[SR.ID3054, Parameters.ClientSecret]); + description: context.Localizer[SR.ID2054, Parameters.ClientSecret]); return; } @@ -551,7 +551,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictApplicationManager _applicationManager; - public ValidateClientSecret() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ValidateClientSecret() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ValidateClientSecret(IOpenIddictApplicationManager applicationManager) => _applicationManager = applicationManager; @@ -576,12 +576,12 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID5000(Parameters.ClientId)); + Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID4000(Parameters.ClientId)); var application = await _applicationManager.FindByClientIdAsync(context.ClientId); if (application is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1031)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0032)); } // If the application is a public client, don't validate the client secret. @@ -590,15 +590,15 @@ namespace OpenIddict.Server return; } - Debug.Assert(!string.IsNullOrEmpty(context.ClientSecret), SR.FormatID5000(Parameters.ClientSecret)); + Debug.Assert(!string.IsNullOrEmpty(context.ClientSecret), SR.FormatID4000(Parameters.ClientSecret)); if (!await _applicationManager.ValidateClientSecretAsync(application, context.ClientSecret)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7102), context.ClientId); + context.Logger.LogError(SR.GetResourceString(SR.ID6102), context.ClientId); context.Reject( error: Errors.InvalidClient, - description: context.Localizer[SR.ID3055]); + description: context.Localizer[SR.ID2055]); return; } @@ -614,7 +614,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictApplicationManager _applicationManager; - public ValidateEndpointPermissions() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ValidateEndpointPermissions() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ValidateEndpointPermissions(IOpenIddictApplicationManager applicationManager) => _applicationManager = applicationManager; @@ -640,22 +640,22 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID5000(Parameters.ClientId)); + Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID4000(Parameters.ClientId)); var application = await _applicationManager.FindByClientIdAsync(context.ClientId); if (application is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1031)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0032)); } // Reject the request if the application is not allowed to use the introspection endpoint. if (!await _applicationManager.HasPermissionAsync(application, Permissions.Endpoints.Introspection)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7103), context.ClientId); + context.Logger.LogError(SR.GetResourceString(SR.ID6103), context.ClientId); context.Reject( error: Errors.UnauthorizedClient, - description: context.Localizer[SR.ID3075]); + description: context.Localizer[SR.ID2075]); return; } @@ -742,16 +742,16 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); if (!context.Principal.HasTokenType(TokenTypeHints.AccessToken) && !context.Principal.HasTokenType(TokenTypeHints.RefreshToken)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7104)); + context.Logger.LogError(SR.GetResourceString(SR.ID6104)); context.Reject( error: Errors.UnsupportedTokenType, - description: context.Localizer[SR.ID3076]); + description: context.Localizer[SR.ID2076]); return default; } @@ -788,8 +788,8 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID5000(Parameters.ClientId)); - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID4000(Parameters.ClientId)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); // When the introspected token is an access token, the caller must be listed either as a presenter // (i.e the party the token was issued to) or as an audience (i.e a resource server/API). @@ -799,11 +799,11 @@ namespace OpenIddict.Server context.Principal.HasAudience() && !context.Principal.HasAudience(context.ClientId) && context.Principal.HasPresenter() && !context.Principal.HasPresenter(context.ClientId)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7106)); + context.Logger.LogError(SR.GetResourceString(SR.ID6106)); context.Reject( error: Errors.InvalidToken, - description: context.Localizer[SR.ID3077]); + description: context.Localizer[SR.ID2077]); return default; } @@ -815,11 +815,11 @@ namespace OpenIddict.Server if (context.Principal.HasTokenType(TokenTypeHints.RefreshToken) && context.Principal.HasPresenter() && !context.Principal.HasPresenter(context.ClientId)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7108)); + context.Logger.LogError(SR.GetResourceString(SR.ID6108)); context.Reject( error: Errors.InvalidToken, - description: context.Localizer[SR.ID3077]); + description: context.Localizer[SR.ID2077]); return default; } @@ -854,7 +854,7 @@ namespace OpenIddict.Server var notification = context.Transaction.GetProperty( typeof(ValidateIntrospectionRequestContext).FullName!) ?? - throw new InvalidOperationException(SR.GetResourceString(SR.ID1006)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0007)); context.Principal ??= notification.Principal; @@ -885,7 +885,7 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); context.TokenId = context.Principal.GetClaim(Claims.JwtId); context.TokenUsage = context.Principal.GetTokenType(); @@ -920,7 +920,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictApplicationManager _applicationManager; - public AttachApplicationClaims() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public AttachApplicationClaims() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public AttachApplicationClaims(IOpenIddictApplicationManager applicationManager) => _applicationManager = applicationManager; @@ -945,8 +945,8 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(!string.IsNullOrEmpty(context.Request.ClientId), SR.FormatID5000(Parameters.ClientId)); - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(!string.IsNullOrEmpty(context.Request.ClientId), SR.FormatID4000(Parameters.ClientId)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); // Don't return application-specific claims if the token is not an access token. if (!context.Principal.HasTokenType(TokenTypeHints.AccessToken)) @@ -965,7 +965,7 @@ namespace OpenIddict.Server var application = await _applicationManager.FindByClientIdAsync(context.Request.ClientId); if (application is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1031)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0032)); } // Public clients are not allowed to access sensitive claims as authentication cannot be enforced. diff --git a/src/OpenIddict.Server/OpenIddictServerHandlers.Revocation.cs b/src/OpenIddict.Server/OpenIddictServerHandlers.Revocation.cs index 66f12fe7..eeb1bd85 100644 --- a/src/OpenIddict.Server/OpenIddictServerHandlers.Revocation.cs +++ b/src/OpenIddict.Server/OpenIddictServerHandlers.Revocation.cs @@ -110,10 +110,10 @@ namespace OpenIddict.Server if (notification.Request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1047)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0048)); } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7109), notification.Request); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6109), notification.Request); } } @@ -174,7 +174,7 @@ namespace OpenIddict.Server return; } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7110)); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6110)); } } @@ -279,7 +279,7 @@ namespace OpenIddict.Server return; } - throw new InvalidOperationException(SR.GetResourceString(SR.ID1048)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0049)); } } @@ -309,11 +309,11 @@ namespace OpenIddict.Server // Reject revocation requests missing the mandatory token parameter. if (string.IsNullOrEmpty(context.Request.Token)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7111), Parameters.Token); + context.Logger.LogError(SR.GetResourceString(SR.ID6111), Parameters.Token); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3029, Parameters.Token]); + description: context.Localizer[SR.ID2029, Parameters.Token]); return default; } @@ -348,11 +348,11 @@ namespace OpenIddict.Server // At this stage, reject the revocation request unless the client identification requirement was disabled. if (!context.Options.AcceptAnonymousClients && string.IsNullOrEmpty(context.ClientId)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7111), Parameters.ClientId); + context.Logger.LogError(SR.GetResourceString(SR.ID6111), Parameters.ClientId); context.Reject( error: Errors.InvalidClient, - description: context.Localizer[SR.ID3029, Parameters.ClientId]); + description: context.Localizer[SR.ID2029, Parameters.ClientId]); return default; } @@ -369,7 +369,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictApplicationManager _applicationManager; - public ValidateClientId() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ValidateClientId() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ValidateClientId(IOpenIddictApplicationManager applicationManager) => _applicationManager = applicationManager; @@ -394,18 +394,18 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID5000(Parameters.ClientId)); + Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID4000(Parameters.ClientId)); // Retrieve the application details corresponding to the requested client_id. // If no entity can be found, this likely indicates that the client_id is invalid. var application = await _applicationManager.FindByClientIdAsync(context.ClientId); if (application is null) { - context.Logger.LogError(SR.GetResourceString(SR.ID7112), context.ClientId); + context.Logger.LogError(SR.GetResourceString(SR.ID6112), context.ClientId); context.Reject( error: Errors.InvalidClient, - description: context.Localizer[SR.ID3052, Parameters.ClientId]); + description: context.Localizer[SR.ID2052, Parameters.ClientId]); return; } @@ -421,7 +421,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictApplicationManager _applicationManager; - public ValidateClientType() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ValidateClientType() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ValidateClientType(IOpenIddictApplicationManager applicationManager) => _applicationManager = applicationManager; @@ -446,12 +446,12 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID5000(Parameters.ClientId)); + Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID4000(Parameters.ClientId)); var application = await _applicationManager.FindByClientIdAsync(context.ClientId); if (application is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1031)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0032)); } if (await _applicationManager.HasClientTypeAsync(application, ClientTypes.Public)) @@ -459,11 +459,11 @@ namespace OpenIddict.Server // Reject revocation requests containing a client_secret when the client is a public application. if (!string.IsNullOrEmpty(context.ClientSecret)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7113), context.ClientId); + context.Logger.LogError(SR.GetResourceString(SR.ID6113), context.ClientId); context.Reject( error: Errors.InvalidClient, - description: context.Localizer[SR.ID3053, Parameters.ClientSecret]); + description: context.Localizer[SR.ID2053, Parameters.ClientSecret]); return; } @@ -474,11 +474,11 @@ namespace OpenIddict.Server // Confidential and hybrid applications MUST authenticate to protect them from impersonation attacks. if (string.IsNullOrEmpty(context.ClientSecret)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7114), context.ClientId); + context.Logger.LogError(SR.GetResourceString(SR.ID6114), context.ClientId); context.Reject( error: Errors.InvalidClient, - description: context.Localizer[SR.ID3054, Parameters.ClientSecret]); + description: context.Localizer[SR.ID2054, Parameters.ClientSecret]); return; } @@ -493,7 +493,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictApplicationManager _applicationManager; - public ValidateClientSecret() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ValidateClientSecret() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ValidateClientSecret(IOpenIddictApplicationManager applicationManager) => _applicationManager = applicationManager; @@ -518,12 +518,12 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID5000(Parameters.ClientId)); + Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID4000(Parameters.ClientId)); var application = await _applicationManager.FindByClientIdAsync(context.ClientId); if (application is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1031)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0032)); } // If the application is a public client, don't validate the client secret. @@ -532,15 +532,15 @@ namespace OpenIddict.Server return; } - Debug.Assert(!string.IsNullOrEmpty(context.ClientSecret), SR.FormatID5000(Parameters.ClientSecret)); + Debug.Assert(!string.IsNullOrEmpty(context.ClientSecret), SR.FormatID4000(Parameters.ClientSecret)); if (!await _applicationManager.ValidateClientSecretAsync(application, context.ClientSecret)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7115), context.ClientId); + context.Logger.LogError(SR.GetResourceString(SR.ID6115), context.ClientId); context.Reject( error: Errors.InvalidClient, - description: context.Localizer[SR.ID3055]); + description: context.Localizer[SR.ID2055]); return; } @@ -556,7 +556,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictApplicationManager _applicationManager; - public ValidateEndpointPermissions() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ValidateEndpointPermissions() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ValidateEndpointPermissions(IOpenIddictApplicationManager applicationManager) => _applicationManager = applicationManager; @@ -582,22 +582,22 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID5000(Parameters.ClientId)); + Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID4000(Parameters.ClientId)); var application = await _applicationManager.FindByClientIdAsync(context.ClientId); if (application is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1031)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0032)); } // Reject the request if the application is not allowed to use the revocation endpoint. if (!await _applicationManager.HasPermissionAsync(application, Permissions.Endpoints.Revocation)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7116), context.ClientId); + context.Logger.LogError(SR.GetResourceString(SR.ID6116), context.ClientId); context.Reject( error: Errors.UnauthorizedClient, - description: context.Localizer[SR.ID3078]); + description: context.Localizer[SR.ID2078]); return; } @@ -684,16 +684,16 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); if (!context.Principal.HasTokenType(TokenTypeHints.AccessToken) && !context.Principal.HasTokenType(TokenTypeHints.RefreshToken)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7117)); + context.Logger.LogError(SR.GetResourceString(SR.ID6117)); context.Reject( error: Errors.UnsupportedTokenType, - description: context.Localizer[SR.ID3079]); + description: context.Localizer[SR.ID2079]); return default; } @@ -730,8 +730,8 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID5000(Parameters.ClientId)); - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(!string.IsNullOrEmpty(context.ClientId), SR.FormatID4000(Parameters.ClientId)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); // When the revoked token is an access token, the caller must be listed either as a presenter // (i.e the party the token was issued to) or as an audience (i.e a resource server/API). @@ -741,11 +741,11 @@ namespace OpenIddict.Server context.Principal.HasAudience() && !context.Principal.HasAudience(context.ClientId) && context.Principal.HasPresenter() && !context.Principal.HasPresenter(context.ClientId)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7119)); + context.Logger.LogError(SR.GetResourceString(SR.ID6119)); context.Reject( error: Errors.InvalidToken, - description: context.Localizer[SR.ID3080]); + description: context.Localizer[SR.ID2080]); return default; } @@ -757,11 +757,11 @@ namespace OpenIddict.Server if (context.Principal.HasTokenType(TokenTypeHints.RefreshToken) && context.Principal.HasPresenter() && !context.Principal.HasPresenter(context.ClientId)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7121)); + context.Logger.LogError(SR.GetResourceString(SR.ID6121)); context.Reject( error: Errors.InvalidToken, - description: context.Localizer[SR.ID3080]); + description: context.Localizer[SR.ID2080]); return default; } @@ -796,7 +796,7 @@ namespace OpenIddict.Server var notification = context.Transaction.GetProperty( typeof(ValidateRevocationRequestContext).FullName!) ?? - throw new InvalidOperationException(SR.GetResourceString(SR.ID1006)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0007)); context.Principal ??= notification.Principal; @@ -812,7 +812,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictTokenManager _tokenManager; - public RevokeToken() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public RevokeToken() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public RevokeToken(IOpenIddictTokenManager tokenManager) => _tokenManager = tokenManager; @@ -836,17 +836,17 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); // Extract the token identifier from the authentication principal. var identifier = context.Principal.GetTokenId(); if (string.IsNullOrEmpty(identifier)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7122)); + context.Logger.LogError(SR.GetResourceString(SR.ID6122)); context.Reject( error: Errors.UnsupportedTokenType, - description: context.Localizer[SR.ID3079]); + description: context.Localizer[SR.ID2079]); return; } @@ -854,11 +854,11 @@ namespace OpenIddict.Server var token = await _tokenManager.FindByIdAsync(identifier); if (token is null) { - context.Logger.LogInformation(SR.GetResourceString(SR.ID7123), identifier); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6123), identifier); context.Reject( error: Errors.InvalidToken, - description: context.Localizer[SR.ID3004]); + description: context.Localizer[SR.ID2004]); return; } @@ -868,7 +868,7 @@ namespace OpenIddict.Server { context.Reject( error: Errors.UnsupportedTokenType, - description: context.Localizer[SR.ID3079]); + description: context.Localizer[SR.ID2079]); return; } diff --git a/src/OpenIddict.Server/OpenIddictServerHandlers.Session.cs b/src/OpenIddict.Server/OpenIddictServerHandlers.Session.cs index df5c2bad..08454a80 100644 --- a/src/OpenIddict.Server/OpenIddictServerHandlers.Session.cs +++ b/src/OpenIddict.Server/OpenIddictServerHandlers.Session.cs @@ -99,10 +99,10 @@ namespace OpenIddict.Server if (notification.Request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1049)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0050)); } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7124), notification.Request); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6124), notification.Request); } } @@ -163,7 +163,7 @@ namespace OpenIddict.Server return; } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7125)); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6125)); } } @@ -251,7 +251,7 @@ namespace OpenIddict.Server } } - throw new InvalidOperationException(SR.GetResourceString(SR.ID1050)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0051)); } } @@ -299,7 +299,7 @@ namespace OpenIddict.Server return; } - throw new InvalidOperationException(SR.GetResourceString(SR.ID1051)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0052)); } } @@ -334,22 +334,22 @@ namespace OpenIddict.Server // If an optional post_logout_redirect_uri was provided, validate it. if (!Uri.TryCreate(context.PostLogoutRedirectUri, UriKind.Absolute, out Uri? uri) || !uri.IsWellFormedOriginalString()) { - context.Logger.LogError(SR.GetResourceString(SR.ID7126), Parameters.PostLogoutRedirectUri, context.PostLogoutRedirectUri); + context.Logger.LogError(SR.GetResourceString(SR.ID6126), Parameters.PostLogoutRedirectUri, context.PostLogoutRedirectUri); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3030, Parameters.PostLogoutRedirectUri]); + description: context.Localizer[SR.ID2030, Parameters.PostLogoutRedirectUri]); return default; } if (!string.IsNullOrEmpty(uri.Fragment)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7127), Parameters.PostLogoutRedirectUri, context.PostLogoutRedirectUri); + context.Logger.LogError(SR.GetResourceString(SR.ID6127), Parameters.PostLogoutRedirectUri, context.PostLogoutRedirectUri); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3031, Parameters.PostLogoutRedirectUri]); + description: context.Localizer[SR.ID2031, Parameters.PostLogoutRedirectUri]); return default; } @@ -366,7 +366,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictApplicationManager _applicationManager; - public ValidateClientPostLogoutRedirectUri() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ValidateClientPostLogoutRedirectUri() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ValidateClientPostLogoutRedirectUri(IOpenIddictApplicationManager applicationManager) => _applicationManager = applicationManager; @@ -391,15 +391,15 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(!string.IsNullOrEmpty(context.PostLogoutRedirectUri), SR.FormatID5000(Parameters.PostLogoutRedirectUri)); + Debug.Assert(!string.IsNullOrEmpty(context.PostLogoutRedirectUri), SR.FormatID4000(Parameters.PostLogoutRedirectUri)); if (!await ValidatePostLogoutRedirectUriAsync(context.PostLogoutRedirectUri)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7128), context.PostLogoutRedirectUri); + context.Logger.LogError(SR.GetResourceString(SR.ID6128), context.PostLogoutRedirectUri); context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3052, Parameters.PostLogoutRedirectUri]); + description: context.Localizer[SR.ID2052, Parameters.PostLogoutRedirectUri]); return; } diff --git a/src/OpenIddict.Server/OpenIddictServerHandlers.Userinfo.cs b/src/OpenIddict.Server/OpenIddictServerHandlers.Userinfo.cs index a0136a76..f46e0ecc 100644 --- a/src/OpenIddict.Server/OpenIddictServerHandlers.Userinfo.cs +++ b/src/OpenIddict.Server/OpenIddictServerHandlers.Userinfo.cs @@ -101,10 +101,10 @@ namespace OpenIddict.Server if (notification.Request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1052)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0053)); } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7129), notification.Request); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6129), notification.Request); } } @@ -165,7 +165,7 @@ namespace OpenIddict.Server return; } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7130)); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6130)); } } @@ -305,7 +305,7 @@ namespace OpenIddict.Server return; } - throw new InvalidOperationException(SR.GetResourceString(SR.ID1053)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0054)); } } @@ -334,11 +334,11 @@ namespace OpenIddict.Server if (string.IsNullOrEmpty(context.Request.AccessToken)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7131), Parameters.AccessToken); + context.Logger.LogError(SR.GetResourceString(SR.ID6131), Parameters.AccessToken); context.Reject( error: Errors.MissingToken, - description: context.Localizer[SR.ID3029, Parameters.AccessToken]); + description: context.Localizer[SR.ID2029, Parameters.AccessToken]); return default; } @@ -430,7 +430,7 @@ namespace OpenIddict.Server var notification = context.Transaction.GetProperty( typeof(ValidateUserinfoRequestContext).FullName!) ?? - throw new InvalidOperationException(SR.GetResourceString(SR.ID1006)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0007)); context.Principal ??= notification.Principal; @@ -461,7 +461,7 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); // Note: when receiving an access token, its audiences list cannot be used for the "aud" claim // as the client application is not the intented audience but only an authorized presenter. @@ -495,7 +495,7 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); context.Subject = context.Principal.GetClaim(Claims.Subject); diff --git a/src/OpenIddict.Server/OpenIddictServerHandlers.cs b/src/OpenIddict.Server/OpenIddictServerHandlers.cs index e3849418..253d384c 100644 --- a/src/OpenIddict.Server/OpenIddictServerHandlers.cs +++ b/src/OpenIddict.Server/OpenIddictServerHandlers.cs @@ -158,9 +158,9 @@ namespace OpenIddict.Server return default; case OpenIddictServerEndpointType.Token: - throw new InvalidOperationException(SR.GetResourceString(SR.ID1000)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0001)); - default: throw new InvalidOperationException(SR.GetResourceString(SR.ID1001)); + default: throw new InvalidOperationException(SR.GetResourceString(SR.ID0002)); } } } @@ -216,7 +216,7 @@ namespace OpenIddict.Server { context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3000]); + description: context.Localizer[SR.ID2000]); return default; } @@ -290,7 +290,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictTokenManager _tokenManager; - public ValidateReferenceTokenIdentifier() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ValidateReferenceTokenIdentifier() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ValidateReferenceTokenIdentifier(IOpenIddictTokenManager tokenManager) => _tokenManager = tokenManager; @@ -341,13 +341,13 @@ namespace OpenIddict.Server description: context.EndpointType switch { OpenIddictServerEndpointType.Token when context.Request.IsAuthorizationCodeGrantType() - => context.Localizer[SR.ID3001], + => context.Localizer[SR.ID2001], OpenIddictServerEndpointType.Token when context.Request.IsDeviceCodeGrantType() - => context.Localizer[SR.ID3002], + => context.Localizer[SR.ID2002], OpenIddictServerEndpointType.Token when context.Request.IsRefreshTokenGrantType() - => context.Localizer[SR.ID3003], + => context.Localizer[SR.ID2003], - _ => context.Localizer[SR.ID3004] + _ => context.Localizer[SR.ID2004] }); return; @@ -356,7 +356,7 @@ namespace OpenIddict.Server var payload = await _tokenManager.GetPayloadAsync(token); if (string.IsNullOrEmpty(payload)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1025)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0026)); } // Replace the token parameter by the payload resolved from the token entry. @@ -438,13 +438,13 @@ namespace OpenIddict.Server // For user codes, only the short "oi_usrc+jwt" form is valid. TokenTypeHints.UserCode => new[] { JsonWebTokenTypes.Private.UserCode }, - _ => throw new InvalidOperationException(SR.GetResourceString(SR.ID1002)) + _ => throw new InvalidOperationException(SR.GetResourceString(SR.ID0003)) }; var result = context.Options.JsonWebTokenHandler.ValidateToken(context.Token, parameters); if (!result.IsValid) { - context.Logger.LogTrace(result.Exception, SR.GetResourceString(SR.ID7000), context.Token); + context.Logger.LogTrace(result.Exception, SR.GetResourceString(SR.ID6000), context.Token); context.Reject( error: context.EndpointType switch @@ -455,17 +455,17 @@ namespace OpenIddict.Server description: (result.Exception, context.EndpointType) switch { (SecurityTokenInvalidTypeException, OpenIddictServerEndpointType.Token) - when context.Request.IsAuthorizationCodeGrantType() => context.Localizer[SR.ID3005], + when context.Request.IsAuthorizationCodeGrantType() => context.Localizer[SR.ID2005], (SecurityTokenInvalidTypeException, OpenIddictServerEndpointType.Token) - when context.Request.IsDeviceCodeGrantType() => context.Localizer[SR.ID3006], + when context.Request.IsDeviceCodeGrantType() => context.Localizer[SR.ID2006], (SecurityTokenInvalidTypeException, OpenIddictServerEndpointType.Token) - when context.Request.IsRefreshTokenGrantType() => context.Localizer[SR.ID3007], + when context.Request.IsRefreshTokenGrantType() => context.Localizer[SR.ID2007], - (SecurityTokenInvalidTypeException, OpenIddictServerEndpointType.Userinfo) => context.Localizer[SR.ID3008], + (SecurityTokenInvalidTypeException, OpenIddictServerEndpointType.Userinfo) => context.Localizer[SR.ID2008], - _ => context.Localizer[SR.ID3004] + _ => context.Localizer[SR.ID2004] }); return default; @@ -484,7 +484,7 @@ namespace OpenIddict.Server // Store the token type (resolved from "typ" or "token_usage") as a special private claim. context.Principal.SetTokenType(result.TokenType switch { - var type when string.IsNullOrEmpty(type) => throw new InvalidOperationException(SR.GetResourceString(SR.ID1024)), + var type when string.IsNullOrEmpty(type) => throw new InvalidOperationException(SR.GetResourceString(SR.ID0025)), JsonWebTokenTypes.AccessToken => TokenTypeHints.AccessToken, JsonWebTokenTypes.Prefixes.Application + JsonWebTokenTypes.AccessToken => TokenTypeHints.AccessToken, @@ -497,7 +497,7 @@ namespace OpenIddict.Server JsonWebTokenTypes.Private.RefreshToken => TokenTypeHints.RefreshToken, JsonWebTokenTypes.Private.UserCode => TokenTypeHints.UserCode, - _ => throw new InvalidOperationException(SR.GetResourceString(SR.ID1002)) + _ => throw new InvalidOperationException(SR.GetResourceString(SR.ID0003)) }); // Restore the claim destinations from the special oi_cl_dstn claim (represented as a dictionary/JSON object). @@ -506,7 +506,7 @@ namespace OpenIddict.Server context.Principal.SetDestinations(destinations); } - context.Logger.LogTrace(SR.GetResourceString(SR.ID7001), context.Token, context.Principal.Claims); + context.Logger.LogTrace(SR.GetResourceString(SR.ID6001), context.Token, context.Principal.Claims); return default; } @@ -668,7 +668,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictTokenManager _tokenManager; - public RestoreReferenceTokenProperties() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public RestoreReferenceTokenProperties() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public RestoreReferenceTokenProperties(IOpenIddictTokenManager tokenManager) => _tokenManager = tokenManager; @@ -706,7 +706,7 @@ namespace OpenIddict.Server var token = await _tokenManager.FindByIdAsync(identifier); if (token is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1020)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0021)); } // Restore the creation/expiration dates/identifiers from the token entry metadata. @@ -752,17 +752,17 @@ namespace OpenIddict.Server }, description: context.EndpointType switch { - OpenIddictServerEndpointType.Authorization => context.Localizer[SR.ID3009], - OpenIddictServerEndpointType.Logout => context.Localizer[SR.ID3009], + OpenIddictServerEndpointType.Authorization => context.Localizer[SR.ID2009], + OpenIddictServerEndpointType.Logout => context.Localizer[SR.ID2009], OpenIddictServerEndpointType.Token when context.Request.IsAuthorizationCodeGrantType() - => context.Localizer[SR.ID3001], + => context.Localizer[SR.ID2001], OpenIddictServerEndpointType.Token when context.Request.IsDeviceCodeGrantType() - => context.Localizer[SR.ID3002], + => context.Localizer[SR.ID2002], OpenIddictServerEndpointType.Token when context.Request.IsRefreshTokenGrantType() - => context.Localizer[SR.ID3003], + => context.Localizer[SR.ID2003], - _ => context.Localizer[SR.ID3004] + _ => context.Localizer[SR.ID2004] }); @@ -778,12 +778,12 @@ namespace OpenIddict.Server var type = context.Principal.GetTokenType(); if (string.IsNullOrEmpty(type)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1003)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0004)); } if (!string.Equals(type, context.TokenType, StringComparison.OrdinalIgnoreCase)) { - throw new InvalidOperationException(SR.FormatID1004(type, context.TokenType)); + throw new InvalidOperationException(SR.FormatID0005(type, context.TokenType)); } } @@ -800,7 +800,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictTokenManager _tokenManager; - public ValidateTokenEntry() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ValidateTokenEntry() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ValidateTokenEntry(IOpenIddictTokenManager tokenManager) => _tokenManager = tokenManager; @@ -824,7 +824,7 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); // Extract the token identifier from the authentication principal. // If no token identifier can be found, this indicates that the token @@ -848,13 +848,13 @@ namespace OpenIddict.Server description: context.EndpointType switch { OpenIddictServerEndpointType.Token when context.Request.IsAuthorizationCodeGrantType() - => context.Localizer[SR.ID3001], + => context.Localizer[SR.ID2001], OpenIddictServerEndpointType.Token when context.Request.IsDeviceCodeGrantType() - => context.Localizer[SR.ID3002], + => context.Localizer[SR.ID2002], OpenIddictServerEndpointType.Token when context.Request.IsRefreshTokenGrantType() - => context.Localizer[SR.ID3003], + => context.Localizer[SR.ID2003], - _ => context.Localizer[SR.ID3004] + _ => context.Localizer[SR.ID2004] }); return; @@ -877,7 +877,7 @@ namespace OpenIddict.Server // Then, try to revoke the token entries associated with the authorization. await TryRevokeChainAsync(context.Principal.GetAuthorizationId()); - context.Logger.LogError(SR.GetResourceString(SR.ID7002), identifier); + context.Logger.LogError(SR.GetResourceString(SR.ID6002), identifier); context.Reject( error: context.EndpointType switch @@ -888,13 +888,13 @@ namespace OpenIddict.Server description: context.EndpointType switch { OpenIddictServerEndpointType.Token when context.Request.IsAuthorizationCodeGrantType() - => context.Localizer[SR.ID3010], + => context.Localizer[SR.ID2010], OpenIddictServerEndpointType.Token when context.Request.IsDeviceCodeGrantType() - => context.Localizer[SR.ID3011], + => context.Localizer[SR.ID2011], OpenIddictServerEndpointType.Token when context.Request.IsRefreshTokenGrantType() - => context.Localizer[SR.ID3012], + => context.Localizer[SR.ID2012], - _ => context.Localizer[SR.ID3013] + _ => context.Localizer[SR.ID2013] }); return; @@ -905,11 +905,11 @@ namespace OpenIddict.Server // If the device code is not marked as valid yet, return an authorization_pending error. if (await _tokenManager.HasStatusAsync(token, Statuses.Inactive)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7003), identifier); + context.Logger.LogError(SR.GetResourceString(SR.ID6003), identifier); context.Reject( error: Errors.AuthorizationPending, - description: context.Localizer[SR.ID3014]); + description: context.Localizer[SR.ID2014]); return; } @@ -917,11 +917,11 @@ namespace OpenIddict.Server // If the device code is marked as rejected, return an authorization_pending error. if (await _tokenManager.HasStatusAsync(token, Statuses.Rejected)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7004), identifier); + context.Logger.LogError(SR.GetResourceString(SR.ID6004), identifier); context.Reject( error: Errors.AccessDenied, - description: context.Localizer[SR.ID3015]); + description: context.Localizer[SR.ID2015]); return; } @@ -930,7 +930,7 @@ namespace OpenIddict.Server if (!await _tokenManager.HasStatusAsync(token, Statuses.Valid)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7005), identifier); + context.Logger.LogError(SR.GetResourceString(SR.ID6005), identifier); context.Reject( error: context.EndpointType switch @@ -941,13 +941,13 @@ namespace OpenIddict.Server description: context.EndpointType switch { OpenIddictServerEndpointType.Token when context.Request.IsAuthorizationCodeGrantType() - => context.Localizer[SR.ID3016], + => context.Localizer[SR.ID2016], OpenIddictServerEndpointType.Token when context.Request.IsDeviceCodeGrantType() - => context.Localizer[SR.ID3017], + => context.Localizer[SR.ID2017], OpenIddictServerEndpointType.Token when context.Request.IsRefreshTokenGrantType() - => context.Localizer[SR.ID3018], + => context.Localizer[SR.ID2018], - _ => context.Localizer[SR.ID3019] + _ => context.Localizer[SR.ID2019] }); return; @@ -991,7 +991,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictAuthorizationManager _authorizationManager; - public ValidateAuthorizationEntry() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ValidateAuthorizationEntry() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ValidateAuthorizationEntry(IOpenIddictAuthorizationManager authorizationManager) => _authorizationManager = authorizationManager; @@ -1015,7 +1015,7 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); var identifier = context.Principal.GetAuthorizationId(); if (string.IsNullOrEmpty(identifier)) @@ -1026,7 +1026,7 @@ namespace OpenIddict.Server var authorization = await _authorizationManager.FindByIdAsync(identifier); if (authorization is null || !await _authorizationManager.HasStatusAsync(authorization, Statuses.Valid)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7006), identifier); + context.Logger.LogError(SR.GetResourceString(SR.ID6006), identifier); context.Reject( error: context.EndpointType switch @@ -1037,13 +1037,13 @@ namespace OpenIddict.Server description: context.EndpointType switch { OpenIddictServerEndpointType.Token when context.Request.IsAuthorizationCodeGrantType() - => context.Localizer[SR.ID3020], + => context.Localizer[SR.ID2020], OpenIddictServerEndpointType.Token when context.Request.IsDeviceCodeGrantType() - => context.Localizer[SR.ID3021], + => context.Localizer[SR.ID2021], OpenIddictServerEndpointType.Token when context.Request.IsRefreshTokenGrantType() - => context.Localizer[SR.ID3022], + => context.Localizer[SR.ID2022], - _ => context.Localizer[SR.ID3023] + _ => context.Localizer[SR.ID2023] }); return; @@ -1074,7 +1074,7 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); // Don't validate the lifetime of id_tokens used as id_token_hints. switch (context.EndpointType) @@ -1100,13 +1100,13 @@ namespace OpenIddict.Server description: context.EndpointType switch { OpenIddictServerEndpointType.Token when context.Request.IsAuthorizationCodeGrantType() - => context.Localizer[SR.ID3016], + => context.Localizer[SR.ID2016], OpenIddictServerEndpointType.Token when context.Request.IsDeviceCodeGrantType() - => context.Localizer[SR.ID3017], + => context.Localizer[SR.ID2017], OpenIddictServerEndpointType.Token when context.Request.IsRefreshTokenGrantType() - => context.Localizer[SR.ID3018], + => context.Localizer[SR.ID2018], - _ => context.Localizer[SR.ID3019] + _ => context.Localizer[SR.ID2019] }); return default; @@ -1147,7 +1147,7 @@ namespace OpenIddict.Server case OpenIddictServerEndpointType.Verification: return default; - default: throw new InvalidOperationException(SR.GetResourceString(SR.ID1005)); + default: throw new InvalidOperationException(SR.GetResourceString(SR.ID0006)); } } } @@ -1182,17 +1182,17 @@ namespace OpenIddict.Server OpenIddictServerEndpointType.Userinfo => Errors.InsufficientAccess, OpenIddictServerEndpointType.Verification => Errors.AccessDenied, - _ => throw new InvalidOperationException(SR.GetResourceString(SR.ID1005)) + _ => throw new InvalidOperationException(SR.GetResourceString(SR.ID0006)) }; context.Response.ErrorDescription ??= context.EndpointType switch { - OpenIddictServerEndpointType.Authorization => context.Localizer[SR.ID3015], - OpenIddictServerEndpointType.Verification => context.Localizer[SR.ID3015], - OpenIddictServerEndpointType.Token => context.Localizer[SR.ID3024], - OpenIddictServerEndpointType.Userinfo => context.Localizer[SR.ID3025], + OpenIddictServerEndpointType.Authorization => context.Localizer[SR.ID2015], + OpenIddictServerEndpointType.Verification => context.Localizer[SR.ID2015], + OpenIddictServerEndpointType.Token => context.Localizer[SR.ID2024], + OpenIddictServerEndpointType.Userinfo => context.Localizer[SR.ID2025], - _ => throw new InvalidOperationException(SR.GetResourceString(SR.ID1005)) + _ => throw new InvalidOperationException(SR.GetResourceString(SR.ID0006)) }; return default; @@ -1207,7 +1207,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictTokenManager _tokenManager; - public RejectDeviceCodeEntry() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public RejectDeviceCodeEntry() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public RejectDeviceCodeEntry(IOpenIddictTokenManager tokenManager) => _tokenManager = tokenManager; @@ -1239,15 +1239,15 @@ namespace OpenIddict.Server var notification = context.Transaction.GetProperty( typeof(ProcessAuthenticationContext).FullName!) ?? - throw new InvalidOperationException(SR.GetResourceString(SR.ID1006)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0007)); - Debug.Assert(notification.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(notification.Principal is not null, SR.GetResourceString(SR.ID4006)); // Extract the device code identifier from the user code principal. var identifier = notification.Principal.GetClaim(Claims.Private.DeviceCodeId); if (string.IsNullOrEmpty(identifier)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1007)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0008)); } var token = await _tokenManager.FindByIdAsync(identifier); @@ -1266,7 +1266,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictTokenManager _tokenManager; - public RejectUserCodeEntry() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public RejectUserCodeEntry() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public RejectUserCodeEntry(IOpenIddictTokenManager tokenManager) => _tokenManager = tokenManager; @@ -1298,15 +1298,15 @@ namespace OpenIddict.Server var notification = context.Transaction.GetProperty( typeof(ProcessAuthenticationContext).FullName!) ?? - throw new InvalidOperationException(SR.GetResourceString(SR.ID1006)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0007)); - Debug.Assert(notification.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(notification.Principal is not null, SR.GetResourceString(SR.ID4006)); // Extract the device code identifier from the authentication principal. var identifier = notification.Principal.GetTokenId(); if (string.IsNullOrEmpty(identifier)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1008)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0009)); } var token = await _tokenManager.FindByIdAsync(identifier); @@ -1341,7 +1341,7 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); switch (context.EndpointType) { @@ -1351,12 +1351,12 @@ namespace OpenIddict.Server case OpenIddictServerEndpointType.Verification: break; - default: throw new InvalidOperationException(SR.GetResourceString(SR.ID1009)); + default: throw new InvalidOperationException(SR.GetResourceString(SR.ID0010)); } if (context.Principal.Identity is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1010)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0011)); } // Note: sign-in operations triggered from the device endpoint can't be associated to specific users @@ -1366,12 +1366,12 @@ namespace OpenIddict.Server { if (context.Principal.Identity.IsAuthenticated) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1011)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0012)); } if (!string.IsNullOrEmpty(context.Principal.GetClaim(Claims.Subject))) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1012)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0013)); } return default; @@ -1379,12 +1379,12 @@ namespace OpenIddict.Server if (!context.Principal.Identity.IsAuthenticated) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1013)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0014)); } if (string.IsNullOrEmpty(context.Principal.GetClaim(Claims.Subject))) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1014)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0015)); } return default; @@ -1414,7 +1414,7 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); switch (context.EndpointType) { @@ -1431,7 +1431,7 @@ namespace OpenIddict.Server var notification = context.Transaction.GetProperty( typeof(ProcessAuthenticationContext).FullName!) ?? - throw new InvalidOperationException(SR.GetResourceString(SR.ID1006)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0007)); if (notification.Principal is null) { @@ -1486,7 +1486,7 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); // Always include the "openid" scope when the developer doesn't explicitly call SetScopes. // Note: the application is allowed to specify a different "scopes": in this case, @@ -1523,7 +1523,7 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); // Add the validated client_id to the list of authorized presenters, // unless the presenters were explicitly set by the developer. @@ -1559,7 +1559,7 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); // When a "resources" property cannot be found in the ticket, infer it from the "audiences" property. if (context.Principal.HasAudience() && !context.Principal.HasResource()) @@ -1597,7 +1597,7 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); context.IncludeAccessToken = context.EndpointType switch { @@ -1681,7 +1681,7 @@ namespace OpenIddict.Server private readonly IOpenIddictApplicationManager _applicationManager; private readonly IOpenIddictAuthorizationManager _authorizationManager; - public AttachAuthorization() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public AttachAuthorization() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public AttachAuthorization( IOpenIddictApplicationManager applicationManager, @@ -1711,7 +1711,7 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); // If no authorization code, device code or refresh token is returned, don't create an authorization. if (!context.IncludeAuthorizationCode && !context.IncludeDeviceCode && !context.IncludeRefreshToken) @@ -1742,7 +1742,7 @@ namespace OpenIddict.Server var application = await _applicationManager.FindByClientIdAsync(context.Request.ClientId); if (application is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1016)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0017)); } descriptor.ApplicationId = await _applicationManager.GetIdAsync(application); @@ -1751,19 +1751,19 @@ namespace OpenIddict.Server var authorization = await _authorizationManager.CreateAsync(descriptor); if (authorization is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1017)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0018)); } var identifier = await _authorizationManager.GetIdAsync(authorization); if (string.IsNullOrEmpty(context.Request.ClientId)) { - context.Logger.LogInformation(SR.GetResourceString(SR.ID7007), identifier); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6007), identifier); } else { - context.Logger.LogInformation(SR.GetResourceString(SR.ID7008), context.Request.ClientId, identifier); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6008), context.Request.ClientId, identifier); } // Attach the unique identifier of the ad hoc authorization to the authentication principal @@ -1797,7 +1797,7 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); // Create a new principal containing only the filtered claims. // Actors identities are also filtered (delegation scenarios). @@ -1844,7 +1844,7 @@ namespace OpenIddict.Server // contain "access_token" are not included in the access token. if (!claim.HasDestination(Destinations.AccessToken)) { - context.Logger.LogDebug(SR.GetResourceString(SR.ID7009), claim.Type); + context.Logger.LogDebug(SR.GetResourceString(SR.ID6009), claim.Type); return false; } @@ -1882,7 +1882,7 @@ namespace OpenIddict.Server var scopes = context.Request.GetScopes(); principal.SetScopes(scopes.Intersect(context.Principal.GetScopes())); - context.Logger.LogDebug(SR.GetResourceString(SR.ID7010), scopes); + context.Logger.LogDebug(SR.GetResourceString(SR.ID6010), scopes); } context.AccessTokenPrincipal = principal; @@ -1916,7 +1916,7 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); // Create a new principal containing only the filtered claims. // Actors identities are also filtered (delegation scenarios). @@ -2002,7 +2002,7 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); // Note: a device code principal is produced when a device code is included in the response or when a // device code entry is replaced when processing a sign-in response sent to the verification endpoint. @@ -2083,7 +2083,7 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); // Create a new principal containing only the filtered claims. // Actors identities are also filtered (delegation scenarios). @@ -2120,9 +2120,9 @@ namespace OpenIddict.Server { var notification = context.Transaction.GetProperty( typeof(ProcessAuthenticationContext).FullName!) ?? - throw new InvalidOperationException(SR.GetResourceString(SR.ID1006)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0007)); - Debug.Assert(notification.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(notification.Principal is not null, SR.GetResourceString(SR.ID4006)); principal.SetExpirationDate(notification.Principal.GetExpirationDate()); } @@ -2167,7 +2167,7 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); // Replace the principal by a new one containing only the filtered claims. // Actors identities are also filtered (delegation scenarios). @@ -2207,7 +2207,7 @@ namespace OpenIddict.Server // contain "id_token" are not included in the identity token. if (!claim.HasDestination(Destinations.IdentityToken)) { - context.Logger.LogDebug(SR.GetResourceString(SR.ID7011), claim.Type); + context.Logger.LogDebug(SR.GetResourceString(SR.ID6011), claim.Type); return false; } @@ -2281,7 +2281,7 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); // Create a new principal containing only the filtered claims. // Actors identities are also filtered (delegation scenarios). @@ -2335,7 +2335,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictTokenManager _tokenManager; - public RedeemTokenEntry() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public RedeemTokenEntry() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public RedeemTokenEntry(IOpenIddictTokenManager tokenManager) => _tokenManager = tokenManager; @@ -2381,7 +2381,7 @@ namespace OpenIddict.Server } } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); // Extract the token identifier from the authentication principal. // If no token identifier can be found, this indicates that the token has no backing database entry. @@ -2403,16 +2403,16 @@ namespace OpenIddict.Server description: context.EndpointType switch { OpenIddictServerEndpointType.Token when context.Request.IsAuthorizationCodeGrantType() - => context.Localizer[SR.ID3016], + => context.Localizer[SR.ID2016], OpenIddictServerEndpointType.Token when context.Request.IsDeviceCodeGrantType() - => context.Localizer[SR.ID3017], + => context.Localizer[SR.ID2017], OpenIddictServerEndpointType.Token when context.Request.IsRefreshTokenGrantType() - => context.Localizer[SR.ID3018], + => context.Localizer[SR.ID2018], OpenIddictServerEndpointType.Verification - => context.Localizer[SR.ID3026], + => context.Localizer[SR.ID2026], - _ => context.Localizer[SR.ID3019] + _ => context.Localizer[SR.ID2019] }); return; @@ -2428,7 +2428,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictTokenManager _tokenManager; - public RevokeExistingTokenEntries() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public RevokeExistingTokenEntries() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public RevokeExistingTokenEntries(IOpenIddictTokenManager tokenManager) => _tokenManager = tokenManager; @@ -2459,7 +2459,7 @@ namespace OpenIddict.Server return; } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); // When rolling tokens are enabled, try to revoke all the previously issued tokens // associated with the authorization if the request is a refresh_token request. @@ -2494,7 +2494,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictTokenManager _tokenManager; - public ExtendRefreshTokenEntry() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ExtendRefreshTokenEntry() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ExtendRefreshTokenEntry(IOpenIddictTokenManager tokenManager) => _tokenManager = tokenManager; @@ -2526,7 +2526,7 @@ namespace OpenIddict.Server return; } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); // Extract the token identifier from the authentication principal. // If no token identifier can be found, this indicates that the token has no backing database entry. @@ -2539,7 +2539,7 @@ namespace OpenIddict.Server var token = await _tokenManager.FindByIdAsync(identifier); if (token is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1264)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0265)); } // Compute the new expiration date of the refresh token and update the token entry. @@ -2565,7 +2565,7 @@ namespace OpenIddict.Server private readonly IOpenIddictApplicationManager _applicationManager; private readonly IOpenIddictTokenManager _tokenManager; - public CreateAccessTokenEntry() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public CreateAccessTokenEntry() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public CreateAccessTokenEntry( IOpenIddictApplicationManager applicationManager, @@ -2599,7 +2599,7 @@ namespace OpenIddict.Server var principal = context.AccessTokenPrincipal; if (principal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1021)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0022)); } var descriptor = new OpenIddictTokenDescriptor @@ -2619,7 +2619,7 @@ namespace OpenIddict.Server var application = await _applicationManager.FindByClientIdAsync(context.Request.ClientId); if (application is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1016)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0017)); } descriptor.ApplicationId = await _applicationManager.GetIdAsync(application); @@ -2628,7 +2628,7 @@ namespace OpenIddict.Server var token = await _tokenManager.CreateAsync(descriptor); if (token is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1018)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0019)); } var identifier = await _tokenManager.GetIdAsync(token); @@ -2636,7 +2636,7 @@ namespace OpenIddict.Server // Attach the token identifier to the principal so that it can be stored in the token. principal.SetTokenId(identifier); - context.Logger.LogTrace(SR.GetResourceString(SR.ID7012), identifier); + context.Logger.LogTrace(SR.GetResourceString(SR.ID6012), identifier); } } @@ -2672,7 +2672,7 @@ namespace OpenIddict.Server if (context.AccessTokenPrincipal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1021)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0022)); } // Clone the principal and exclude the private claims mapped to standard JWT claims. @@ -2689,7 +2689,7 @@ namespace OpenIddict.Server if (principal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1019)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0020)); } var claims = new Dictionary(StringComparer.Ordinal); @@ -2741,7 +2741,7 @@ namespace OpenIddict.Server context.Response.AccessToken = token; - context.Logger.LogTrace(SR.GetResourceString(SR.ID7013), principal.GetClaim(Claims.JwtId), token, principal.Claims); + context.Logger.LogTrace(SR.GetResourceString(SR.ID6013), principal.GetClaim(Claims.JwtId), token, principal.Claims); return default; } @@ -2755,7 +2755,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictTokenManager _tokenManager; - public ConvertReferenceAccessToken() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ConvertReferenceAccessToken() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ConvertReferenceAccessToken(IOpenIddictTokenManager tokenManager) => _tokenManager = tokenManager; @@ -2790,19 +2790,19 @@ namespace OpenIddict.Server var principal = context.AccessTokenPrincipal; if (principal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1019)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0020)); } var identifier = principal.GetTokenId(); if (string.IsNullOrEmpty(identifier)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1008)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0009)); } var token = await _tokenManager.FindByIdAsync(identifier); if (token is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1020)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0021)); } // Generate a new crypto-secure random identifier that will be substituted to the token. @@ -2826,7 +2826,7 @@ namespace OpenIddict.Server context.Response.AccessToken = descriptor.ReferenceId; - context.Logger.LogTrace(SR.GetResourceString(SR.ID7014), identifier, descriptor.ReferenceId); + context.Logger.LogTrace(SR.GetResourceString(SR.ID6014), identifier, descriptor.ReferenceId); } } @@ -2839,7 +2839,7 @@ namespace OpenIddict.Server private readonly IOpenIddictApplicationManager _applicationManager; private readonly IOpenIddictTokenManager _tokenManager; - public CreateAuthorizationCodeEntry() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public CreateAuthorizationCodeEntry() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public CreateAuthorizationCodeEntry( IOpenIddictApplicationManager applicationManager, @@ -2873,7 +2873,7 @@ namespace OpenIddict.Server var principal = context.AuthorizationCodePrincipal; if (principal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1019)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0020)); } var descriptor = new OpenIddictTokenDescriptor @@ -2893,7 +2893,7 @@ namespace OpenIddict.Server var application = await _applicationManager.FindByClientIdAsync(context.Request.ClientId); if (application is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1016)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0017)); } descriptor.ApplicationId = await _applicationManager.GetIdAsync(application); @@ -2902,7 +2902,7 @@ namespace OpenIddict.Server var token = await _tokenManager.CreateAsync(descriptor); if (token is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1018)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0019)); } var identifier = await _tokenManager.GetIdAsync(token); @@ -2910,7 +2910,7 @@ namespace OpenIddict.Server // Attach the token identifier to the principal so that it can be stored in the token. principal.SetTokenId(identifier); - context.Logger.LogTrace(SR.GetResourceString(SR.ID7015), identifier); + context.Logger.LogTrace(SR.GetResourceString(SR.ID6015), identifier); } } @@ -2946,7 +2946,7 @@ namespace OpenIddict.Server if (context.AuthorizationCodePrincipal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1021)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0022)); } // Clone the principal and exclude the claim mapped to standard JWT claims. @@ -2961,7 +2961,7 @@ namespace OpenIddict.Server if (principal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1021)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0022)); } var descriptor = new SecurityTokenDescriptor @@ -2996,7 +2996,7 @@ namespace OpenIddict.Server context.Response.Code = token; - context.Logger.LogTrace(SR.GetResourceString(SR.ID7016), principal.GetClaim(Claims.JwtId), token, principal.Claims); + context.Logger.LogTrace(SR.GetResourceString(SR.ID6016), principal.GetClaim(Claims.JwtId), token, principal.Claims); return default; } @@ -3010,7 +3010,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictTokenManager _tokenManager; - public ConvertReferenceAuthorizationCode() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ConvertReferenceAuthorizationCode() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ConvertReferenceAuthorizationCode(IOpenIddictTokenManager tokenManager) => _tokenManager = tokenManager; @@ -3044,19 +3044,19 @@ namespace OpenIddict.Server var principal = context.AuthorizationCodePrincipal; if (principal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1019)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0020)); } var identifier = principal.GetTokenId(); if (string.IsNullOrEmpty(identifier)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1008)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0009)); } var token = await _tokenManager.FindByIdAsync(identifier); if (token is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1020)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0021)); } // Generate a new crypto-secure random identifier that will be substituted to the token. @@ -3080,7 +3080,7 @@ namespace OpenIddict.Server context.Response.Code = descriptor.ReferenceId; - context.Logger.LogTrace(SR.GetResourceString(SR.ID7017), identifier, descriptor.ReferenceId); + context.Logger.LogTrace(SR.GetResourceString(SR.ID6017), identifier, descriptor.ReferenceId); } } @@ -3093,7 +3093,7 @@ namespace OpenIddict.Server private readonly IOpenIddictApplicationManager _applicationManager; private readonly IOpenIddictTokenManager _tokenManager; - public CreateDeviceCodeEntry() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public CreateDeviceCodeEntry() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public CreateDeviceCodeEntry( IOpenIddictApplicationManager applicationManager, @@ -3132,7 +3132,7 @@ namespace OpenIddict.Server var principal = context.DeviceCodePrincipal; if (principal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1019)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0020)); } var descriptor = new OpenIddictTokenDescriptor @@ -3152,7 +3152,7 @@ namespace OpenIddict.Server var application = await _applicationManager.FindByClientIdAsync(context.Request.ClientId); if (application is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1016)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0017)); } descriptor.ApplicationId = await _applicationManager.GetIdAsync(application); @@ -3161,7 +3161,7 @@ namespace OpenIddict.Server var token = await _tokenManager.CreateAsync(descriptor); if (token is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1018)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0019)); } var identifier = await _tokenManager.GetIdAsync(token); @@ -3169,7 +3169,7 @@ namespace OpenIddict.Server // Attach the token identifier to the principal so that it can be stored in the token. principal.SetTokenId(identifier); - context.Logger.LogTrace(SR.GetResourceString(SR.ID7018), identifier); + context.Logger.LogTrace(SR.GetResourceString(SR.ID6018), identifier); } } @@ -3205,7 +3205,7 @@ namespace OpenIddict.Server if (context.DeviceCodePrincipal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1021)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0022)); } // Clone the principal and exclude the claim mapped to standard JWT claims. @@ -3220,7 +3220,7 @@ namespace OpenIddict.Server if (principal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1021)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0022)); } var descriptor = new SecurityTokenDescriptor @@ -3255,7 +3255,7 @@ namespace OpenIddict.Server context.Response.DeviceCode = token; - context.Logger.LogTrace(SR.GetResourceString(SR.ID7019), principal.GetClaim(Claims.JwtId), token, principal.Claims); + context.Logger.LogTrace(SR.GetResourceString(SR.ID6019), principal.GetClaim(Claims.JwtId), token, principal.Claims); return default; } @@ -3269,7 +3269,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictTokenManager _tokenManager; - public ConvertReferenceDeviceCode() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ConvertReferenceDeviceCode() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ConvertReferenceDeviceCode(IOpenIddictTokenManager tokenManager) => _tokenManager = tokenManager; @@ -3309,19 +3309,19 @@ namespace OpenIddict.Server var principal = context.DeviceCodePrincipal; if (principal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1019)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0020)); } var identifier = principal.GetTokenId(); if (string.IsNullOrEmpty(identifier)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1008)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0009)); } var token = await _tokenManager.FindByIdAsync(identifier); if (token is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1020)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0021)); } // Generate a new crypto-secure random identifier that will be substituted to the token. @@ -3345,7 +3345,7 @@ namespace OpenIddict.Server context.Response.DeviceCode = descriptor.ReferenceId; - context.Logger.LogTrace(SR.GetResourceString(SR.ID7020), identifier, descriptor.ReferenceId); + context.Logger.LogTrace(SR.GetResourceString(SR.ID6020), identifier, descriptor.ReferenceId); } } @@ -3357,7 +3357,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictTokenManager _tokenManager; - public UpdateReferenceDeviceCodeEntry() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public UpdateReferenceDeviceCodeEntry() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public UpdateReferenceDeviceCodeEntry(IOpenIddictTokenManager tokenManager) => _tokenManager = tokenManager; @@ -3393,25 +3393,25 @@ namespace OpenIddict.Server return; } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); var principal = context.DeviceCodePrincipal; if (principal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1019)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0020)); } // Extract the token identifier from the authentication principal. var identifier = context.Principal.GetClaim(Claims.Private.DeviceCodeId); if (string.IsNullOrEmpty(identifier)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1007)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0008)); } var token = await _tokenManager.FindByIdAsync(identifier); if (token is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1264)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0265)); } // Replace the device code details by the payload derived from the new device code principal, @@ -3431,7 +3431,7 @@ namespace OpenIddict.Server // Don't return the prepared device code directly from the verification endpoint. context.Response.DeviceCode = null; - context.Logger.LogTrace(SR.GetResourceString(SR.ID7021), await _tokenManager.GetIdAsync(token)); + context.Logger.LogTrace(SR.GetResourceString(SR.ID6021), await _tokenManager.GetIdAsync(token)); } } @@ -3444,7 +3444,7 @@ namespace OpenIddict.Server private readonly IOpenIddictApplicationManager _applicationManager; private readonly IOpenIddictTokenManager _tokenManager; - public CreateRefreshTokenEntry() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public CreateRefreshTokenEntry() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public CreateRefreshTokenEntry( IOpenIddictApplicationManager applicationManager, @@ -3478,7 +3478,7 @@ namespace OpenIddict.Server var principal = context.RefreshTokenPrincipal; if (principal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1019)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0020)); } var descriptor = new OpenIddictTokenDescriptor @@ -3498,7 +3498,7 @@ namespace OpenIddict.Server var application = await _applicationManager.FindByClientIdAsync(context.Request.ClientId); if (application is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1016)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0017)); } descriptor.ApplicationId = await _applicationManager.GetIdAsync(application); @@ -3507,7 +3507,7 @@ namespace OpenIddict.Server var token = await _tokenManager.CreateAsync(descriptor); if (token is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1018)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0019)); } var identifier = await _tokenManager.GetIdAsync(token); @@ -3515,7 +3515,7 @@ namespace OpenIddict.Server // Attach the token identifier to the principal so that it can be stored in the token. principal.SetTokenId(identifier); - context.Logger.LogTrace(SR.GetResourceString(SR.ID7022), identifier); + context.Logger.LogTrace(SR.GetResourceString(SR.ID6022), identifier); } } @@ -3551,7 +3551,7 @@ namespace OpenIddict.Server if (context.RefreshTokenPrincipal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1021)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0022)); } // Clone the principal and exclude the claim mapped to standard JWT claims. @@ -3566,7 +3566,7 @@ namespace OpenIddict.Server if (principal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1021)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0022)); } var descriptor = new SecurityTokenDescriptor @@ -3601,7 +3601,7 @@ namespace OpenIddict.Server context.Response.RefreshToken = token; - context.Logger.LogTrace(SR.GetResourceString(SR.ID7023), principal.GetClaim(Claims.JwtId), token, principal.Claims); + context.Logger.LogTrace(SR.GetResourceString(SR.ID6023), principal.GetClaim(Claims.JwtId), token, principal.Claims); return default; } @@ -3615,7 +3615,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictTokenManager _tokenManager; - public ConvertReferenceRefreshToken() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ConvertReferenceRefreshToken() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ConvertReferenceRefreshToken(IOpenIddictTokenManager tokenManager) => _tokenManager = tokenManager; @@ -3650,19 +3650,19 @@ namespace OpenIddict.Server var principal = context.RefreshTokenPrincipal; if (principal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1019)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0020)); } var identifier = principal.GetTokenId(); if (string.IsNullOrEmpty(identifier)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1008)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0009)); } var token = await _tokenManager.FindByIdAsync(identifier); if (token is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1020)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0021)); } // Generate a new crypto-secure random identifier that will be substituted to the token. @@ -3686,7 +3686,7 @@ namespace OpenIddict.Server context.Response.RefreshToken = descriptor.ReferenceId; - context.Logger.LogTrace(SR.GetResourceString(SR.ID7024), identifier, descriptor.ReferenceId); + context.Logger.LogTrace(SR.GetResourceString(SR.ID6024), identifier, descriptor.ReferenceId); } } @@ -3718,7 +3718,7 @@ namespace OpenIddict.Server var principal = context.UserCodePrincipal; if (principal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1019)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0020)); } var identifier = context.DeviceCodePrincipal?.GetTokenId(); @@ -3740,7 +3740,7 @@ namespace OpenIddict.Server private readonly IOpenIddictApplicationManager _applicationManager; private readonly IOpenIddictTokenManager _tokenManager; - public CreateUserCodeEntry() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public CreateUserCodeEntry() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public CreateUserCodeEntry( IOpenIddictApplicationManager applicationManager, @@ -3774,7 +3774,7 @@ namespace OpenIddict.Server var principal = context.UserCodePrincipal; if (principal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1019)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0020)); } var descriptor = new OpenIddictTokenDescriptor @@ -3794,7 +3794,7 @@ namespace OpenIddict.Server var application = await _applicationManager.FindByClientIdAsync(context.Request.ClientId); if (application is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1016)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0017)); } descriptor.ApplicationId = await _applicationManager.GetIdAsync(application); @@ -3803,7 +3803,7 @@ namespace OpenIddict.Server var token = await _tokenManager.CreateAsync(descriptor); if (token is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1018)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0019)); } var identifier = await _tokenManager.GetIdAsync(token); @@ -3811,7 +3811,7 @@ namespace OpenIddict.Server // Attach the token identifier to the principal so that it can be stored in the token. principal.SetTokenId(identifier); - context.Logger.LogTrace(SR.GetResourceString(SR.ID7025), identifier); + context.Logger.LogTrace(SR.GetResourceString(SR.ID6025), identifier); } } @@ -3847,7 +3847,7 @@ namespace OpenIddict.Server if (context.UserCodePrincipal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1021)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0022)); } // Clone the principal and exclude the claim mapped to standard JWT claims. @@ -3862,7 +3862,7 @@ namespace OpenIddict.Server if (principal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1021)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0022)); } var descriptor = new SecurityTokenDescriptor @@ -3887,7 +3887,7 @@ namespace OpenIddict.Server context.Response.UserCode = token; - context.Logger.LogTrace(SR.GetResourceString(SR.ID7026), principal.GetClaim(Claims.JwtId), token, principal.Claims); + context.Logger.LogTrace(SR.GetResourceString(SR.ID6026), principal.GetClaim(Claims.JwtId), token, principal.Claims); return default; } @@ -3901,7 +3901,7 @@ namespace OpenIddict.Server { private readonly IOpenIddictTokenManager _tokenManager; - public ConvertReferenceUserCode() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public ConvertReferenceUserCode() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public ConvertReferenceUserCode(IOpenIddictTokenManager tokenManager) => _tokenManager = tokenManager; @@ -3936,19 +3936,19 @@ namespace OpenIddict.Server var principal = context.UserCodePrincipal; if (principal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1019)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0020)); } var identifier = principal.GetTokenId(); if (string.IsNullOrEmpty(identifier)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1008)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0009)); } var token = await _tokenManager.FindByIdAsync(identifier); if (token is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1020)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0021)); } // Note: unlike other reference tokens, user codes are meant to be used by humans, @@ -3970,7 +3970,7 @@ namespace OpenIddict.Server context.Response.UserCode = descriptor.ReferenceId; - context.Logger.LogTrace(SR.GetResourceString(SR.ID7027), identifier, descriptor.ReferenceId); + context.Logger.LogTrace(SR.GetResourceString(SR.ID6027), identifier, descriptor.ReferenceId); static async ValueTask GenerateReferenceIdentifierAsync(IOpenIddictTokenManager manager) { @@ -4032,7 +4032,7 @@ namespace OpenIddict.Server var principal = context.IdentityTokenPrincipal; if (principal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1021)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0022)); } if (string.IsNullOrEmpty(context.Response.AccessToken) && @@ -4045,13 +4045,13 @@ namespace OpenIddict.Server credentials => credentials.Key is AsymmetricSecurityKey); if (credentials is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1265)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0266)); } using var hash = GetHashAlgorithm(credentials); if (hash is null || hash is KeyedHashAlgorithm) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1266)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0267)); } if (!string.IsNullOrEmpty(context.Response.AccessToken)) @@ -4125,7 +4125,7 @@ namespace OpenIddict.Server SecurityAlgorithms.RsaSsaPssSha384Signature => HashAlgorithmName.SHA384, SecurityAlgorithms.RsaSsaPssSha512Signature => HashAlgorithmName.SHA512, - _ => throw new InvalidOperationException(SR.GetResourceString(SR.ID1266)) + _ => throw new InvalidOperationException(SR.GetResourceString(SR.ID0267)) } }; @@ -4146,7 +4146,7 @@ namespace OpenIddict.Server private readonly IOpenIddictApplicationManager _applicationManager; private readonly IOpenIddictTokenManager _tokenManager; - public CreateIdentityTokenEntry() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1015)); + public CreateIdentityTokenEntry() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0016)); public CreateIdentityTokenEntry( IOpenIddictApplicationManager applicationManager, @@ -4180,7 +4180,7 @@ namespace OpenIddict.Server var principal = context.IdentityTokenPrincipal; if (principal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1019)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0020)); } var descriptor = new OpenIddictTokenDescriptor @@ -4200,7 +4200,7 @@ namespace OpenIddict.Server var application = await _applicationManager.FindByClientIdAsync(context.Request.ClientId); if (application is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1016)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0017)); } descriptor.ApplicationId = await _applicationManager.GetIdAsync(application); @@ -4209,7 +4209,7 @@ namespace OpenIddict.Server var token = await _tokenManager.CreateAsync(descriptor); if (token is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1018)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0019)); } var identifier = await _tokenManager.GetIdAsync(token); @@ -4217,7 +4217,7 @@ namespace OpenIddict.Server // Attach the token identifier to the principal so that it can be stored in the token. principal.SetTokenId(identifier); - context.Logger.LogTrace(SR.GetResourceString(SR.ID7028), identifier); + context.Logger.LogTrace(SR.GetResourceString(SR.ID6028), identifier); } } @@ -4253,7 +4253,7 @@ namespace OpenIddict.Server if (context.IdentityTokenPrincipal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1021)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0022)); } // Clone the principal and exclude the claim mapped to standard JWT claims. @@ -4269,7 +4269,7 @@ namespace OpenIddict.Server if (principal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1021)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0022)); } var claims = new Dictionary(StringComparer.Ordinal); @@ -4308,7 +4308,7 @@ namespace OpenIddict.Server context.Response.IdToken = token; - context.Logger.LogTrace(SR.GetResourceString(SR.ID7029), principal.GetClaim(Claims.JwtId), token, principal.Claims); + context.Logger.LogTrace(SR.GetResourceString(SR.ID6029), principal.GetClaim(Claims.JwtId), token, principal.Claims); return default; } @@ -4391,7 +4391,7 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.AccessTokenPrincipal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.AccessTokenPrincipal is not null, SR.GetResourceString(SR.ID4006)); context.Response.TokenType = TokenTypes.Bearer; @@ -4439,7 +4439,7 @@ namespace OpenIddict.Server throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.DeviceCodePrincipal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.DeviceCodePrincipal is not null, SR.GetResourceString(SR.ID4006)); var address = GetEndpointAbsoluteUri(context.Issuer, context.Options.VerificationEndpointUris.FirstOrDefault()); if (address is not null) @@ -4479,7 +4479,7 @@ namespace OpenIddict.Server // At this stage, throw an exception if the issuer cannot be retrieved. if (issuer is null || !issuer.IsAbsoluteUri) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1022)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0023)); } // Ensure the issuer ends with a trailing slash, as it is necessary @@ -4527,7 +4527,7 @@ namespace OpenIddict.Server if (context.EndpointType != OpenIddictServerEndpointType.Logout) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1023)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0024)); } return default; diff --git a/src/OpenIddict.Server/OpenIddictServerHelpers.cs b/src/OpenIddict.Server/OpenIddictServerHelpers.cs index 53120fb5..7e07acb3 100644 --- a/src/OpenIddict.Server/OpenIddictServerHelpers.cs +++ b/src/OpenIddict.Server/OpenIddictServerHelpers.cs @@ -31,7 +31,7 @@ namespace OpenIddict.Server if (string.IsNullOrEmpty(name)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1105), nameof(name)); + throw new ArgumentException(SR.GetResourceString(SR.ID0106), nameof(name)); } if (transaction.Properties.TryGetValue(name, out var property) && property is TProperty result) @@ -61,7 +61,7 @@ namespace OpenIddict.Server if (string.IsNullOrEmpty(name)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1105), nameof(name)); + throw new ArgumentException(SR.GetResourceString(SR.ID0106), nameof(name)); } if (value is null) diff --git a/src/OpenIddict.Server/OpenIddictServerOptions.cs b/src/OpenIddict.Server/OpenIddictServerOptions.cs index 90f6746c..b85d5606 100644 --- a/src/OpenIddict.Server/OpenIddictServerOptions.cs +++ b/src/OpenIddict.Server/OpenIddictServerOptions.cs @@ -151,7 +151,7 @@ namespace OpenIddict.Server TokenTypeHints.AccessToken => JsonWebTokenTypes.AccessToken, TokenTypeHints.IdToken => JsonWebTokenTypes.IdentityToken, - _ => throw new NotSupportedException(SR.GetResourceString(SR.ID1268)) + _ => throw new NotSupportedException(SR.GetResourceString(SR.ID0269)) }; } @@ -159,14 +159,14 @@ namespace OpenIddict.Server // (provided via the type delegate parameter) or inferred from the token_usage claim. if (string.IsNullOrEmpty(type)) { - throw new SecurityTokenInvalidTypeException(SR.GetResourceString(SR.ID1269)); + throw new SecurityTokenInvalidTypeException(SR.GetResourceString(SR.ID0270)); } // Note: unlike IdentityModel, this custom validator deliberately uses case-insensitive comparisons. if (parameters.ValidTypes is not null && parameters.ValidTypes.Any() && !parameters.ValidTypes.Contains(type, StringComparer.OrdinalIgnoreCase)) { - throw new SecurityTokenInvalidTypeException(SR.GetResourceString(SR.ID1270)) + throw new SecurityTokenInvalidTypeException(SR.GetResourceString(SR.ID0271)) { InvalidType = type }; diff --git a/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreBuilder.cs b/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreBuilder.cs index af14547a..f17ae825 100644 --- a/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreBuilder.cs +++ b/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreBuilder.cs @@ -57,7 +57,7 @@ namespace Microsoft.Extensions.DependencyInjection { if (string.IsNullOrEmpty(realm)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1106), nameof(realm)); + throw new ArgumentException(SR.GetResourceString(SR.ID0107), nameof(realm)); } return Configure(options => options.Realm = realm); diff --git a/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreConfiguration.cs b/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreConfiguration.cs index 566f0565..08de15fd 100644 --- a/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreConfiguration.cs +++ b/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreConfiguration.cs @@ -34,7 +34,7 @@ namespace OpenIddict.Validation.AspNetCore if (options.SchemeMap.TryGetValue(OpenIddictValidationAspNetCoreDefaults.AuthenticationScheme, out var builder) && builder.HandlerType != typeof(OpenIddictValidationAspNetCoreHandler)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1163)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0164)); } options.AddScheme( @@ -67,7 +67,7 @@ namespace OpenIddict.Validation.AspNetCore if (!TryValidate(options.SchemeMap, options.DefaultSignInScheme) || !TryValidate(options.SchemeMap, options.DefaultSignOutScheme)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1164)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0165)); } static bool TryValidate(IDictionary map, string? scheme) diff --git a/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreHandler.cs b/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreHandler.cs index 473da91b..a25be2b2 100644 --- a/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreHandler.cs +++ b/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreHandler.cs @@ -99,7 +99,7 @@ namespace OpenIddict.Validation.AspNetCore return false; } - throw new InvalidOperationException(SR.GetResourceString(SR.ID1110)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0111)); } return false; @@ -109,7 +109,7 @@ namespace OpenIddict.Validation.AspNetCore protected override async Task HandleAuthenticateAsync() { var transaction = Context.Features.Get()?.Transaction ?? - throw new InvalidOperationException(SR.GetResourceString(SR.ID1165)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0166)); // Note: in many cases, the authentication token was already validated by the time this action is called // (generally later in the pipeline, when using the pass-through mode). To avoid having to re-validate it, @@ -147,14 +147,14 @@ namespace OpenIddict.Validation.AspNetCore [OpenIddictValidationAspNetCoreConstants.Properties.ErrorUri] = context.ErrorUri }); - return AuthenticateResult.Fail(SR.GetResourceString(SR.ID1112), properties); + return AuthenticateResult.Fail(SR.GetResourceString(SR.ID0113), properties); } else { - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); - Debug.Assert(!string.IsNullOrEmpty(context.Principal.GetTokenType()), SR.GetResourceString(SR.ID5009)); - Debug.Assert(!string.IsNullOrEmpty(context.Token), SR.GetResourceString(SR.ID5010)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); + Debug.Assert(!string.IsNullOrEmpty(context.Principal.GetTokenType()), SR.GetResourceString(SR.ID4009)); + Debug.Assert(!string.IsNullOrEmpty(context.Token), SR.GetResourceString(SR.ID4010)); // Store the token to allow any ASP.NET Core component (e.g a controller) // to retrieve it (e.g to make an API request to another application). @@ -178,7 +178,7 @@ namespace OpenIddict.Validation.AspNetCore protected override async Task HandleChallengeAsync(AuthenticationProperties? properties) { var transaction = Context.Features.Get()?.Transaction ?? - throw new InvalidOperationException(SR.GetResourceString(SR.ID1165)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0166)); transaction.Properties[typeof(AuthenticationProperties).FullName!] = properties ?? new AuthenticationProperties(); @@ -213,7 +213,7 @@ namespace OpenIddict.Validation.AspNetCore return; } - throw new InvalidOperationException(SR.GetResourceString(SR.ID1110)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0111)); } } diff --git a/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreHandlers.cs b/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreHandlers.cs index 295a2df2..c971e7a8 100644 --- a/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreHandlers.cs +++ b/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreHandlers.cs @@ -95,7 +95,7 @@ namespace OpenIddict.Validation.AspNetCore var request = context.Transaction.GetHttpRequest(); if (request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1113)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0114)); } // Only use the current host as the issuer if the @@ -109,7 +109,7 @@ namespace OpenIddict.Validation.AspNetCore { context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3081, HeaderNames.Host]); + description: context.Localizer[SR.ID2081, HeaderNames.Host]); return default; } @@ -119,7 +119,7 @@ namespace OpenIddict.Validation.AspNetCore { context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3082, HeaderNames.Host]); + description: context.Localizer[SR.ID2082, HeaderNames.Host]); return default; } @@ -166,7 +166,7 @@ namespace OpenIddict.Validation.AspNetCore var request = context.Transaction.GetHttpRequest(); if (request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1113)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0114)); } // Resolve the access token from the standard Authorization header. @@ -220,7 +220,7 @@ namespace OpenIddict.Validation.AspNetCore var request = context.Transaction.GetHttpRequest(); if (request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1113)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0114)); } if (string.IsNullOrEmpty(request.ContentType) || @@ -278,7 +278,7 @@ namespace OpenIddict.Validation.AspNetCore var request = context.Transaction.GetHttpRequest(); if (request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1113)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0114)); } // Resolve the access token from the standard access_token query parameter. @@ -358,14 +358,14 @@ namespace OpenIddict.Validation.AspNetCore throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID5007)); + Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID4007)); // This handler only applies to ASP.NET Core requests. If the HTTP context cannot be resolved, // this may indicate that the request was incorrectly processed by another server stack. var response = context.Transaction.GetHttpRequest()?.HttpContext.Response; if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1113)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0114)); } response.StatusCode = context.Transaction.Response.Error switch @@ -415,7 +415,7 @@ namespace OpenIddict.Validation.AspNetCore var response = context.Transaction.GetHttpRequest()?.HttpContext.Response; if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1113)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0114)); } // Prevent the response from being cached. @@ -457,14 +457,14 @@ namespace OpenIddict.Validation.AspNetCore throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID5007)); + Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID4007)); // This handler only applies to ASP.NET Core requests. If the HTTP context cannot be resolved, // this may indicate that the request was incorrectly processed by another server stack. var response = context.Transaction.GetHttpRequest()?.HttpContext.Response; if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1113)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0114)); } var scheme = context.Transaction.Response.Error switch @@ -567,7 +567,7 @@ namespace OpenIddict.Validation.AspNetCore var response = context.Transaction.GetHttpRequest()?.HttpContext.Response; if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1113)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0114)); } // If the response doesn't contain a WWW-Authenticate header, don't return an empty response. @@ -576,7 +576,7 @@ namespace OpenIddict.Validation.AspNetCore return default; } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7141), context.Transaction.Response); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6141), context.Transaction.Response); context.HandleRequest(); return default; @@ -608,17 +608,17 @@ namespace OpenIddict.Validation.AspNetCore throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID5007)); + Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID4007)); // This handler only applies to ASP.NET Core requests. If the HTTP context cannot be resolved, // this may indicate that the request was incorrectly processed by another server stack. var response = context.Transaction.GetHttpRequest()?.HttpContext.Response; if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1113)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0114)); } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7142), context.Transaction.Response); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6142), context.Transaction.Response); using var stream = new MemoryStream(); using var writer = new Utf8JsonWriter(stream, new JsonWriterOptions diff --git a/src/OpenIddict.Validation.DataProtection/OpenIddictValidationDataProtectionHandlers.cs b/src/OpenIddict.Validation.DataProtection/OpenIddictValidationDataProtectionHandlers.cs index 9ddcc94c..7ae0c4ba 100644 --- a/src/OpenIddict.Validation.DataProtection/OpenIddictValidationDataProtectionHandlers.cs +++ b/src/OpenIddict.Validation.DataProtection/OpenIddictValidationDataProtectionHandlers.cs @@ -77,14 +77,14 @@ namespace OpenIddict.Validation.DataProtection // Create a Data Protection protector using the provider registered in the options. var protector = _options.CurrentValue.DataProtectionProvider.CreateProtector(context.TokenType switch { - null => throw new InvalidOperationException(SR.GetResourceString(SR.ID1166)), + null => throw new InvalidOperationException(SR.GetResourceString(SR.ID0167)), TokenTypeHints.AccessToken when context.Transaction.Properties.ContainsKey(Properties.ReferenceTokenIdentifier) => new[] { Handlers.Server, Formats.AccessToken, Features.ReferenceTokens, Schemes.Server }, TokenTypeHints.AccessToken => new[] { Handlers.Server, Formats.AccessToken, Schemes.Server }, - _ => throw new InvalidOperationException(SR.GetResourceString(SR.ID1002)) + _ => throw new InvalidOperationException(SR.GetResourceString(SR.ID0003)) }); try @@ -99,19 +99,19 @@ namespace OpenIddict.Validation.DataProtection catch (Exception exception) { - context.Logger.LogTrace(exception, SR.GetResourceString(SR.ID7153), context.Token); + context.Logger.LogTrace(exception, SR.GetResourceString(SR.ID6153), context.Token); } if (context.Principal is null) { context.Reject( error: Errors.InvalidToken, - description: context.Localizer[SR.ID3004]); + description: context.Localizer[SR.ID2004]); return default; } - context.Logger.LogTrace(SR.GetResourceString(SR.ID7152), context.Token, context.Principal.Claims); + context.Logger.LogTrace(SR.GetResourceString(SR.ID6152), context.Token, context.Principal.Claims); return default; } diff --git a/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinBuilder.cs b/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinBuilder.cs index 62c55571..60632950 100644 --- a/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinBuilder.cs +++ b/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinBuilder.cs @@ -73,7 +73,7 @@ namespace Microsoft.Extensions.DependencyInjection { if (string.IsNullOrEmpty(realm)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1106), nameof(realm)); + throw new ArgumentException(SR.GetResourceString(SR.ID0107), nameof(realm)); } return Configure(options => options.Realm = realm); diff --git a/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinHandler.cs b/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinHandler.cs index a2552860..53940633 100644 --- a/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinHandler.cs +++ b/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinHandler.cs @@ -72,10 +72,10 @@ namespace OpenIddict.Validation.Owin // active authentication is used, as AuthenticateCoreAsync() is always called before InvokeAsync() in this case. var transaction = Context.Get(typeof(OpenIddictValidationTransaction).FullName) ?? - throw new InvalidOperationException(SR.GetResourceString(SR.ID1165)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0166)); var context = transaction.GetProperty(typeof(ProcessRequestContext).FullName!) ?? - throw new InvalidOperationException(SR.GetResourceString(SR.ID1165)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0166)); if (context.IsRequestHandled) { @@ -111,7 +111,7 @@ namespace OpenIddict.Validation.Owin return false; } - throw new InvalidOperationException(SR.GetResourceString(SR.ID1110)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0111)); } return false; @@ -121,7 +121,7 @@ namespace OpenIddict.Validation.Owin protected override async Task AuthenticateCoreAsync() { var transaction = Context.Get(typeof(OpenIddictValidationTransaction).FullName) ?? - throw new InvalidOperationException(SR.GetResourceString(SR.ID1165)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0166)); // Note: in many cases, the authentication token was already validated by the time this action is called // (generally later in the pipeline, when using the pass-through mode). To avoid having to re-validate it, @@ -164,9 +164,9 @@ namespace OpenIddict.Validation.Owin else { - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); - Debug.Assert(!string.IsNullOrEmpty(context.Principal.GetTokenType()), SR.GetResourceString(SR.ID5009)); - Debug.Assert(!string.IsNullOrEmpty(context.Token), SR.GetResourceString(SR.ID5010)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); + Debug.Assert(!string.IsNullOrEmpty(context.Principal.GetTokenType()), SR.GetResourceString(SR.ID4009)); + Debug.Assert(!string.IsNullOrEmpty(context.Token), SR.GetResourceString(SR.ID4010)); // Store the token to allow any OWIN/Katana component (e.g a controller) // to retrieve it (e.g to make an API request to another application). @@ -201,7 +201,7 @@ namespace OpenIddict.Validation.Owin if (challenge is not null && (Response.StatusCode == 401 || Response.StatusCode == 403)) { var transaction = Context.Get(typeof(OpenIddictValidationTransaction).FullName) ?? - throw new InvalidOperationException(SR.GetResourceString(SR.ID1165)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0166)); transaction.Properties[typeof(AuthenticationProperties).FullName!] = challenge.Properties ?? new AuthenticationProperties(); @@ -236,7 +236,7 @@ namespace OpenIddict.Validation.Owin return; } - throw new InvalidOperationException(SR.GetResourceString(SR.ID1110)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0111)); } } } diff --git a/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinHandlers.cs b/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinHandlers.cs index 15e82c44..aed9d25d 100644 --- a/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinHandlers.cs +++ b/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinHandlers.cs @@ -92,7 +92,7 @@ namespace OpenIddict.Validation.Owin var request = context.Transaction.GetOwinRequest(); if (request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1119)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0120)); } // Only use the current host as the issuer if the @@ -106,7 +106,7 @@ namespace OpenIddict.Validation.Owin { context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3081, "Host"]); + description: context.Localizer[SR.ID2081, "Host"]); return default; } @@ -116,7 +116,7 @@ namespace OpenIddict.Validation.Owin { context.Reject( error: Errors.InvalidRequest, - description: context.Localizer[SR.ID3082, "Host"]); + description: context.Localizer[SR.ID2082, "Host"]); return default; } @@ -163,7 +163,7 @@ namespace OpenIddict.Validation.Owin var request = context.Transaction.GetOwinRequest(); if (request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1119)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0120)); } // Resolve the access token from the standard Authorization header. @@ -217,7 +217,7 @@ namespace OpenIddict.Validation.Owin var request = context.Transaction.GetOwinRequest(); if (request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1119)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0120)); } if (string.IsNullOrEmpty(request.ContentType) || @@ -276,7 +276,7 @@ namespace OpenIddict.Validation.Owin var request = context.Transaction.GetOwinRequest(); if (request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1119)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0120)); } // Resolve the access token from the standard access_token query parameter. @@ -360,14 +360,14 @@ namespace OpenIddict.Validation.Owin throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID5007)); + Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID4007)); // This handler only applies to OWIN requests. If The OWIN request cannot be resolved, // this may indicate that the request was incorrectly processed by another server stack. var response = context.Transaction.GetOwinRequest()?.Context.Response; if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1119)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0120)); } response.StatusCode = context.Transaction.Response.Error switch @@ -417,7 +417,7 @@ namespace OpenIddict.Validation.Owin var response = context.Transaction.GetOwinRequest()?.Context.Response; if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1119)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0120)); } // Prevent the response from being cached. @@ -459,14 +459,14 @@ namespace OpenIddict.Validation.Owin throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID5007)); + Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID4007)); // This handler only applies to OWIN requests. If The OWIN request cannot be resolved, // this may indicate that the request was incorrectly processed by another server stack. var response = context.Transaction.GetOwinRequest()?.Context.Response; if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1119)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0120)); } if (string.IsNullOrEmpty(context.Transaction.Response.Error)) @@ -574,7 +574,7 @@ namespace OpenIddict.Validation.Owin var response = context.Transaction.GetOwinRequest()?.Context.Response; if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1119)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0120)); } // If the response doesn't contain a WWW-Authenticate header, don't return an empty response. @@ -583,7 +583,7 @@ namespace OpenIddict.Validation.Owin return default; } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7141), context.Transaction.Response); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6141), context.Transaction.Response); context.HandleRequest(); return default; @@ -615,17 +615,17 @@ namespace OpenIddict.Validation.Owin throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID5007)); + Debug.Assert(context.Transaction.Response is not null, SR.GetResourceString(SR.ID4007)); // This handler only applies to OWIN requests. If The OWIN request cannot be resolved, // this may indicate that the request was incorrectly processed by another server stack. var response = context.Transaction.GetOwinRequest()?.Context.Response; if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1119)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0120)); } - context.Logger.LogInformation(SR.GetResourceString(SR.ID7142), context.Transaction.Response); + context.Logger.LogInformation(SR.GetResourceString(SR.ID6142), context.Transaction.Response); using var stream = new MemoryStream(); using var writer = new Utf8JsonWriter(stream, new JsonWriterOptions diff --git a/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinMiddlewareFactory.cs b/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinMiddlewareFactory.cs index ab7ad0c6..2dd23351 100644 --- a/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinMiddlewareFactory.cs +++ b/src/OpenIddict.Validation.Owin/OpenIddictValidationOwinMiddlewareFactory.cs @@ -47,7 +47,7 @@ namespace OpenIddict.Validation.Owin var provider = context.Get(typeof(IServiceProvider).FullName); if (provider is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1167)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0168)); } // Note: the Microsoft.Extensions.DependencyInjection container doesn't support resolving services @@ -63,7 +63,7 @@ namespace OpenIddict.Validation.Owin return middleware.Invoke(context); static T GetRequiredService(IServiceProvider provider) => provider.GetService() ?? - throw new InvalidOperationException(SR.GetResourceString(SR.ID1168)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0169)); } } } diff --git a/src/OpenIddict.Validation.ServerIntegration/OpenIddictValidationServerIntegrationConfiguration.cs b/src/OpenIddict.Validation.ServerIntegration/OpenIddictValidationServerIntegrationConfiguration.cs index e6aa0177..b1c7483e 100644 --- a/src/OpenIddict.Validation.ServerIntegration/OpenIddictValidationServerIntegrationConfiguration.cs +++ b/src/OpenIddict.Validation.ServerIntegration/OpenIddictValidationServerIntegrationConfiguration.cs @@ -74,7 +74,7 @@ namespace OpenIddict.Validation.ServerIntegration if (options.ValidationType != OpenIddictValidationType.Direct) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1169)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0170)); } // Note: authorization validation requires that authorizations have an entry @@ -82,7 +82,7 @@ namespace OpenIddict.Validation.ServerIntegration // not created if the authorization storage is disabled in the server options. if (options.EnableAuthorizationEntryValidation && _options.CurrentValue.DisableAuthorizationStorage) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1170)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0171)); } // Note: token validation requires that tokens have an entry in the database @@ -90,7 +90,7 @@ namespace OpenIddict.Validation.ServerIntegration // token storage is disabled in the OpenIddict server options. if (options.EnableTokenEntryValidation && _options.CurrentValue.DisableTokenStorage) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1171)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0172)); } } } diff --git a/src/OpenIddict.Validation.SystemNetHttp/OpenIddictValidationSystemNetHttpHandlers.Introspection.cs b/src/OpenIddict.Validation.SystemNetHttp/OpenIddictValidationSystemNetHttpHandlers.Introspection.cs index 29aca2e4..7c99bfa9 100644 --- a/src/OpenIddict.Validation.SystemNetHttp/OpenIddictValidationSystemNetHttpHandlers.Introspection.cs +++ b/src/OpenIddict.Validation.SystemNetHttp/OpenIddictValidationSystemNetHttpHandlers.Introspection.cs @@ -60,18 +60,18 @@ namespace OpenIddict.Validation.SystemNetHttp throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Request is not null, SR.GetResourceString(SR.ID5008)); + Debug.Assert(context.Request is not null, SR.GetResourceString(SR.ID4008)); // This handler only applies to System.Net.Http requests. If the HTTP request cannot be resolved, // this may indicate that the request was incorrectly processed by another client stack. var request = context.Transaction.GetHttpRequestMessage(); if (request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1172)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0173)); } var configuration = await context.Options.ConfigurationManager.GetConfigurationAsync(default) ?? - throw new InvalidOperationException(SR.GetResourceString(SR.ID1139)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0140)); // The OAuth 2.0 specification recommends sending the client credentials using basic authentication. // However, this authentication method is known to have compatibility issues with how the diff --git a/src/OpenIddict.Validation.SystemNetHttp/OpenIddictValidationSystemNetHttpHandlers.cs b/src/OpenIddict.Validation.SystemNetHttp/OpenIddictValidationSystemNetHttpHandlers.cs index 50b71ab6..60c70a70 100644 --- a/src/OpenIddict.Validation.SystemNetHttp/OpenIddictValidationSystemNetHttpHandlers.cs +++ b/src/OpenIddict.Validation.SystemNetHttp/OpenIddictValidationSystemNetHttpHandlers.cs @@ -123,14 +123,14 @@ namespace OpenIddict.Validation.SystemNetHttp throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Transaction.Request is not null, SR.GetResourceString(SR.ID5008)); + Debug.Assert(context.Transaction.Request is not null, SR.GetResourceString(SR.ID4008)); // This handler only applies to System.Net.Http requests. If the HTTP request cannot be resolved, // this may indicate that the request was incorrectly processed by another client stack. var request = context.Transaction.GetHttpRequestMessage(); if (request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1172)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0173)); } // Note: System.Net.Http doesn't expose convenient methods allowing to create @@ -176,14 +176,14 @@ namespace OpenIddict.Validation.SystemNetHttp throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Transaction.Request is not null, SR.GetResourceString(SR.ID5008)); + Debug.Assert(context.Transaction.Request is not null, SR.GetResourceString(SR.ID4008)); // This handler only applies to System.Net.Http requests. If the HTTP request cannot be resolved, // this may indicate that the request was incorrectly processed by another client stack. var request = context.Transaction.GetHttpRequestMessage(); if (request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1172)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0173)); } request.Content = new FormUrlEncodedContent( @@ -231,20 +231,20 @@ namespace OpenIddict.Validation.SystemNetHttp var request = context.Transaction.GetHttpRequestMessage(); if (request is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1172)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0173)); } var assembly = typeof(OpenIddictValidationSystemNetHttpOptions).Assembly.GetName(); using var client = _factory.CreateClient(assembly.Name); if (client is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1173)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0174)); } var response = await client.SendAsync(request, HttpCompletionOption.ResponseContentRead); if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1174)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0175)); } // Store the HttpResponseMessage in the transaction properties. @@ -281,7 +281,7 @@ namespace OpenIddict.Validation.SystemNetHttp var response = context.Transaction.GetHttpResponseMessage(); if (response is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1172)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0173)); } // The status code is deliberately not validated to ensure even errored responses diff --git a/src/OpenIddict.Validation/OpenIddictValidationBuilder.cs b/src/OpenIddict.Validation/OpenIddictValidationBuilder.cs index 23c85149..7106d22f 100644 --- a/src/OpenIddict.Validation/OpenIddictValidationBuilder.cs +++ b/src/OpenIddict.Validation/OpenIddictValidationBuilder.cs @@ -160,7 +160,7 @@ namespace Microsoft.Extensions.DependencyInjection if (key is AsymmetricSecurityKey asymmetricSecurityKey && asymmetricSecurityKey.PrivateKeyStatus == PrivateKeyStatus.DoesNotExist) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1054)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0055)); } if (key.IsSupportedAlgorithm(SecurityAlgorithms.Aes256KW)) @@ -175,7 +175,7 @@ namespace Microsoft.Extensions.DependencyInjection SecurityAlgorithms.RsaOAEP, SecurityAlgorithms.Aes256CbcHmacSha512)); } - throw new InvalidOperationException(SR.GetResourceString(SR.ID1055)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0056)); } /// @@ -197,13 +197,13 @@ namespace Microsoft.Extensions.DependencyInjection var extensions = certificate.Extensions.OfType().ToList(); if (extensions.Count != 0 && !extensions.Any(extension => extension.KeyUsages.HasFlag(X509KeyUsageFlags.KeyEncipherment))) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1059)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0060)); } } if (!certificate.HasPrivateKey) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1060)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0061)); } return AddEncryptionKey(new X509SecurityKey(certificate)); @@ -246,18 +246,18 @@ namespace Microsoft.Extensions.DependencyInjection if (string.IsNullOrEmpty(resource)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1061), nameof(resource)); + throw new ArgumentException(SR.GetResourceString(SR.ID0062), nameof(resource)); } if (string.IsNullOrEmpty(password)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1062), nameof(password)); + throw new ArgumentException(SR.GetResourceString(SR.ID0063), nameof(password)); } using var stream = assembly.GetManifestResourceStream(resource); if (stream is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1063)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0064)); } return AddEncryptionCertificate(stream, password, flags); @@ -301,7 +301,7 @@ namespace Microsoft.Extensions.DependencyInjection if (string.IsNullOrEmpty(password)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1062), nameof(password)); + throw new ArgumentException(SR.GetResourceString(SR.ID0063), nameof(password)); } using var buffer = new MemoryStream(); @@ -319,13 +319,13 @@ namespace Microsoft.Extensions.DependencyInjection { if (string.IsNullOrEmpty(thumbprint)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1064), nameof(thumbprint)); + throw new ArgumentException(SR.GetResourceString(SR.ID0065), nameof(thumbprint)); } var certificate = GetCertificate(StoreLocation.CurrentUser, thumbprint) ?? GetCertificate(StoreLocation.LocalMachine, thumbprint); if (certificate is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1065)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0066)); } return AddEncryptionCertificate(certificate); @@ -353,7 +353,7 @@ namespace Microsoft.Extensions.DependencyInjection { if (string.IsNullOrEmpty(thumbprint)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1064), nameof(thumbprint)); + throw new ArgumentException(SR.GetResourceString(SR.ID0065), nameof(thumbprint)); } using var store = new X509Store(name, location); @@ -365,7 +365,7 @@ namespace Microsoft.Extensions.DependencyInjection if (certificate is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1065)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0066)); } return AddEncryptionCertificate(certificate); @@ -386,7 +386,7 @@ namespace Microsoft.Extensions.DependencyInjection if (audiences.Any(audience => string.IsNullOrEmpty(audience))) { - throw new ArgumentException(SR.GetResourceString(SR.ID1122), nameof(audiences)); + throw new ArgumentException(SR.GetResourceString(SR.ID0123), nameof(audiences)); } return Configure(options => options.Audiences.UnionWith(audiences)); @@ -438,7 +438,7 @@ namespace Microsoft.Extensions.DependencyInjection { if (string.IsNullOrEmpty(identifier)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1123), nameof(identifier)); + throw new ArgumentException(SR.GetResourceString(SR.ID0124), nameof(identifier)); } return Configure(options => options.ClientId = identifier); @@ -454,7 +454,7 @@ namespace Microsoft.Extensions.DependencyInjection { if (string.IsNullOrEmpty(secret)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1124), nameof(secret)); + throw new ArgumentException(SR.GetResourceString(SR.ID0125), nameof(secret)); } return Configure(options => options.ClientSecret = secret); @@ -486,12 +486,12 @@ namespace Microsoft.Extensions.DependencyInjection { if (string.IsNullOrEmpty(address)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1125), nameof(address)); + throw new ArgumentException(SR.GetResourceString(SR.ID0126), nameof(address)); } if (!Uri.TryCreate(address, UriKind.Absolute, out Uri? uri) || !uri.IsWellFormedOriginalString()) { - throw new ArgumentException(SR.GetResourceString(SR.ID1126), nameof(address)); + throw new ArgumentException(SR.GetResourceString(SR.ID0127), nameof(address)); } return SetIssuer(uri); diff --git a/src/OpenIddict.Validation/OpenIddictValidationConfiguration.cs b/src/OpenIddict.Validation/OpenIddictValidationConfiguration.cs index a77ef839..d4351437 100644 --- a/src/OpenIddict.Validation/OpenIddictValidationConfiguration.cs +++ b/src/OpenIddict.Validation/OpenIddictValidationConfiguration.cs @@ -40,45 +40,45 @@ namespace OpenIddict.Validation if (options.JsonWebTokenHandler is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1074)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0075)); } if (options.Configuration is null && options.ConfigurationManager is null && options.Issuer is null && options.MetadataAddress is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1127)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0128)); } if (options.ValidationType == OpenIddictValidationType.Introspection) { if (!options.Handlers.Any(descriptor => descriptor.ContextType == typeof(ApplyIntrospectionRequestContext))) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1128)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0129)); } if (options.Issuer is null && options.MetadataAddress is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1129)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0130)); } if (string.IsNullOrEmpty(options.ClientId)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1130)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0131)); } if (string.IsNullOrEmpty(options.ClientSecret)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1131)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0132)); } if (options.EnableAuthorizationEntryValidation) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1132)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0133)); } if (options.EnableTokenEntryValidation) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1133)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0134)); } } @@ -87,7 +87,7 @@ namespace OpenIddict.Validation options.EncryptionCredentials.All(credentials => credentials.Key is X509SecurityKey x509SecurityKey && (x509SecurityKey.Certificate.NotBefore > DateTime.Now || x509SecurityKey.Certificate.NotAfter < DateTime.Now))) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1086)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0087)); } if (options.ConfigurationManager is null) @@ -102,7 +102,7 @@ namespace OpenIddict.Validation if (!options.Handlers.Any(descriptor => descriptor.ContextType == typeof(ApplyConfigurationRequestContext)) || !options.Handlers.Any(descriptor => descriptor.ContextType == typeof(ApplyCryptographyRequestContext))) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1134)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0135)); } if (options.MetadataAddress is null) @@ -114,12 +114,12 @@ namespace OpenIddict.Validation { if (options.Issuer is null || !options.Issuer.IsAbsoluteUri) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1135)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0136)); } if (!string.IsNullOrEmpty(options.Issuer.Fragment) || !string.IsNullOrEmpty(options.Issuer.Query)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1136)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0137)); } if (!options.Issuer.OriginalString.EndsWith("/")) diff --git a/src/OpenIddict.Validation/OpenIddictValidationDispatcher.cs b/src/OpenIddict.Validation/OpenIddictValidationDispatcher.cs index 45a8da62..fbc59b70 100644 --- a/src/OpenIddict.Validation/OpenIddictValidationDispatcher.cs +++ b/src/OpenIddict.Validation/OpenIddictValidationDispatcher.cs @@ -49,14 +49,14 @@ namespace OpenIddict.Validation catch (Exception exception) when (_logger.IsEnabled(LogLevel.Debug)) { - _logger.LogDebug(exception, SR.GetResourceString(SR.ID7132), handler.GetType().FullName, typeof(TContext).FullName); + _logger.LogDebug(exception, SR.GetResourceString(SR.ID6132), handler.GetType().FullName, typeof(TContext).FullName); throw; } if (_logger.IsEnabled(LogLevel.Debug)) { - _logger.LogDebug(SR.GetResourceString(SR.ID7133), typeof(TContext).FullName, handler.GetType().FullName); + _logger.LogDebug(SR.GetResourceString(SR.ID6133), typeof(TContext).FullName, handler.GetType().FullName); } switch (context) @@ -64,21 +64,21 @@ namespace OpenIddict.Validation case BaseRequestContext notification when notification.IsRequestHandled: if (_logger.IsEnabled(LogLevel.Debug)) { - _logger.LogDebug(SR.GetResourceString(SR.ID7134), typeof(TContext).FullName, handler.GetType().FullName); + _logger.LogDebug(SR.GetResourceString(SR.ID6134), typeof(TContext).FullName, handler.GetType().FullName); } return; case BaseRequestContext notification when notification.IsRequestSkipped: if (_logger.IsEnabled(LogLevel.Debug)) { - _logger.LogDebug(SR.GetResourceString(SR.ID7135), typeof(TContext).FullName, handler.GetType().FullName); + _logger.LogDebug(SR.GetResourceString(SR.ID6135), typeof(TContext).FullName, handler.GetType().FullName); } return; case BaseValidatingContext notification when notification.IsRejected: if (_logger.IsEnabled(LogLevel.Debug)) { - _logger.LogDebug(SR.GetResourceString(SR.ID7136), typeof(TContext).FullName, handler.GetType().FullName); + _logger.LogDebug(SR.GetResourceString(SR.ID6136), typeof(TContext).FullName, handler.GetType().FullName); } return; @@ -109,7 +109,7 @@ namespace OpenIddict.Validation if (handler is null) { - throw new InvalidOperationException(SR.FormatID1137(descriptor.ServiceDescriptor.ServiceType)); + throw new InvalidOperationException(SR.FormatID0138(descriptor.ServiceDescriptor.ServiceType)); } yield return handler; @@ -122,7 +122,7 @@ namespace OpenIddict.Validation { if (!(_provider.GetService(descriptor.FilterTypes[index]) is IOpenIddictValidationHandlerFilter filter)) { - throw new InvalidOperationException(SR.FormatID1098(descriptor.FilterTypes[index])); + throw new InvalidOperationException(SR.FormatID0099(descriptor.FilterTypes[index])); } if (!await filter.IsActiveAsync(context)) diff --git a/src/OpenIddict.Validation/OpenIddictValidationHandlerDescriptor.cs b/src/OpenIddict.Validation/OpenIddictValidationHandlerDescriptor.cs index d1d2ee1c..9625d1ba 100644 --- a/src/OpenIddict.Validation/OpenIddictValidationHandlerDescriptor.cs +++ b/src/OpenIddict.Validation/OpenIddictValidationHandlerDescriptor.cs @@ -86,7 +86,7 @@ namespace OpenIddict.Validation if (!typeof(IOpenIddictValidationHandlerFilter<>).MakeGenericType(typeof(TContext)).IsAssignableFrom(type)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1103)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0104)); } _filterTypes.Add(type); @@ -118,7 +118,7 @@ namespace OpenIddict.Validation var type = descriptor.ServiceType; if (!typeof(IOpenIddictValidationHandler<>).MakeGenericType(typeof(TContext)).IsAssignableFrom(type)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1103)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0104)); } _descriptor = descriptor; @@ -216,7 +216,7 @@ namespace OpenIddict.Validation ContextType = typeof(TContext), FilterTypes = _filterTypes.ToImmutableArray(), Order = _order, - ServiceDescriptor = _descriptor ?? throw new InvalidOperationException(SR.GetResourceString(SR.ID1104)), + ServiceDescriptor = _descriptor ?? throw new InvalidOperationException(SR.GetResourceString(SR.ID0105)), Type = _type }; } diff --git a/src/OpenIddict.Validation/OpenIddictValidationHandlers.Discovery.cs b/src/OpenIddict.Validation/OpenIddictValidationHandlers.Discovery.cs index 5a8c2b9d..97b5c33e 100644 --- a/src/OpenIddict.Validation/OpenIddictValidationHandlers.Discovery.cs +++ b/src/OpenIddict.Validation/OpenIddictValidationHandlers.Discovery.cs @@ -63,7 +63,7 @@ namespace OpenIddict.Validation { context.Reject( error: Errors.ServerError, - description: context.Localizer[SR.ID3096]); + description: context.Localizer[SR.ID2096]); return default; } @@ -72,7 +72,7 @@ namespace OpenIddict.Validation { context.Reject( error: Errors.ServerError, - description: context.Localizer[SR.ID3097]); + description: context.Localizer[SR.ID2097]); return default; } @@ -81,7 +81,7 @@ namespace OpenIddict.Validation { context.Reject( error: Errors.ServerError, - description: context.Localizer[SR.ID3098]); + description: context.Localizer[SR.ID2098]); return default; } @@ -122,7 +122,7 @@ namespace OpenIddict.Validation { context.Reject( error: Errors.ServerError, - description: context.Localizer[SR.ID3099]); + description: context.Localizer[SR.ID2099]); return default; } @@ -131,7 +131,7 @@ namespace OpenIddict.Validation { context.Reject( error: Errors.ServerError, - description: context.Localizer[SR.ID3100]); + description: context.Localizer[SR.ID2100]); return default; } @@ -170,7 +170,7 @@ namespace OpenIddict.Validation { context.Reject( error: Errors.ServerError, - description: context.Localizer[SR.ID3101]); + description: context.Localizer[SR.ID2101]); return default; } @@ -224,7 +224,7 @@ namespace OpenIddict.Validation { context.Reject( error: Errors.ServerError, - description: context.Localizer[SR.ID3102, JsonWebKeySetParameterNames.Keys]); + description: context.Localizer[SR.ID2102, JsonWebKeySetParameterNames.Keys]); return default; } @@ -270,7 +270,7 @@ namespace OpenIddict.Validation { context.Reject( error: Errors.ServerError, - description: context.Localizer[SR.ID3103]); + description: context.Localizer[SR.ID2103]); return default; } @@ -281,7 +281,7 @@ namespace OpenIddict.Validation { context.Reject( error: Errors.ServerError, - description: context.Localizer[SR.ID3104]); + description: context.Localizer[SR.ID2104]); return default; } @@ -292,7 +292,7 @@ namespace OpenIddict.Validation { context.Reject( error: Errors.ServerError, - description: context.Localizer[SR.ID3104]); + description: context.Localizer[SR.ID2104]); return default; } diff --git a/src/OpenIddict.Validation/OpenIddictValidationHandlers.Introspection.cs b/src/OpenIddict.Validation/OpenIddictValidationHandlers.Introspection.cs index 04d20cc9..51c63305 100644 --- a/src/OpenIddict.Validation/OpenIddictValidationHandlers.Introspection.cs +++ b/src/OpenIddict.Validation/OpenIddictValidationHandlers.Introspection.cs @@ -131,7 +131,7 @@ namespace OpenIddict.Validation { context.Reject( error: Errors.ServerError, - description: context.Localizer[SR.ID3105, Parameters.Active]); + description: context.Localizer[SR.ID2105, Parameters.Active]); return default; } @@ -142,7 +142,7 @@ namespace OpenIddict.Validation { context.Reject( error: Errors.InvalidToken, - description: context.Localizer[SR.ID3106]); + description: context.Localizer[SR.ID2106]); return default; } @@ -183,7 +183,7 @@ namespace OpenIddict.Validation context.Reject( error: Errors.ServerError, - description: context.Localizer[SR.ID3107, parameter.Key]); + description: context.Localizer[SR.ID2107, parameter.Key]); return default; } @@ -298,7 +298,7 @@ namespace OpenIddict.Validation { context.Reject( error: Errors.ServerError, - description: context.Localizer[SR.ID3108]); + description: context.Localizer[SR.ID2108]); return default; } @@ -307,7 +307,7 @@ namespace OpenIddict.Validation { context.Reject( error: Errors.ServerError, - description: context.Localizer[SR.ID3109]); + description: context.Localizer[SR.ID2109]); return default; } @@ -351,7 +351,7 @@ namespace OpenIddict.Validation { context.Reject( error: Errors.InvalidToken, - description: context.Localizer[SR.ID3110]); + description: context.Localizer[SR.ID2110]); return default; } diff --git a/src/OpenIddict.Validation/OpenIddictValidationHandlers.cs b/src/OpenIddict.Validation/OpenIddictValidationHandlers.cs index bc0457f2..d7c3c350 100644 --- a/src/OpenIddict.Validation/OpenIddictValidationHandlers.cs +++ b/src/OpenIddict.Validation/OpenIddictValidationHandlers.cs @@ -85,7 +85,7 @@ namespace OpenIddict.Validation { context.Reject( error: Errors.MissingToken, - description: context.Localizer[SR.ID3000]); + description: context.Localizer[SR.ID2000]); return default; } @@ -102,7 +102,7 @@ namespace OpenIddict.Validation { private readonly IOpenIddictTokenManager _tokenManager; - public ValidateReferenceTokenIdentifier() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1138)); + public ValidateReferenceTokenIdentifier() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0139)); public ValidateReferenceTokenIdentifier(IOpenIddictTokenManager tokenManager) => _tokenManager = tokenManager; @@ -146,7 +146,7 @@ namespace OpenIddict.Validation { context.Reject( error: Errors.InvalidToken, - description: context.Localizer[SR.ID3004]); + description: context.Localizer[SR.ID2004]); return; } @@ -154,7 +154,7 @@ namespace OpenIddict.Validation var payload = await _tokenManager.GetPayloadAsync(token); if (string.IsNullOrEmpty(payload)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1025)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0026)); } // Replace the token parameter by the payload resolved from the token entry. @@ -203,7 +203,7 @@ namespace OpenIddict.Validation } var configuration = await context.Options.ConfigurationManager.GetConfigurationAsync(default) ?? - throw new InvalidOperationException(SR.GetResourceString(SR.ID1139)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0140)); // Clone the token validation parameters and set the issuer using the value found in the // OpenID Connect server configuration (that can be static or retrieved using discovery). @@ -229,7 +229,7 @@ namespace OpenIddict.Validation JsonWebTokenTypes.Prefixes.Application + JsonWebTokenTypes.AccessToken }, - _ => throw new InvalidOperationException(SR.GetResourceString(SR.ID1002)) + _ => throw new InvalidOperationException(SR.GetResourceString(SR.ID0003)) }; var result = context.Options.JsonWebTokenHandler.ValidateToken(context.Token, parameters); @@ -242,18 +242,18 @@ namespace OpenIddict.Validation context.Options.ConfigurationManager.RequestRefresh(); } - context.Logger.LogTrace(result.Exception, SR.GetResourceString(SR.ID7000), context.Token); + context.Logger.LogTrace(result.Exception, SR.GetResourceString(SR.ID6000), context.Token); context.Reject( error: Errors.InvalidToken, description: result.Exception switch { - SecurityTokenInvalidIssuerException => context.Localizer[SR.ID3088], - SecurityTokenInvalidTypeException => context.Localizer[SR.ID3089], - SecurityTokenSignatureKeyNotFoundException => context.Localizer[SR.ID3090], - SecurityTokenInvalidSignatureException => context.Localizer[SR.ID3091], + SecurityTokenInvalidIssuerException => context.Localizer[SR.ID2088], + SecurityTokenInvalidTypeException => context.Localizer[SR.ID2089], + SecurityTokenSignatureKeyNotFoundException => context.Localizer[SR.ID2090], + SecurityTokenInvalidSignatureException => context.Localizer[SR.ID2091], - _ => context.Localizer[SR.ID3004] + _ => context.Localizer[SR.ID2004] }); return; @@ -265,15 +265,15 @@ namespace OpenIddict.Validation // Store the token type (resolved from "typ" or "token_usage") as a special private claim. context.Principal.SetTokenType(result.TokenType switch { - var type when string.IsNullOrEmpty(type) => throw new InvalidOperationException(SR.GetResourceString(SR.ID1024)), + var type when string.IsNullOrEmpty(type) => throw new InvalidOperationException(SR.GetResourceString(SR.ID0025)), JsonWebTokenTypes.AccessToken => TokenTypeHints.AccessToken, JsonWebTokenTypes.Prefixes.Application + JsonWebTokenTypes.AccessToken => TokenTypeHints.AccessToken, - _ => throw new InvalidOperationException(SR.GetResourceString(SR.ID1002)) + _ => throw new InvalidOperationException(SR.GetResourceString(SR.ID0003)) }); - context.Logger.LogTrace(SR.GetResourceString(SR.ID7001), context.Token, context.Principal.Claims); + context.Logger.LogTrace(SR.GetResourceString(SR.ID6001), context.Token, context.Principal.Claims); } } @@ -312,10 +312,10 @@ namespace OpenIddict.Validation return; } - Debug.Assert(!string.IsNullOrEmpty(context.Token), SR.GetResourceString(SR.ID5010)); + Debug.Assert(!string.IsNullOrEmpty(context.Token), SR.GetResourceString(SR.ID4010)); var configuration = await context.Options.ConfigurationManager.GetConfigurationAsync(default) ?? - throw new InvalidOperationException(SR.GetResourceString(SR.ID1139)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0140)); if (string.IsNullOrEmpty(configuration.IntrospectionEndpoint) || !Uri.TryCreate(configuration.IntrospectionEndpoint, UriKind.Absolute, out Uri? address) || @@ -323,7 +323,7 @@ namespace OpenIddict.Validation { context.Reject( error: Errors.ServerError, - description: context.Localizer[SR.ID3092]); + description: context.Localizer[SR.ID2092]); return; } @@ -331,7 +331,7 @@ namespace OpenIddict.Validation try { var principal = await _service.IntrospectTokenAsync(address, context.Token, context.TokenType) ?? - throw new InvalidOperationException(SR.GetResourceString(SR.ID1140)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0141)); // Note: tokens that are considered valid at this point are assumed to be of the given type, // as the introspection handlers ensure the introspected token type matches the expected @@ -339,16 +339,16 @@ namespace OpenIddict.Validation // If no token type can be inferred, the token is assumed to be an access token. context.Principal = principal.SetTokenType(context.TokenType ?? TokenTypeHints.AccessToken); - context.Logger.LogTrace(SR.GetResourceString(SR.ID7154), context.Token, context.Principal.Claims); + context.Logger.LogTrace(SR.GetResourceString(SR.ID6154), context.Token, context.Principal.Claims); } catch (Exception exception) { - context.Logger.LogDebug(exception, SR.GetResourceString(SR.ID7155)); + context.Logger.LogDebug(exception, SR.GetResourceString(SR.ID6155)); context.Reject( error: Errors.InvalidToken, - description: context.Localizer[SR.ID3004]); + description: context.Localizer[SR.ID2004]); return; } @@ -511,7 +511,7 @@ namespace OpenIddict.Validation { private readonly IOpenIddictTokenManager _tokenManager; - public RestoreReferenceTokenProperties() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1138)); + public RestoreReferenceTokenProperties() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0139)); public RestoreReferenceTokenProperties(IOpenIddictTokenManager tokenManager) => _tokenManager = tokenManager; @@ -550,7 +550,7 @@ namespace OpenIddict.Validation var token = await _tokenManager.FindByIdAsync(identifier); if (token is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1020)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0021)); } // Restore the creation/expiration dates/identifiers from the token entry metadata. @@ -590,7 +590,7 @@ namespace OpenIddict.Validation { context.Reject( error: Errors.InvalidToken, - description: context.Localizer[SR.ID3004]); + description: context.Localizer[SR.ID2004]); return default; } @@ -604,12 +604,12 @@ namespace OpenIddict.Validation var type = context.Principal.GetTokenType(); if (string.IsNullOrEmpty(type)) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1003)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0004)); } if (!string.Equals(type, context.TokenType, StringComparison.OrdinalIgnoreCase)) { - throw new InvalidOperationException(SR.FormatID1004(type, context.TokenType)); + throw new InvalidOperationException(SR.FormatID0005(type, context.TokenType)); } } @@ -640,16 +640,16 @@ namespace OpenIddict.Validation throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); var date = context.Principal.GetExpirationDate(); if (date.HasValue && date.Value < DateTimeOffset.UtcNow) { - context.Logger.LogError(SR.GetResourceString(SR.ID7156)); + context.Logger.LogError(SR.GetResourceString(SR.ID6156)); context.Reject( error: Errors.InvalidToken, - description: context.Localizer[SR.ID3019]); + description: context.Localizer[SR.ID2019]); return default; } @@ -682,7 +682,7 @@ namespace OpenIddict.Validation throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); // If no explicit audience has been configured, // skip the default audience validation. @@ -695,11 +695,11 @@ namespace OpenIddict.Validation var audiences = context.Principal.GetAudiences(); if (audiences.IsDefaultOrEmpty) { - context.Logger.LogError(SR.GetResourceString(SR.ID7157)); + context.Logger.LogError(SR.GetResourceString(SR.ID6157)); context.Reject( error: Errors.InvalidToken, - description: context.Localizer[SR.ID3093]); + description: context.Localizer[SR.ID2093]); return default; } @@ -707,11 +707,11 @@ namespace OpenIddict.Validation // If the access token doesn't include any registered audience, return an error. if (!audiences.Intersect(context.Options.Audiences, StringComparer.Ordinal).Any()) { - context.Logger.LogError(SR.GetResourceString(SR.ID7158)); + context.Logger.LogError(SR.GetResourceString(SR.ID6158)); context.Reject( error: Errors.InvalidToken, - description: context.Localizer[SR.ID3094]); + description: context.Localizer[SR.ID2094]); return default; } @@ -729,7 +729,7 @@ namespace OpenIddict.Validation { private readonly IOpenIddictTokenManager _tokenManager; - public ValidateTokenEntry() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1138)); + public ValidateTokenEntry() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0139)); public ValidateTokenEntry(IOpenIddictTokenManager tokenManager) => _tokenManager = tokenManager; @@ -754,7 +754,7 @@ namespace OpenIddict.Validation throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); var identifier = context.Principal.GetTokenId(); if (string.IsNullOrEmpty(identifier)) @@ -765,11 +765,11 @@ namespace OpenIddict.Validation var token = await _tokenManager.FindByIdAsync(identifier); if (token is null || !await _tokenManager.HasStatusAsync(token, Statuses.Valid)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7005), identifier); + context.Logger.LogError(SR.GetResourceString(SR.ID6005), identifier); context.Reject( error: Errors.InvalidToken, - description: context.Localizer[SR.ID3019]); + description: context.Localizer[SR.ID2019]); return; } @@ -792,7 +792,7 @@ namespace OpenIddict.Validation { private readonly IOpenIddictAuthorizationManager _authorizationManager; - public ValidateAuthorizationEntry() => throw new InvalidOperationException(SR.GetResourceString(SR.ID1141)); + public ValidateAuthorizationEntry() => throw new InvalidOperationException(SR.GetResourceString(SR.ID0142)); public ValidateAuthorizationEntry(IOpenIddictAuthorizationManager authorizationManager) => _authorizationManager = authorizationManager; @@ -817,7 +817,7 @@ namespace OpenIddict.Validation throw new ArgumentNullException(nameof(context)); } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); var identifier = context.Principal.GetAuthorizationId(); if (string.IsNullOrEmpty(identifier)) @@ -828,11 +828,11 @@ namespace OpenIddict.Validation var authorization = await _authorizationManager.FindByIdAsync(identifier); if (authorization is null || !await _authorizationManager.HasStatusAsync(authorization, Statuses.Valid)) { - context.Logger.LogError(SR.GetResourceString(SR.ID7006), identifier); + context.Logger.LogError(SR.GetResourceString(SR.ID6006), identifier); context.Reject( error: Errors.InvalidToken, - description: context.Localizer[SR.ID3023]); + description: context.Localizer[SR.ID2023]); return; } @@ -890,7 +890,7 @@ namespace OpenIddict.Validation else { context.Response.Error = Errors.InsufficientAccess; - context.Response.ErrorDescription = context.Localizer[SR.ID3095]; + context.Response.ErrorDescription = context.Localizer[SR.ID2095]; } return default; diff --git a/src/OpenIddict.Validation/OpenIddictValidationHelpers.cs b/src/OpenIddict.Validation/OpenIddictValidationHelpers.cs index 787ba051..fb6d34e7 100644 --- a/src/OpenIddict.Validation/OpenIddictValidationHelpers.cs +++ b/src/OpenIddict.Validation/OpenIddictValidationHelpers.cs @@ -31,7 +31,7 @@ namespace OpenIddict.Validation if (string.IsNullOrEmpty(name)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1105), nameof(name)); + throw new ArgumentException(SR.GetResourceString(SR.ID0106), nameof(name)); } if (transaction.Properties.TryGetValue(name, out var property) && property is TProperty result) @@ -61,7 +61,7 @@ namespace OpenIddict.Validation if (string.IsNullOrEmpty(name)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1105), nameof(name)); + throw new ArgumentException(SR.GetResourceString(SR.ID0106), nameof(name)); } if (value is null) diff --git a/src/OpenIddict.Validation/OpenIddictValidationOptions.cs b/src/OpenIddict.Validation/OpenIddictValidationOptions.cs index 695e5331..6c309962 100644 --- a/src/OpenIddict.Validation/OpenIddictValidationOptions.cs +++ b/src/OpenIddict.Validation/OpenIddictValidationOptions.cs @@ -137,7 +137,7 @@ namespace OpenIddict.Validation TokenTypeHints.AccessToken => JsonWebTokenTypes.AccessToken, TokenTypeHints.IdToken => JsonWebTokenTypes.IdentityToken, - _ => throw new NotSupportedException(SR.GetResourceString(SR.ID1268)) + _ => throw new NotSupportedException(SR.GetResourceString(SR.ID0269)) }; } @@ -145,14 +145,14 @@ namespace OpenIddict.Validation // (provided via the type delegate parameter) or inferred from the token_usage claim. if (string.IsNullOrEmpty(type)) { - throw new SecurityTokenInvalidTypeException(SR.GetResourceString(SR.ID1269)); + throw new SecurityTokenInvalidTypeException(SR.GetResourceString(SR.ID0270)); } // Note: unlike IdentityModel, this custom validator deliberately uses case-insensitive comparisons. if (parameters.ValidTypes is not null && parameters.ValidTypes.Any() && !parameters.ValidTypes.Contains(type, StringComparer.OrdinalIgnoreCase)) { - throw new SecurityTokenInvalidTypeException(SR.GetResourceString(SR.ID1270)) + throw new SecurityTokenInvalidTypeException(SR.GetResourceString(SR.ID0271)) { InvalidType = type }; diff --git a/src/OpenIddict.Validation/OpenIddictValidationRetriever.cs b/src/OpenIddict.Validation/OpenIddictValidationRetriever.cs index 5269cc09..2e191f62 100644 --- a/src/OpenIddict.Validation/OpenIddictValidationRetriever.cs +++ b/src/OpenIddict.Validation/OpenIddictValidationRetriever.cs @@ -35,26 +35,26 @@ namespace OpenIddict.Validation { if (string.IsNullOrEmpty(address)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1142), nameof(address)); + throw new ArgumentException(SR.GetResourceString(SR.ID0143), nameof(address)); } if (!Uri.TryCreate(address, UriKind.Absolute, out Uri? uri) || !uri.IsWellFormedOriginalString()) { - throw new ArgumentException(SR.GetResourceString(SR.ID1143), nameof(address)); + throw new ArgumentException(SR.GetResourceString(SR.ID0144), nameof(address)); } cancel.ThrowIfCancellationRequested(); var configuration = await _service.GetConfigurationAsync(uri, cancel) ?? - throw new InvalidOperationException(SR.GetResourceString(SR.ID1144)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0145)); if (!Uri.TryCreate(configuration.JwksUri, UriKind.Absolute, out uri) || !uri.IsWellFormedOriginalString()) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1145)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0146)); } configuration.JsonWebKeySet = await _service.GetSecurityKeysAsync(uri, cancel) ?? - throw new InvalidOperationException(SR.GetResourceString(SR.ID1146)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0147)); // Copy the signing keys found in the JSON Web Key Set to the SigningKeys collection. foreach (var key in configuration.JsonWebKeySet.GetSigningKeys()) diff --git a/src/OpenIddict.Validation/OpenIddictValidationService.cs b/src/OpenIddict.Validation/OpenIddictValidationService.cs index 7935d882..fb80bad3 100644 --- a/src/OpenIddict.Validation/OpenIddictValidationService.cs +++ b/src/OpenIddict.Validation/OpenIddictValidationService.cs @@ -45,7 +45,7 @@ namespace OpenIddict.Validation if (!address.IsAbsoluteUri) { - throw new ArgumentException(SR.GetResourceString(SR.ID1143), nameof(address)); + throw new ArgumentException(SR.GetResourceString(SR.ID0144), nameof(address)); } cancellationToken.ThrowIfCancellationRequested(); @@ -71,7 +71,7 @@ namespace OpenIddict.Validation var configuration = await HandleConfigurationResponseAsync(); if (configuration is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1144)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0145)); } return configuration; @@ -89,7 +89,7 @@ namespace OpenIddict.Validation if (context.IsRejected) { throw new OpenIddictExceptions.GenericException( - SR.FormatID1147(context.Error, context.ErrorDescription, context.ErrorUri), + SR.FormatID0148(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -108,7 +108,7 @@ namespace OpenIddict.Validation if (context.IsRejected) { throw new OpenIddictExceptions.GenericException( - SR.FormatID1148(context.Error, context.ErrorDescription, context.ErrorUri), + SR.FormatID0149(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -127,11 +127,11 @@ namespace OpenIddict.Validation if (context.IsRejected) { throw new OpenIddictExceptions.GenericException( - SR.FormatID1149(context.Error, context.ErrorDescription, context.ErrorUri), + SR.FormatID0150(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } - Debug.Assert(context.Response is not null, SR.GetResourceString(SR.ID5007)); + Debug.Assert(context.Response is not null, SR.GetResourceString(SR.ID4007)); return context.Response; } @@ -149,7 +149,7 @@ namespace OpenIddict.Validation if (context.IsRejected) { throw new OpenIddictExceptions.GenericException( - SR.FormatID1150(context.Error, context.ErrorDescription, context.ErrorUri), + SR.FormatID0151(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -186,7 +186,7 @@ namespace OpenIddict.Validation if (!address.IsAbsoluteUri) { - throw new ArgumentException(SR.GetResourceString(SR.ID1143), nameof(address)); + throw new ArgumentException(SR.GetResourceString(SR.ID0144), nameof(address)); } cancellationToken.ThrowIfCancellationRequested(); @@ -213,7 +213,7 @@ namespace OpenIddict.Validation var keys = await HandleCryptographyResponseAsync(); if (keys is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1146)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0147)); } return keys; @@ -231,7 +231,7 @@ namespace OpenIddict.Validation if (context.IsRejected) { throw new OpenIddictExceptions.GenericException( - SR.FormatID1151(context.Error, context.ErrorDescription, context.ErrorUri), + SR.FormatID0152(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -250,7 +250,7 @@ namespace OpenIddict.Validation if (context.IsRejected) { throw new OpenIddictExceptions.GenericException( - SR.FormatID1152(context.Error, context.ErrorDescription, context.ErrorUri), + SR.FormatID0153(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -269,11 +269,11 @@ namespace OpenIddict.Validation if (context.IsRejected) { throw new OpenIddictExceptions.GenericException( - SR.FormatID1153(context.Error, context.ErrorDescription, context.ErrorUri), + SR.FormatID0154(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } - Debug.Assert(context.Response is not null, SR.GetResourceString(SR.ID5007)); + Debug.Assert(context.Response is not null, SR.GetResourceString(SR.ID4007)); return context.Response; } @@ -291,7 +291,7 @@ namespace OpenIddict.Validation if (context.IsRejected) { throw new OpenIddictExceptions.GenericException( - SR.FormatID1154(context.Error, context.ErrorDescription, context.ErrorUri), + SR.FormatID0155(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -341,12 +341,12 @@ namespace OpenIddict.Validation if (!address.IsAbsoluteUri) { - throw new ArgumentException(SR.GetResourceString(SR.ID1143), nameof(address)); + throw new ArgumentException(SR.GetResourceString(SR.ID0144), nameof(address)); } if (string.IsNullOrEmpty(token)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1155), nameof(token)); + throw new ArgumentException(SR.GetResourceString(SR.ID0156), nameof(token)); } cancellationToken.ThrowIfCancellationRequested(); @@ -372,7 +372,7 @@ namespace OpenIddict.Validation var principal = await HandleIntrospectionResponseAsync(); if (principal is null) { - throw new InvalidOperationException(SR.GetResourceString(SR.ID1156)); + throw new InvalidOperationException(SR.GetResourceString(SR.ID0157)); } return principal; @@ -392,7 +392,7 @@ namespace OpenIddict.Validation if (context.IsRejected) { throw new OpenIddictExceptions.GenericException( - SR.FormatID1157(context.Error, context.ErrorDescription, context.ErrorUri), + SR.FormatID0158(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -411,7 +411,7 @@ namespace OpenIddict.Validation if (context.IsRejected) { throw new OpenIddictExceptions.GenericException( - SR.FormatID1158(context.Error, context.ErrorDescription, context.ErrorUri), + SR.FormatID0159(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } @@ -430,11 +430,11 @@ namespace OpenIddict.Validation if (context.IsRejected) { throw new OpenIddictExceptions.GenericException( - SR.FormatID1159(context.Error, context.ErrorDescription, context.ErrorUri), + SR.FormatID0160(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } - Debug.Assert(context.Response is not null, SR.GetResourceString(SR.ID5007)); + Debug.Assert(context.Response is not null, SR.GetResourceString(SR.ID4007)); return context.Response; } @@ -454,11 +454,11 @@ namespace OpenIddict.Validation if (context.IsRejected) { throw new OpenIddictExceptions.GenericException( - SR.FormatID1160(context.Error, context.ErrorDescription, context.ErrorUri), + SR.FormatID0161(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); return context.Principal; } @@ -488,7 +488,7 @@ namespace OpenIddict.Validation { if (string.IsNullOrEmpty(token)) { - throw new ArgumentException(SR.GetResourceString(SR.ID1161), nameof(token)); + throw new ArgumentException(SR.GetResourceString(SR.ID0162), nameof(token)); } cancellationToken.ThrowIfCancellationRequested(); @@ -517,11 +517,11 @@ namespace OpenIddict.Validation if (context.IsRejected) { throw new OpenIddictExceptions.GenericException( - SR.FormatID1162(context.Error, context.ErrorDescription, context.ErrorUri), + SR.FormatID0163(context.Error, context.ErrorDescription, context.ErrorUri), context.Error, context.ErrorDescription, context.ErrorUri); } - Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID5006)); + Debug.Assert(context.Principal is not null, SR.GetResourceString(SR.ID4006)); return context.Principal; } diff --git a/test/OpenIddict.Abstractions.Tests/Primitives/OpenIddictConverterTests.cs b/test/OpenIddict.Abstractions.Tests/Primitives/OpenIddictConverterTests.cs index 818c34b2..520b410a 100644 --- a/test/OpenIddict.Abstractions.Tests/Primitives/OpenIddictConverterTests.cs +++ b/test/OpenIddict.Abstractions.Tests/Primitives/OpenIddictConverterTests.cs @@ -87,7 +87,7 @@ namespace OpenIddict.Abstractions.Tests.Primitives return converter.Read(ref reader, type, options: null); }); - Assert.StartsWith(SR.GetResourceString(SR.ID1175), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0176), exception.Message); Assert.Equal("typeToConvert", exception.ParamName); } diff --git a/test/OpenIddict.Abstractions.Tests/Primitives/OpenIddictExtensionsTests.cs b/test/OpenIddict.Abstractions.Tests/Primitives/OpenIddictExtensionsTests.cs index 8f0c0911..15a9817f 100644 --- a/test/OpenIddict.Abstractions.Tests/Primitives/OpenIddictExtensionsTests.cs +++ b/test/OpenIddict.Abstractions.Tests/Primitives/OpenIddictExtensionsTests.cs @@ -184,7 +184,7 @@ namespace OpenIddict.Abstractions.Tests.Primitives var exception = Assert.Throws(() => request.HasAcrValue(value)); Assert.Equal("value", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1176), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0177), exception.Message); } [Theory] @@ -248,7 +248,7 @@ namespace OpenIddict.Abstractions.Tests.Primitives var exception = Assert.Throws(() => request.HasPrompt(prompt)); Assert.Equal("prompt", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1177), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0178), exception.Message); } [Theory] @@ -312,7 +312,7 @@ namespace OpenIddict.Abstractions.Tests.Primitives var exception = Assert.Throws(() => request.HasResponseType(type)); Assert.Equal("type", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1178), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0179), exception.Message); } [Theory] @@ -376,7 +376,7 @@ namespace OpenIddict.Abstractions.Tests.Primitives var exception = Assert.Throws(() => request.HasScope(scope)); Assert.Equal("scope", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1179), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0180), exception.Message); } [Theory] @@ -986,7 +986,7 @@ namespace OpenIddict.Abstractions.Tests.Primitives var exception = Assert.Throws(() => claim.HasDestination(null)); Assert.Equal("destination", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1180), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0181), exception.Message); } [Fact] @@ -1056,7 +1056,7 @@ namespace OpenIddict.Abstractions.Tests.Primitives var exception = Assert.Throws(() => claim.SetDestinations(destination)); Assert.Equal("destinations", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1181), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0182), exception.Message); } [Theory] @@ -1979,7 +1979,7 @@ namespace OpenIddict.Abstractions.Tests.Primitives var exception = Assert.Throws(() => principal.HasAudience(audience)); Assert.Equal("audience", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1185), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0186), exception.Message); } [Theory] @@ -2043,7 +2043,7 @@ namespace OpenIddict.Abstractions.Tests.Primitives var exception = Assert.Throws(() => principal.HasPresenter(presenter)); Assert.Equal("presenter", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1186), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0187), exception.Message); } [Theory] @@ -2107,7 +2107,7 @@ namespace OpenIddict.Abstractions.Tests.Primitives var exception = Assert.Throws(() => principal.HasResource(resource)); Assert.Equal("resource", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1061), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0062), exception.Message); } [Theory] @@ -2171,7 +2171,7 @@ namespace OpenIddict.Abstractions.Tests.Primitives var exception = Assert.Throws(() => principal.HasScope(scope)); Assert.Equal("scope", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1179), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0180), exception.Message); } [Theory] @@ -2236,7 +2236,7 @@ namespace OpenIddict.Abstractions.Tests.Primitives var exception = Assert.Throws(() => principal.HasTokenType(type)); Assert.Equal("type", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1187), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0188), exception.Message); } [Fact] @@ -2265,7 +2265,7 @@ namespace OpenIddict.Abstractions.Tests.Primitives var exception = Assert.Throws(() => identity.AddClaim(type, "value")); Assert.Equal("type", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1183), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0184), exception.Message); } [Fact] @@ -2305,7 +2305,7 @@ namespace OpenIddict.Abstractions.Tests.Primitives var exception = Assert.Throws(() => principal.GetClaims(type)); Assert.Equal("type", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1183), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0184), exception.Message); } [Fact] @@ -2347,7 +2347,7 @@ namespace OpenIddict.Abstractions.Tests.Primitives var exception = Assert.Throws(() => principal.HasClaim(type)); Assert.Equal("type", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1183), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0184), exception.Message); } [Fact] @@ -2391,7 +2391,7 @@ namespace OpenIddict.Abstractions.Tests.Primitives var exception = Assert.Throws(() => principal.RemoveClaims(type)); Assert.Equal("type", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1183), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0184), exception.Message); } [Fact] @@ -2434,7 +2434,7 @@ namespace OpenIddict.Abstractions.Tests.Primitives var exception = Assert.Throws(() => principal.SetClaim(type, "value")); Assert.Equal("type", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1183), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0184), exception.Message); } [Fact] diff --git a/test/OpenIddict.Abstractions.Tests/Primitives/OpenIddictMessageTests.cs b/test/OpenIddict.Abstractions.Tests/Primitives/OpenIddictMessageTests.cs index 65ac8ecb..1a0ea1c1 100644 --- a/test/OpenIddict.Abstractions.Tests/Primitives/OpenIddictMessageTests.cs +++ b/test/OpenIddict.Abstractions.Tests/Primitives/OpenIddictMessageTests.cs @@ -32,7 +32,7 @@ namespace OpenIddict.Abstractions.Tests.Primitives }); Assert.Equal("name", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1189), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0190), exception.Message); } [Fact] @@ -45,7 +45,7 @@ namespace OpenIddict.Abstractions.Tests.Primitives }); Assert.Equal("parameters", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1188), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0189), exception.Message); } [Fact] @@ -62,7 +62,7 @@ namespace OpenIddict.Abstractions.Tests.Primitives }); Assert.Equal("name", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1190), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0191), exception.Message); } [Fact] @@ -150,7 +150,7 @@ namespace OpenIddict.Abstractions.Tests.Primitives }); Assert.Equal("name", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1189), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0190), exception.Message); } [Fact] @@ -211,7 +211,7 @@ namespace OpenIddict.Abstractions.Tests.Primitives var exception = Assert.Throws(() => message.GetParameter(name)); Assert.Equal("name", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1189), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0190), exception.Message); } [Fact] @@ -277,7 +277,7 @@ namespace OpenIddict.Abstractions.Tests.Primitives var exception = Assert.Throws(() => message.HasParameter(name)); Assert.Equal("name", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1189), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0190), exception.Message); } [Theory] @@ -307,7 +307,7 @@ namespace OpenIddict.Abstractions.Tests.Primitives var exception = Assert.Throws(() => message.RemoveParameter(name)); Assert.Equal("name", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1189), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0190), exception.Message); } [Fact] @@ -336,7 +336,7 @@ namespace OpenIddict.Abstractions.Tests.Primitives var exception = Assert.Throws(() => message.SetParameter(name, null)); Assert.Equal("name", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1189), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0190), exception.Message); } [Fact] @@ -408,7 +408,7 @@ namespace OpenIddict.Abstractions.Tests.Primitives // Assert Assert.Equal("name", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1189), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0190), exception.Message); } [Fact] diff --git a/test/OpenIddict.Abstractions.Tests/Primitives/OpenIddictParameterTests.cs b/test/OpenIddict.Abstractions.Tests/Primitives/OpenIddictParameterTests.cs index 2cea4bb6..5c1ef1d5 100644 --- a/test/OpenIddict.Abstractions.Tests/Primitives/OpenIddictParameterTests.cs +++ b/test/OpenIddict.Abstractions.Tests/Primitives/OpenIddictParameterTests.cs @@ -267,7 +267,7 @@ namespace OpenIddict.Abstractions.Tests.Primitives // Assert Assert.Equal("name", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1191), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0192), exception.Message); } [Fact] @@ -337,7 +337,7 @@ namespace OpenIddict.Abstractions.Tests.Primitives // Assert Assert.Equal("index", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1192), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0193), exception.Message); } [Fact] @@ -699,7 +699,7 @@ namespace OpenIddict.Abstractions.Tests.Primitives // Assert Assert.Equal("name", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1191), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0192), exception.Message); } [Fact] @@ -774,7 +774,7 @@ namespace OpenIddict.Abstractions.Tests.Primitives // Assert Assert.Equal("index", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1192), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0193), exception.Message); } [Fact] diff --git a/test/OpenIddict.Core.Tests/OpenIddictCoreBuilderTests.cs b/test/OpenIddict.Core.Tests/OpenIddictCoreBuilderTests.cs index ab369f2a..f9966977 100644 --- a/test/OpenIddict.Core.Tests/OpenIddictCoreBuilderTests.cs +++ b/test/OpenIddict.Core.Tests/OpenIddictCoreBuilderTests.cs @@ -41,7 +41,7 @@ namespace OpenIddict.Core.Tests var exception = Assert.Throws(() => builder.ReplaceApplicationManager(typeof(object))); Assert.Equal("type", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1231), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0232), exception.Message); } [Fact] @@ -99,7 +99,7 @@ namespace OpenIddict.Core.Tests var exception = Assert.Throws(() => builder.ReplaceApplicationStoreResolver(typeof(object))); Assert.Equal("type", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1231), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0232), exception.Message); } [Fact] @@ -132,7 +132,7 @@ namespace OpenIddict.Core.Tests var exception = Assert.Throws(() => builder.ReplaceAuthorizationManager(typeof(object))); Assert.Equal("type", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1231), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0232), exception.Message); } [Fact] @@ -189,7 +189,7 @@ namespace OpenIddict.Core.Tests var exception = Assert.Throws(() => builder.ReplaceAuthorizationStoreResolver(typeof(object))); Assert.Equal("type", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1231), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0232), exception.Message); } [Fact] @@ -222,7 +222,7 @@ namespace OpenIddict.Core.Tests var exception = Assert.Throws(() => builder.ReplaceScopeManager(typeof(object))); Assert.Equal("type", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1231), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0232), exception.Message); } [Fact] @@ -280,7 +280,7 @@ namespace OpenIddict.Core.Tests var exception = Assert.Throws(() => builder.ReplaceScopeStoreResolver(typeof(object))); Assert.Equal("type", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1231), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0232), exception.Message); } [Fact] @@ -313,7 +313,7 @@ namespace OpenIddict.Core.Tests var exception = Assert.Throws(() => builder.ReplaceTokenManager(typeof(object))); Assert.Equal("type", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1231), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0232), exception.Message); } [Fact] @@ -371,7 +371,7 @@ namespace OpenIddict.Core.Tests var exception = Assert.Throws(() => builder.ReplaceTokenStoreResolver(typeof(object))); Assert.Equal("type", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1231), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0232), exception.Message); } [Fact] @@ -457,7 +457,7 @@ namespace OpenIddict.Core.Tests }); Assert.Equal("type", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1231), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0232), exception.Message); } [Fact] @@ -507,7 +507,7 @@ namespace OpenIddict.Core.Tests }); Assert.Equal("type", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1231), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0232), exception.Message); } [Fact] @@ -557,7 +557,7 @@ namespace OpenIddict.Core.Tests }); Assert.Equal("type", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1231), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0232), exception.Message); } [Fact] @@ -607,7 +607,7 @@ namespace OpenIddict.Core.Tests }); Assert.Equal("type", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1231), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0232), exception.Message); } [Fact] diff --git a/test/OpenIddict.Core.Tests/OpenIddictCoreExtensionsTests.cs b/test/OpenIddict.Core.Tests/OpenIddictCoreExtensionsTests.cs index 8e5bde6c..00cc05fa 100644 --- a/test/OpenIddict.Core.Tests/OpenIddictCoreExtensionsTests.cs +++ b/test/OpenIddict.Core.Tests/OpenIddictCoreExtensionsTests.cs @@ -143,7 +143,7 @@ namespace OpenIddict.Core.Tests return provider.GetRequiredService(); }); - Assert.Equal(SR.GetResourceString(SR.ID1272), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0273), exception.Message); } [Fact] @@ -164,7 +164,7 @@ namespace OpenIddict.Core.Tests return provider.GetRequiredService(); }); - Assert.Equal(SR.GetResourceString(SR.ID1273), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0274), exception.Message); } [Fact] @@ -185,7 +185,7 @@ namespace OpenIddict.Core.Tests return provider.GetRequiredService(); }); - Assert.Equal(SR.GetResourceString(SR.ID1274), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0275), exception.Message); } [Fact] @@ -206,7 +206,7 @@ namespace OpenIddict.Core.Tests return provider.GetRequiredService(); }); - Assert.Equal(SR.GetResourceString(SR.ID1275), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0276), exception.Message); } [Fact] diff --git a/test/OpenIddict.Core.Tests/Resolvers/OpenIddictApplicationStoreResolverTests.cs b/test/OpenIddict.Core.Tests/Resolvers/OpenIddictApplicationStoreResolverTests.cs index a884e78a..44fc92f4 100644 --- a/test/OpenIddict.Core.Tests/Resolvers/OpenIddictApplicationStoreResolverTests.cs +++ b/test/OpenIddict.Core.Tests/Resolvers/OpenIddictApplicationStoreResolverTests.cs @@ -26,7 +26,7 @@ namespace OpenIddict.Core.Tests // Act and assert var exception = Assert.Throws(() => resolver.Get()); - Assert.Equal(SR.GetResourceString(SR.ID1227), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0228), exception.Message); } [Fact] diff --git a/test/OpenIddict.Core.Tests/Resolvers/OpenIddictAuthorizationStoreResolverTests.cs b/test/OpenIddict.Core.Tests/Resolvers/OpenIddictAuthorizationStoreResolverTests.cs index 5d55360e..82ed3f21 100644 --- a/test/OpenIddict.Core.Tests/Resolvers/OpenIddictAuthorizationStoreResolverTests.cs +++ b/test/OpenIddict.Core.Tests/Resolvers/OpenIddictAuthorizationStoreResolverTests.cs @@ -26,7 +26,7 @@ namespace OpenIddict.Core.Tests // Act and assert var exception = Assert.Throws(() => resolver.Get()); - Assert.Equal(SR.GetResourceString(SR.ID1228), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0229), exception.Message); } [Fact] diff --git a/test/OpenIddict.Core.Tests/Resolvers/OpenIddictScopeStoreResolverTests.cs b/test/OpenIddict.Core.Tests/Resolvers/OpenIddictScopeStoreResolverTests.cs index 00283f4d..93ad00c0 100644 --- a/test/OpenIddict.Core.Tests/Resolvers/OpenIddictScopeStoreResolverTests.cs +++ b/test/OpenIddict.Core.Tests/Resolvers/OpenIddictScopeStoreResolverTests.cs @@ -26,7 +26,7 @@ namespace OpenIddict.Core.Tests // Act and assert var exception = Assert.Throws(() => resolver.Get()); - Assert.Equal(SR.GetResourceString(SR.ID1229), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0230), exception.Message); } [Fact] diff --git a/test/OpenIddict.Core.Tests/Resolvers/OpenIddictTokenStoreResolverTests.cs b/test/OpenIddict.Core.Tests/Resolvers/OpenIddictTokenStoreResolverTests.cs index 692c529f..813917b5 100644 --- a/test/OpenIddict.Core.Tests/Resolvers/OpenIddictTokenStoreResolverTests.cs +++ b/test/OpenIddict.Core.Tests/Resolvers/OpenIddictTokenStoreResolverTests.cs @@ -26,7 +26,7 @@ namespace OpenIddict.Core.Tests // Act and assert var exception = Assert.Throws(() => resolver.Get()); - Assert.Equal(SR.GetResourceString(SR.ID1230), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0231), exception.Message); } [Fact] diff --git a/test/OpenIddict.EntityFramework.Tests/OpenIddictEntityFrameworkBuilderTests.cs b/test/OpenIddict.EntityFramework.Tests/OpenIddictEntityFrameworkBuilderTests.cs index 2f3397d0..9ad57976 100644 --- a/test/OpenIddict.EntityFramework.Tests/OpenIddictEntityFrameworkBuilderTests.cs +++ b/test/OpenIddict.EntityFramework.Tests/OpenIddictEntityFrameworkBuilderTests.cs @@ -79,7 +79,7 @@ namespace OpenIddict.EntityFramework.Tests }); Assert.Equal("type", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1231), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0232), exception.Message); } [Fact] diff --git a/test/OpenIddict.EntityFramework.Tests/Resolvers/OpenIddictEntityFrameworkApplicationStoreResolverTests.cs b/test/OpenIddict.EntityFramework.Tests/Resolvers/OpenIddictEntityFrameworkApplicationStoreResolverTests.cs index ede3f238..30399275 100644 --- a/test/OpenIddict.EntityFramework.Tests/Resolvers/OpenIddictEntityFrameworkApplicationStoreResolverTests.cs +++ b/test/OpenIddict.EntityFramework.Tests/Resolvers/OpenIddictEntityFrameworkApplicationStoreResolverTests.cs @@ -48,7 +48,7 @@ namespace OpenIddict.EntityFramework.Tests // Act and assert var exception = Assert.Throws(() => resolver.Get()); - Assert.Equal(SR.GetResourceString(SR.ID1233), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0234), exception.Message); } [Fact] @@ -69,7 +69,7 @@ namespace OpenIddict.EntityFramework.Tests // Act and assert var exception = Assert.Throws(() => resolver.Get()); - Assert.Equal(SR.GetResourceString(SR.ID1234), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0235), exception.Message); } [Fact] diff --git a/test/OpenIddict.EntityFramework.Tests/Resolvers/OpenIddictEntityFrameworkAuthorizationStoreResolverTests.cs b/test/OpenIddict.EntityFramework.Tests/Resolvers/OpenIddictEntityFrameworkAuthorizationStoreResolverTests.cs index 80dd8861..51f4c52a 100644 --- a/test/OpenIddict.EntityFramework.Tests/Resolvers/OpenIddictEntityFrameworkAuthorizationStoreResolverTests.cs +++ b/test/OpenIddict.EntityFramework.Tests/Resolvers/OpenIddictEntityFrameworkAuthorizationStoreResolverTests.cs @@ -48,7 +48,7 @@ namespace OpenIddict.EntityFramework.Tests // Act and assert var exception = Assert.Throws(() => resolver.Get()); - Assert.Equal(SR.GetResourceString(SR.ID1235), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0236), exception.Message); } [Fact] @@ -69,7 +69,7 @@ namespace OpenIddict.EntityFramework.Tests // Act and assert var exception = Assert.Throws(() => resolver.Get()); - Assert.Equal(SR.GetResourceString(SR.ID1234), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0235), exception.Message); } [Fact] diff --git a/test/OpenIddict.EntityFramework.Tests/Resolvers/OpenIddictEntityFrameworkScopeStoreResolverTests.cs b/test/OpenIddict.EntityFramework.Tests/Resolvers/OpenIddictEntityFrameworkScopeStoreResolverTests.cs index 492713df..eae12890 100644 --- a/test/OpenIddict.EntityFramework.Tests/Resolvers/OpenIddictEntityFrameworkScopeStoreResolverTests.cs +++ b/test/OpenIddict.EntityFramework.Tests/Resolvers/OpenIddictEntityFrameworkScopeStoreResolverTests.cs @@ -48,7 +48,7 @@ namespace OpenIddict.EntityFramework.Tests // Act and assert var exception = Assert.Throws(() => resolver.Get()); - Assert.Equal(SR.GetResourceString(SR.ID1236), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0237), exception.Message); } [Fact] @@ -69,7 +69,7 @@ namespace OpenIddict.EntityFramework.Tests // Act and assert var exception = Assert.Throws(() => resolver.Get()); - Assert.Equal(SR.GetResourceString(SR.ID1234), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0235), exception.Message); } [Fact] diff --git a/test/OpenIddict.EntityFramework.Tests/Resolvers/OpenIddictEntityFrameworkTokenStoreResolverTests.cs b/test/OpenIddict.EntityFramework.Tests/Resolvers/OpenIddictEntityFrameworkTokenStoreResolverTests.cs index 787da49c..89f3862f 100644 --- a/test/OpenIddict.EntityFramework.Tests/Resolvers/OpenIddictEntityFrameworkTokenStoreResolverTests.cs +++ b/test/OpenIddict.EntityFramework.Tests/Resolvers/OpenIddictEntityFrameworkTokenStoreResolverTests.cs @@ -48,7 +48,7 @@ namespace OpenIddict.EntityFramework.Tests // Act and assert var exception = Assert.Throws(() => resolver.Get()); - Assert.Equal(SR.GetResourceString(SR.ID1237), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0238), exception.Message); } [Fact] @@ -69,7 +69,7 @@ namespace OpenIddict.EntityFramework.Tests // Act and assert var exception = Assert.Throws(() => resolver.Get()); - Assert.Equal(SR.GetResourceString(SR.ID1234), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0235), exception.Message); } [Fact] diff --git a/test/OpenIddict.EntityFrameworkCore.Tests/OpenIddictEntityFrameworkCoreBuilderTests.cs b/test/OpenIddict.EntityFrameworkCore.Tests/OpenIddictEntityFrameworkCoreBuilderTests.cs index 28edf7d5..f33930d0 100644 --- a/test/OpenIddict.EntityFrameworkCore.Tests/OpenIddictEntityFrameworkCoreBuilderTests.cs +++ b/test/OpenIddict.EntityFrameworkCore.Tests/OpenIddictEntityFrameworkCoreBuilderTests.cs @@ -99,7 +99,7 @@ namespace OpenIddict.EntityFrameworkCore.Tests }); Assert.Equal("type", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1231), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0232), exception.Message); } [Fact] diff --git a/test/OpenIddict.EntityFrameworkCore.Tests/Resolvers/OpenIddictEntityFrameworkCoreApplicationStoreResolverTests.cs b/test/OpenIddict.EntityFrameworkCore.Tests/Resolvers/OpenIddictEntityFrameworkCoreApplicationStoreResolverTests.cs index 8c588336..94039a9c 100644 --- a/test/OpenIddict.EntityFrameworkCore.Tests/Resolvers/OpenIddictEntityFrameworkCoreApplicationStoreResolverTests.cs +++ b/test/OpenIddict.EntityFrameworkCore.Tests/Resolvers/OpenIddictEntityFrameworkCoreApplicationStoreResolverTests.cs @@ -48,7 +48,7 @@ namespace OpenIddict.EntityFrameworkCore.Tests // Act and assert var exception = Assert.Throws(() => resolver.Get()); - Assert.Equal(SR.GetResourceString(SR.ID1251), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0252), exception.Message); } [Fact] @@ -69,7 +69,7 @@ namespace OpenIddict.EntityFrameworkCore.Tests // Act and assert var exception = Assert.Throws(() => resolver.Get()); - Assert.Equal(SR.GetResourceString(SR.ID1252), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0253), exception.Message); } [Fact] diff --git a/test/OpenIddict.EntityFrameworkCore.Tests/Resolvers/OpenIddictEntityFrameworkCoreAuthorizationStoreResolverTests.cs b/test/OpenIddict.EntityFrameworkCore.Tests/Resolvers/OpenIddictEntityFrameworkCoreAuthorizationStoreResolverTests.cs index 74a4abc1..6a352033 100644 --- a/test/OpenIddict.EntityFrameworkCore.Tests/Resolvers/OpenIddictEntityFrameworkCoreAuthorizationStoreResolverTests.cs +++ b/test/OpenIddict.EntityFrameworkCore.Tests/Resolvers/OpenIddictEntityFrameworkCoreAuthorizationStoreResolverTests.cs @@ -48,7 +48,7 @@ namespace OpenIddict.EntityFrameworkCore.Tests // Act and assert var exception = Assert.Throws(() => resolver.Get()); - Assert.Equal(SR.GetResourceString(SR.ID1253), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0254), exception.Message); } [Fact] @@ -69,7 +69,7 @@ namespace OpenIddict.EntityFrameworkCore.Tests // Act and assert var exception = Assert.Throws(() => resolver.Get()); - Assert.Equal(SR.GetResourceString(SR.ID1252), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0253), exception.Message); } [Fact] diff --git a/test/OpenIddict.EntityFrameworkCore.Tests/Resolvers/OpenIddictEntityFrameworkCoreScopeStoreResolverTests.cs b/test/OpenIddict.EntityFrameworkCore.Tests/Resolvers/OpenIddictEntityFrameworkCoreScopeStoreResolverTests.cs index ec2e409f..62f79ca4 100644 --- a/test/OpenIddict.EntityFrameworkCore.Tests/Resolvers/OpenIddictEntityFrameworkCoreScopeStoreResolverTests.cs +++ b/test/OpenIddict.EntityFrameworkCore.Tests/Resolvers/OpenIddictEntityFrameworkCoreScopeStoreResolverTests.cs @@ -48,7 +48,7 @@ namespace OpenIddict.EntityFrameworkCore.Tests // Act and assert var exception = Assert.Throws(() => resolver.Get()); - Assert.Equal(SR.GetResourceString(SR.ID1254), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0255), exception.Message); } [Fact] @@ -69,7 +69,7 @@ namespace OpenIddict.EntityFrameworkCore.Tests // Act and assert var exception = Assert.Throws(() => resolver.Get()); - Assert.Equal(SR.GetResourceString(SR.ID1252), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0253), exception.Message); } [Fact] diff --git a/test/OpenIddict.EntityFrameworkCore.Tests/Resolvers/OpenIddictEntityFrameworkCoreTokenStoreResolverTests.cs b/test/OpenIddict.EntityFrameworkCore.Tests/Resolvers/OpenIddictEntityFrameworkCoreTokenStoreResolverTests.cs index 0529c442..9766a65d 100644 --- a/test/OpenIddict.EntityFrameworkCore.Tests/Resolvers/OpenIddictEntityFrameworkCoreTokenStoreResolverTests.cs +++ b/test/OpenIddict.EntityFrameworkCore.Tests/Resolvers/OpenIddictEntityFrameworkCoreTokenStoreResolverTests.cs @@ -48,7 +48,7 @@ namespace OpenIddict.EntityFrameworkCore.Tests // Act and assert var exception = Assert.Throws(() => resolver.Get()); - Assert.Equal(SR.GetResourceString(SR.ID1255), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0256), exception.Message); } [Fact] @@ -69,7 +69,7 @@ namespace OpenIddict.EntityFrameworkCore.Tests // Act and assert var exception = Assert.Throws(() => resolver.Get()); - Assert.Equal(SR.GetResourceString(SR.ID1252), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0253), exception.Message); } [Fact] diff --git a/test/OpenIddict.MongoDb.Tests/OpenIddictMongoDbBuilderTests.cs b/test/OpenIddict.MongoDb.Tests/OpenIddictMongoDbBuilderTests.cs index a4bd2780..67e3c9a1 100644 --- a/test/OpenIddict.MongoDb.Tests/OpenIddictMongoDbBuilderTests.cs +++ b/test/OpenIddict.MongoDb.Tests/OpenIddictMongoDbBuilderTests.cs @@ -111,7 +111,7 @@ namespace OpenIddict.MongoDb.Tests var exception = Assert.Throws(() => builder.SetApplicationsCollectionName(name)); Assert.Equal("name", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1260), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0261), exception.Message); } [Fact] @@ -144,7 +144,7 @@ namespace OpenIddict.MongoDb.Tests var exception = Assert.Throws(() => builder.SetAuthorizationsCollectionName(name)); Assert.Equal("name", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1260), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0261), exception.Message); } [Fact] @@ -177,7 +177,7 @@ namespace OpenIddict.MongoDb.Tests var exception = Assert.Throws(() => builder.SetScopesCollectionName(name)); Assert.Equal("name", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1260), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0261), exception.Message); } [Fact] @@ -210,7 +210,7 @@ namespace OpenIddict.MongoDb.Tests var exception = Assert.Throws(() => builder.SetTokensCollectionName(name)); Assert.Equal("name", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1260), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0261), exception.Message); } [Fact] diff --git a/test/OpenIddict.MongoDb.Tests/OpenIddictMongoDbContextTests.cs b/test/OpenIddict.MongoDb.Tests/OpenIddictMongoDbContextTests.cs index ce6368b6..f2b4fed8 100644 --- a/test/OpenIddict.MongoDb.Tests/OpenIddictMongoDbContextTests.cs +++ b/test/OpenIddict.MongoDb.Tests/OpenIddictMongoDbContextTests.cs @@ -82,7 +82,7 @@ namespace OpenIddict.MongoDb.Tests await context.GetDatabaseAsync(CancellationToken.None); }); - Assert.Equal(SR.GetResourceString(SR.ID1261), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0262), exception.Message); } [Fact] diff --git a/test/OpenIddict.MongoDb.Tests/Resolvers/OpenIddictMongoDbApplicationStoreResolverTests.cs b/test/OpenIddict.MongoDb.Tests/Resolvers/OpenIddictMongoDbApplicationStoreResolverTests.cs index a15a78c5..d7b8fed1 100644 --- a/test/OpenIddict.MongoDb.Tests/Resolvers/OpenIddictMongoDbApplicationStoreResolverTests.cs +++ b/test/OpenIddict.MongoDb.Tests/Resolvers/OpenIddictMongoDbApplicationStoreResolverTests.cs @@ -43,7 +43,7 @@ namespace OpenIddict.MongoDb.Tests // Act and assert var exception = Assert.Throws(() => resolver.Get()); - Assert.Equal(SR.GetResourceString(SR.ID1256), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0257), exception.Message); } [Fact] diff --git a/test/OpenIddict.MongoDb.Tests/Resolvers/OpenIddictMongoDbAuthorizationStoreResolverTests.cs b/test/OpenIddict.MongoDb.Tests/Resolvers/OpenIddictMongoDbAuthorizationStoreResolverTests.cs index d6886310..67a328f0 100644 --- a/test/OpenIddict.MongoDb.Tests/Resolvers/OpenIddictMongoDbAuthorizationStoreResolverTests.cs +++ b/test/OpenIddict.MongoDb.Tests/Resolvers/OpenIddictMongoDbAuthorizationStoreResolverTests.cs @@ -43,7 +43,7 @@ namespace OpenIddict.MongoDb.Tests // Act and assert var exception = Assert.Throws(() => resolver.Get()); - Assert.Equal(SR.GetResourceString(SR.ID1257), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0258), exception.Message); } [Fact] diff --git a/test/OpenIddict.MongoDb.Tests/Resolvers/OpenIddictMongoDbScopeStoreResolverTests.cs b/test/OpenIddict.MongoDb.Tests/Resolvers/OpenIddictMongoDbScopeStoreResolverTests.cs index 5d652239..2ade7ccc 100644 --- a/test/OpenIddict.MongoDb.Tests/Resolvers/OpenIddictMongoDbScopeStoreResolverTests.cs +++ b/test/OpenIddict.MongoDb.Tests/Resolvers/OpenIddictMongoDbScopeStoreResolverTests.cs @@ -43,7 +43,7 @@ namespace OpenIddict.MongoDb.Tests // Act and assert var exception = Assert.Throws(() => resolver.Get()); - Assert.Equal(SR.GetResourceString(SR.ID1258), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0259), exception.Message); } [Fact] diff --git a/test/OpenIddict.MongoDb.Tests/Resolvers/OpenIddictMongoDbTokenStoreResolverTests.cs b/test/OpenIddict.MongoDb.Tests/Resolvers/OpenIddictMongoDbTokenStoreResolverTests.cs index 585378c2..926c350d 100644 --- a/test/OpenIddict.MongoDb.Tests/Resolvers/OpenIddictMongoDbTokenStoreResolverTests.cs +++ b/test/OpenIddict.MongoDb.Tests/Resolvers/OpenIddictMongoDbTokenStoreResolverTests.cs @@ -43,7 +43,7 @@ namespace OpenIddict.MongoDb.Tests // Act and assert var exception = Assert.Throws(() => resolver.Get()); - Assert.Equal(SR.GetResourceString(SR.ID1259), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0260), exception.Message); } [Fact] diff --git a/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddictServerAspNetCoreIntegrationTests.Authentication.cs b/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddictServerAspNetCoreIntegrationTests.Authentication.cs index ba600fe2..dc8a9216 100644 --- a/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddictServerAspNetCoreIntegrationTests.Authentication.cs +++ b/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddictServerAspNetCoreIntegrationTests.Authentication.cs @@ -31,7 +31,7 @@ namespace OpenIddict.Server.AspNetCore.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3028(Parameters.RequestId), response.ErrorDescription); + Assert.Equal(SR.FormatID2028(Parameters.RequestId), response.ErrorDescription); } [Fact] @@ -56,7 +56,7 @@ namespace OpenIddict.Server.AspNetCore.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3052(Parameters.RequestId), response.ErrorDescription); + Assert.Equal(SR.FormatID2052(Parameters.RequestId), response.ErrorDescription); } } } diff --git a/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddictServerAspNetCoreIntegrationTests.Exchange.cs b/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddictServerAspNetCoreIntegrationTests.Exchange.cs index c06ee7b0..8c7438cf 100644 --- a/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddictServerAspNetCoreIntegrationTests.Exchange.cs +++ b/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddictServerAspNetCoreIntegrationTests.Exchange.cs @@ -54,7 +54,7 @@ namespace OpenIddict.Server.AspNetCore.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3087), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2087), response.ErrorDescription); } } } diff --git a/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddictServerAspNetCoreIntegrationTests.Introspection.cs b/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddictServerAspNetCoreIntegrationTests.Introspection.cs index 6c1081c3..e243b12d 100644 --- a/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddictServerAspNetCoreIntegrationTests.Introspection.cs +++ b/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddictServerAspNetCoreIntegrationTests.Introspection.cs @@ -52,7 +52,7 @@ namespace OpenIddict.Server.AspNetCore.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3087), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2087), response.ErrorDescription); } } } diff --git a/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddictServerAspNetCoreIntegrationTests.Revocation.cs b/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddictServerAspNetCoreIntegrationTests.Revocation.cs index df51b3c4..7f56270c 100644 --- a/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddictServerAspNetCoreIntegrationTests.Revocation.cs +++ b/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddictServerAspNetCoreIntegrationTests.Revocation.cs @@ -52,7 +52,7 @@ namespace OpenIddict.Server.AspNetCore.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3087), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2087), response.ErrorDescription); } } } diff --git a/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddictServerAspNetCoreIntegrationTests.Session.cs b/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddictServerAspNetCoreIntegrationTests.Session.cs index 4e301304..3e874d81 100644 --- a/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddictServerAspNetCoreIntegrationTests.Session.cs +++ b/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddictServerAspNetCoreIntegrationTests.Session.cs @@ -31,7 +31,7 @@ namespace OpenIddict.Server.AspNetCore.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3028(Parameters.RequestId), response.ErrorDescription); + Assert.Equal(SR.FormatID2028(Parameters.RequestId), response.ErrorDescription); } [Fact] @@ -56,7 +56,7 @@ namespace OpenIddict.Server.AspNetCore.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3052(Parameters.RequestId), response.ErrorDescription); + Assert.Equal(SR.FormatID2052(Parameters.RequestId), response.ErrorDescription); } } } diff --git a/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddictServerAspNetCoreIntegrationTests.cs b/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddictServerAspNetCoreIntegrationTests.cs index 03c80382..beb9a5f7 100644 --- a/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddictServerAspNetCoreIntegrationTests.cs +++ b/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddictServerAspNetCoreIntegrationTests.cs @@ -288,7 +288,7 @@ namespace OpenIddict.Server.AspNetCore.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3083), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2083), response.ErrorDescription); } [Theory] diff --git a/test/OpenIddict.Server.IntegrationTests/OpenIddictServerIntegrationTests.Authentication.cs b/test/OpenIddict.Server.IntegrationTests/OpenIddictServerIntegrationTests.Authentication.cs index 5b4d3c0b..eb07f947 100644 --- a/test/OpenIddict.Server.IntegrationTests/OpenIddictServerIntegrationTests.Authentication.cs +++ b/test/OpenIddict.Server.IntegrationTests/OpenIddictServerIntegrationTests.Authentication.cs @@ -40,7 +40,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3084), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2084), response.ErrorDescription); } [Fact] @@ -64,7 +64,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.RequestNotSupported, response.Error); - Assert.Equal(SR.FormatID3028(Parameters.Request), response.ErrorDescription); + Assert.Equal(SR.FormatID2028(Parameters.Request), response.ErrorDescription); } [Fact] @@ -86,7 +86,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.RequestUriNotSupported, response.Error); - Assert.Equal(SR.FormatID3028(Parameters.RequestUri), response.ErrorDescription); + Assert.Equal(SR.FormatID2028(Parameters.RequestUri), response.ErrorDescription); } [Theory] @@ -196,7 +196,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3029(Parameters.ClientId), response.ErrorDescription); + Assert.Equal(SR.FormatID2029(Parameters.ClientId), response.ErrorDescription); } [Fact] @@ -216,14 +216,14 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3029(Parameters.RedirectUri), response.ErrorDescription); + Assert.Equal(SR.FormatID2029(Parameters.RedirectUri), response.ErrorDescription); } [Theory] - [InlineData("/path", SR.ID3030)] - [InlineData("/tmp/file.xml", SR.ID3030)] - [InlineData("C:\\tmp\\file.xml", SR.ID3030)] - [InlineData("http://www.fabrikam.com/path#param=value", SR.ID3031)] + [InlineData("/path", SR.ID2030)] + [InlineData("/tmp/file.xml", SR.ID2030)] + [InlineData("C:\\tmp\\file.xml", SR.ID2030)] + [InlineData("http://www.fabrikam.com/path#param=value", SR.ID2031)] public async Task ValidateAuthorizationRequest_InvalidRedirectUriCausesAnError(string address, string message) { // Arrange @@ -261,7 +261,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3029(Parameters.ResponseType), response.ErrorDescription); + Assert.Equal(SR.FormatID2029(Parameters.ResponseType), response.ErrorDescription); } [Theory] @@ -289,7 +289,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3033(Parameters.ResponseType, Parameters.ResponseMode), response.ErrorDescription); + Assert.Equal(SR.FormatID2033(Parameters.ResponseType, Parameters.ResponseMode), response.ErrorDescription); } [Theory] @@ -316,7 +316,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3029(Parameters.Nonce), response.ErrorDescription); + Assert.Equal(SR.FormatID2029(Parameters.Nonce), response.ErrorDescription); } [Theory] @@ -340,7 +340,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3034(Scopes.OpenId), response.ErrorDescription); + Assert.Equal(SR.FormatID2034(Scopes.OpenId), response.ErrorDescription); } [Theory] @@ -366,7 +366,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3052(Parameters.Prompt), response.ErrorDescription); + Assert.Equal(SR.FormatID2052(Parameters.Prompt), response.ErrorDescription); } [Theory] @@ -440,7 +440,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3040(Parameters.CodeChallenge, Parameters.CodeChallengeMethod, ResponseTypes.Code), response.ErrorDescription); + Assert.Equal(SR.FormatID2040(Parameters.CodeChallenge, Parameters.CodeChallengeMethod, ResponseTypes.Code), response.ErrorDescription); } [Fact] @@ -462,7 +462,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3037(Parameters.CodeChallengeMethod, Parameters.CodeChallenge), response.ErrorDescription); + Assert.Equal(SR.FormatID2037(Parameters.CodeChallengeMethod, Parameters.CodeChallenge), response.ErrorDescription); } [Fact] @@ -485,7 +485,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3032(Parameters.CodeChallengeMethod), response.ErrorDescription); + Assert.Equal(SR.FormatID2032(Parameters.CodeChallengeMethod), response.ErrorDescription); } [Fact] @@ -505,7 +505,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.UnsupportedResponseType, response.Error); - Assert.Equal(SR.FormatID3032(Parameters.ResponseType), response.ErrorDescription); + Assert.Equal(SR.FormatID2032(Parameters.ResponseType), response.ErrorDescription); } [Fact] @@ -525,7 +525,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.UnsupportedResponseType, response.Error); - Assert.Equal(SR.FormatID3032(Parameters.ResponseType), response.ErrorDescription); + Assert.Equal(SR.FormatID2032(Parameters.ResponseType), response.ErrorDescription); } [Theory] @@ -561,7 +561,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.UnsupportedResponseType, response.Error); - Assert.Equal(SR.FormatID3032(Parameters.ResponseType), response.ErrorDescription); + Assert.Equal(SR.FormatID2032(Parameters.ResponseType), response.ErrorDescription); } [Fact] @@ -606,7 +606,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidScope, response.Error); - Assert.Equal(SR.FormatID3052(Parameters.Scope), response.ErrorDescription); + Assert.Equal(SR.FormatID2052(Parameters.Scope), response.ErrorDescription); } [Fact] @@ -736,7 +736,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3035(Scopes.OfflineAccess), response.ErrorDescription); + Assert.Equal(SR.FormatID2035(Scopes.OfflineAccess), response.ErrorDescription); } [Fact] @@ -757,7 +757,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3032(Parameters.ResponseMode), response.ErrorDescription); + Assert.Equal(SR.FormatID2032(Parameters.ResponseMode), response.ErrorDescription); } [Fact] @@ -779,7 +779,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3029(Parameters.CodeChallengeMethod), response.ErrorDescription); + Assert.Equal(SR.FormatID2029(Parameters.CodeChallengeMethod), response.ErrorDescription); } [Fact] @@ -807,7 +807,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3032(Parameters.CodeChallengeMethod), response.ErrorDescription); + Assert.Equal(SR.FormatID2032(Parameters.CodeChallengeMethod), response.ErrorDescription); } [Fact] @@ -829,7 +829,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3032(Parameters.CodeChallengeMethod), response.ErrorDescription); + Assert.Equal(SR.FormatID2032(Parameters.CodeChallengeMethod), response.ErrorDescription); } [Theory] @@ -897,7 +897,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3041(Parameters.ResponseType), response.ErrorDescription); + Assert.Equal(SR.FormatID2041(Parameters.ResponseType), response.ErrorDescription); } [Fact] @@ -918,7 +918,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3029(Parameters.RedirectUri), response.ErrorDescription); + Assert.Equal(SR.FormatID2029(Parameters.RedirectUri), response.ErrorDescription); } [Fact] @@ -940,7 +940,7 @@ namespace OpenIddict.Server.IntegrationTests }); // Assert - Assert.Equal(SR.GetResourceString(SR.ID1027), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0028), exception.Message); } [Fact] @@ -974,7 +974,7 @@ namespace OpenIddict.Server.IntegrationTests }); // Assert - Assert.Equal(SR.GetResourceString(SR.ID1100), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0101), exception.Message); } [Fact] @@ -1004,7 +1004,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3052(Parameters.ClientId), response.ErrorDescription); + Assert.Equal(SR.FormatID2052(Parameters.ClientId), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByClientIdAsync("Fabrikam", It.IsAny()), Times.AtLeastOnce()); } @@ -1047,7 +1047,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.UnauthorizedClient, response.Error); - Assert.Equal(SR.FormatID3043(Parameters.ResponseType), response.ErrorDescription); + Assert.Equal(SR.FormatID2043(Parameters.ResponseType), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByClientIdAsync("Fabrikam", It.IsAny()), Times.AtLeastOnce()); Mock.Get(manager).Verify(manager => manager.HasClientTypeAsync(application, ClientTypes.Confidential, It.IsAny()), Times.Once()); @@ -1091,7 +1091,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.UnauthorizedClient, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3046), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2046), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByClientIdAsync("Fabrikam", It.IsAny()), Times.AtLeastOnce()); Mock.Get(manager).Verify(manager => manager.HasPermissionAsync(application, @@ -1102,31 +1102,31 @@ namespace OpenIddict.Server.IntegrationTests [InlineData( "code", new[] { Permissions.GrantTypes.AuthorizationCode }, - SR.ID3047)] + SR.ID2047)] [InlineData( "code id_token", new[] { Permissions.GrantTypes.AuthorizationCode, Permissions.GrantTypes.Implicit }, - SR.ID3049)] + SR.ID2049)] [InlineData( "code id_token token", new[] { Permissions.GrantTypes.AuthorizationCode, Permissions.GrantTypes.Implicit }, - SR.ID3049)] + SR.ID2049)] [InlineData( "code token", new[] { Permissions.GrantTypes.AuthorizationCode, Permissions.GrantTypes.Implicit }, - SR.ID3049)] + SR.ID2049)] [InlineData( "id_token", new[] { Permissions.GrantTypes.Implicit }, - SR.ID3048)] + SR.ID2048)] [InlineData( "id_token token", new[] { Permissions.GrantTypes.Implicit }, - SR.ID3048)] + SR.ID2048)] [InlineData( "token", new[] { Permissions.GrantTypes.Implicit }, - SR.ID3048)] + SR.ID2048)] public async Task ValidateAuthorizationRequest_RequestIsRejectedWhenGrantTypePermissionIsNotGranted( string type, string[] permissions, string description) { @@ -1218,7 +1218,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3065(Scopes.OfflineAccess), response.ErrorDescription); + Assert.Equal(SR.FormatID2065(Scopes.OfflineAccess), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.HasPermissionAsync(application, Permissions.GrantTypes.RefreshToken, It.IsAny()), Times.Once()); @@ -1256,7 +1256,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3043(Parameters.RedirectUri), response.ErrorDescription); + Assert.Equal(SR.FormatID2043(Parameters.RedirectUri), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByClientIdAsync("Fabrikam", It.IsAny()), Times.AtLeastOnce()); Mock.Get(manager).Verify(manager => manager.ValidateRedirectUriAsync(application, "http://www.fabrikam.com/path", It.IsAny()), Times.Once()); @@ -1305,7 +1305,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3051), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2051), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.HasPermissionAsync(application, Permissions.Prefixes.Scope + Scopes.OpenId, It.IsAny()), Times.Never()); @@ -1355,7 +1355,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3054(Parameters.CodeChallenge), response.ErrorDescription); + Assert.Equal(SR.FormatID2054(Parameters.CodeChallenge), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByClientIdAsync("Fabrikam", It.IsAny()), Times.AtLeastOnce()); Mock.Get(manager).Verify(manager => manager.HasRequirementAsync(application, @@ -1869,7 +1869,7 @@ namespace OpenIddict.Server.IntegrationTests return client.SendAsync(HttpMethod.Put, "/connect/authorize", new OpenIddictRequest()); }); - Assert.Equal(SR.GetResourceString(SR.ID1029), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0030), exception.Message); } [Fact] @@ -2023,7 +2023,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3032(Parameters.ResponseMode), response.ErrorDescription); + Assert.Equal(SR.FormatID2032(Parameters.ResponseMode), response.ErrorDescription); } } } diff --git a/test/OpenIddict.Server.IntegrationTests/OpenIddictServerIntegrationTests.Discovery.cs b/test/OpenIddict.Server.IntegrationTests/OpenIddictServerIntegrationTests.Discovery.cs index b999adec..6427c562 100644 --- a/test/OpenIddict.Server.IntegrationTests/OpenIddictServerIntegrationTests.Discovery.cs +++ b/test/OpenIddict.Server.IntegrationTests/OpenIddictServerIntegrationTests.Discovery.cs @@ -40,7 +40,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3084), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2084), response.ErrorDescription); } [Theory] @@ -1015,7 +1015,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3084), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2084), response.ErrorDescription); } [Theory] diff --git a/test/OpenIddict.Server.IntegrationTests/OpenIddictServerIntegrationTests.Exchange.cs b/test/OpenIddict.Server.IntegrationTests/OpenIddictServerIntegrationTests.Exchange.cs index d5905f8e..c522f6eb 100644 --- a/test/OpenIddict.Server.IntegrationTests/OpenIddictServerIntegrationTests.Exchange.cs +++ b/test/OpenIddict.Server.IntegrationTests/OpenIddictServerIntegrationTests.Exchange.cs @@ -42,7 +42,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3084), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2084), response.ErrorDescription); } [Theory] @@ -152,7 +152,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3029(Parameters.GrantType), response.ErrorDescription); + Assert.Equal(SR.FormatID2029(Parameters.GrantType), response.ErrorDescription); } [Fact] @@ -172,7 +172,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidClient, response.Error); - Assert.Equal(SR.FormatID3029(Parameters.ClientId), response.ErrorDescription); + Assert.Equal(SR.FormatID2029(Parameters.ClientId), response.ErrorDescription); } [Fact] @@ -192,7 +192,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3029(Parameters.Code), response.ErrorDescription); + Assert.Equal(SR.FormatID2029(Parameters.Code), response.ErrorDescription); } [Fact] @@ -211,7 +211,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3029(Parameters.RefreshToken), response.ErrorDescription); + Assert.Equal(SR.FormatID2029(Parameters.RefreshToken), response.ErrorDescription); } [Theory] @@ -234,7 +234,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3057(Parameters.ClientId, Parameters.ClientSecret), response.ErrorDescription); + Assert.Equal(SR.FormatID2057(Parameters.ClientId, Parameters.ClientSecret), response.ErrorDescription); } [Theory] @@ -257,7 +257,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3059(Parameters.Username, Parameters.Password), response.ErrorDescription); + Assert.Equal(SR.FormatID2059(Parameters.Username, Parameters.Password), response.ErrorDescription); } [Fact] @@ -277,7 +277,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidGrant, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3001), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2001), response.ErrorDescription); } [Fact] @@ -296,7 +296,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidGrant, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3003), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2003), response.ErrorDescription); } [Fact] @@ -338,7 +338,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidGrant, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3016), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2016), response.ErrorDescription); } [Fact] @@ -379,7 +379,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidGrant, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3018), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2018), response.ErrorDescription); } [Fact] @@ -422,7 +422,7 @@ namespace OpenIddict.Server.IntegrationTests }); }); - Assert.Equal(SR.GetResourceString(SR.ID1042), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0043), exception.Message); } [Fact] @@ -464,7 +464,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidGrant, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3069), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2069), response.ErrorDescription); } [Fact] @@ -506,7 +506,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidGrant, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3071), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2071), response.ErrorDescription); } [Fact] @@ -550,7 +550,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3029(Parameters.RedirectUri), response.ErrorDescription); + Assert.Equal(SR.FormatID2029(Parameters.RedirectUri), response.ErrorDescription); } [Fact] @@ -594,7 +594,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidGrant, response.Error); - Assert.Equal(SR.FormatID3072(Parameters.RedirectUri), response.ErrorDescription); + Assert.Equal(SR.FormatID2072(Parameters.RedirectUri), response.ErrorDescription); } [Fact] @@ -637,7 +637,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3073(Parameters.CodeVerifier, Parameters.CodeChallenge), response.ErrorDescription); + Assert.Equal(SR.FormatID2073(Parameters.CodeVerifier, Parameters.CodeChallenge), response.ErrorDescription); } [Fact] @@ -682,7 +682,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3029(Parameters.CodeVerifier), response.ErrorDescription); + Assert.Equal(SR.FormatID2029(Parameters.CodeVerifier), response.ErrorDescription); } [Fact] @@ -728,7 +728,7 @@ namespace OpenIddict.Server.IntegrationTests }); }); - Assert.Equal(SR.GetResourceString(SR.ID1267), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0268), exception.Message); } [Fact] @@ -774,7 +774,7 @@ namespace OpenIddict.Server.IntegrationTests }); }); - Assert.Equal(SR.GetResourceString(SR.ID1044), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0045), exception.Message); } [Theory] @@ -821,7 +821,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidGrant, response.Error); - Assert.Equal(SR.FormatID3052(Parameters.CodeVerifier), response.ErrorDescription); + Assert.Equal(SR.FormatID2052(Parameters.CodeVerifier), response.ErrorDescription); } [Theory] @@ -921,7 +921,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidGrant, response.Error); - Assert.Equal(SR.FormatID3074(Parameters.Scope), response.ErrorDescription); + Assert.Equal(SR.FormatID2074(Parameters.Scope), response.ErrorDescription); } [Fact] @@ -966,7 +966,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidGrant, response.Error); - Assert.Equal(SR.FormatID3052(Parameters.Scope), response.ErrorDescription); + Assert.Equal(SR.FormatID2052(Parameters.Scope), response.ErrorDescription); } [Fact] @@ -1009,7 +1009,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidGrant, response.Error); - Assert.Equal(SR.FormatID3074(Parameters.Scope), response.ErrorDescription); + Assert.Equal(SR.FormatID2074(Parameters.Scope), response.ErrorDescription); } [Fact] @@ -1052,7 +1052,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidGrant, response.Error); - Assert.Equal(SR.FormatID3052(Parameters.Scope), response.ErrorDescription); + Assert.Equal(SR.FormatID2052(Parameters.Scope), response.ErrorDescription); } [Theory] @@ -1084,7 +1084,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.UnsupportedGrantType, response.Error); - Assert.Equal(SR.FormatID3032(Parameters.GrantType), response.ErrorDescription); + Assert.Equal(SR.FormatID2032(Parameters.GrantType), response.ErrorDescription); } [Fact] @@ -1111,7 +1111,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3035(Scopes.OfflineAccess), response.ErrorDescription); + Assert.Equal(SR.FormatID2035(Scopes.OfflineAccess), response.ErrorDescription); } [Fact] @@ -1142,7 +1142,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidScope, response.Error); - Assert.Equal(SR.FormatID3052(Parameters.Scope), response.ErrorDescription); + Assert.Equal(SR.FormatID2052(Parameters.Scope), response.ErrorDescription); } [Fact] @@ -1255,7 +1255,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3057(Parameters.ClientId, Parameters.ClientSecret), response.ErrorDescription); + Assert.Equal(SR.FormatID2057(Parameters.ClientId, Parameters.ClientSecret), response.ErrorDescription); } [Fact] @@ -1281,7 +1281,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidClient, response.Error); - Assert.Equal(SR.FormatID3029(Parameters.ClientId), response.ErrorDescription); + Assert.Equal(SR.FormatID2029(Parameters.ClientId), response.ErrorDescription); } [Fact] @@ -1312,7 +1312,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidClient, response.Error); - Assert.Equal(SR.FormatID3052(Parameters.ClientId), response.ErrorDescription); + Assert.Equal(SR.FormatID2052(Parameters.ClientId), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByClientIdAsync("Fabrikam", It.IsAny()), Times.AtLeastOnce()); } @@ -1349,7 +1349,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.UnauthorizedClient, response.Error); - Assert.Equal(SR.FormatID3043(Parameters.GrantType), response.ErrorDescription); + Assert.Equal(SR.FormatID2043(Parameters.GrantType), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByClientIdAsync("Fabrikam", It.IsAny()), Times.AtLeastOnce()); Mock.Get(manager).Verify(manager => manager.HasClientTypeAsync(application, ClientTypes.Public, It.IsAny()), Times.Once()); @@ -1389,7 +1389,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidClient, response.Error); - Assert.Equal(SR.FormatID3053(Parameters.ClientSecret), response.ErrorDescription); + Assert.Equal(SR.FormatID2053(Parameters.ClientSecret), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByClientIdAsync("Fabrikam", It.IsAny()), Times.AtLeastOnce()); Mock.Get(manager).Verify(manager => manager.HasClientTypeAsync(application, ClientTypes.Public, It.IsAny()), Times.Once()); @@ -1429,7 +1429,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidClient, response.Error); - Assert.Equal(SR.FormatID3054(Parameters.ClientSecret), response.ErrorDescription); + Assert.Equal(SR.FormatID2054(Parameters.ClientSecret), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByClientIdAsync("Fabrikam", It.IsAny()), Times.AtLeastOnce()); Mock.Get(manager).Verify(manager => manager.HasClientTypeAsync(application, ClientTypes.Public, It.IsAny()), Times.Once()); @@ -1472,7 +1472,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidClient, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3055), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2055), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByClientIdAsync("Fabrikam", It.IsAny()), Times.AtLeastOnce()); Mock.Get(manager).Verify(manager => manager.HasClientTypeAsync(application, ClientTypes.Public, It.IsAny()), Times.AtLeastOnce()); @@ -1518,7 +1518,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.UnauthorizedClient, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3063), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2063), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByClientIdAsync("Fabrikam", It.IsAny()), Times.AtLeastOnce()); Mock.Get(manager).Verify(manager => manager.HasPermissionAsync(application, @@ -1564,7 +1564,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.UnauthorizedClient, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3064), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2064), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByClientIdAsync("Fabrikam", It.IsAny()), Times.AtLeastOnce()); Mock.Get(manager).Verify(manager => manager.HasPermissionAsync(application, @@ -1615,7 +1615,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3065(Scopes.OfflineAccess), response.ErrorDescription); + Assert.Equal(SR.FormatID2065(Scopes.OfflineAccess), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.HasPermissionAsync(application, Permissions.GrantTypes.RefreshToken, It.IsAny()), Times.Once()); @@ -1666,7 +1666,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3051), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2051), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.HasPermissionAsync(application, Permissions.Prefixes.Scope + Scopes.OpenId, It.IsAny()), Times.Never()); @@ -1716,7 +1716,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3054(Parameters.CodeVerifier), response.ErrorDescription); + Assert.Equal(SR.FormatID2054(Parameters.CodeVerifier), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.HasRequirementAsync(application, Requirements.Features.ProofKeyForCodeExchange, It.IsAny()), Times.Once()); @@ -2145,7 +2145,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidGrant, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3001), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2001), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByIdAsync("3E228451-1555-46F7-A471-951EFBA23A56", It.IsAny()), Times.AtLeastOnce()); } @@ -2204,7 +2204,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidGrant, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3003), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2003), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByIdAsync("60FFF7EA-F98E-437B-937E-5073CC313103", It.IsAny()), Times.AtLeastOnce()); } @@ -2284,7 +2284,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidGrant, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3010), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2010), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByIdAsync("3E228451-1555-46F7-A471-951EFBA23A56", It.IsAny()), Times.AtLeastOnce()); Mock.Get(manager).Verify(manager => manager.HasStatusAsync(token, Statuses.Redeemed, It.IsAny()), Times.Once()); @@ -2351,7 +2351,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidGrant, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3012), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2012), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByIdAsync("60FFF7EA-F98E-437B-937E-5073CC313103", It.IsAny()), Times.AtLeastOnce()); Mock.Get(manager).Verify(manager => manager.HasStatusAsync(token, Statuses.Redeemed, It.IsAny()), Times.Once()); @@ -2448,7 +2448,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidGrant, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3010), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2010), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByIdAsync("3E228451-1555-46F7-A471-951EFBA23A56", It.IsAny()), Times.AtLeastOnce()); Mock.Get(manager).Verify(manager => manager.HasStatusAsync(tokens[0], Statuses.Redeemed, It.IsAny()), Times.Once()); @@ -2535,7 +2535,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidGrant, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3012), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2012), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByIdAsync("60FFF7EA-F98E-437B-937E-5073CC313103", It.IsAny()), Times.AtLeastOnce()); Mock.Get(manager).Verify(manager => manager.HasStatusAsync(tokens[0], Statuses.Redeemed, It.IsAny()), Times.Once()); @@ -2623,7 +2623,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidGrant, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3016), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2016), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByIdAsync("3E228451-1555-46F7-A471-951EFBA23A56", It.IsAny()), Times.AtLeastOnce()); Mock.Get(manager).Verify(manager => manager.HasStatusAsync(token, Statuses.Redeemed, It.IsAny()), Times.Once()); @@ -2696,7 +2696,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidGrant, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3018), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2018), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByIdAsync("60FFF7EA-F98E-437B-937E-5073CC313103", It.IsAny()), Times.AtLeastOnce()); Mock.Get(manager).Verify(manager => manager.HasStatusAsync(token, Statuses.Valid, It.IsAny()), Times.Once()); @@ -2975,7 +2975,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidGrant, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3020), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2020), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByIdAsync("18D15F73-BE2B-6867-DC01-B3C1E8AFDED0", It.IsAny()), Times.Once()); } @@ -3073,7 +3073,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidGrant, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3020), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2020), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByIdAsync("18D15F73-BE2B-6867-DC01-B3C1E8AFDED0", It.IsAny()), Times.Once()); Mock.Get(manager).Verify(manager => manager.HasStatusAsync(authorization, Statuses.Valid, It.IsAny()), Times.Once()); @@ -3153,7 +3153,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidGrant, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3022), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2022), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByIdAsync("18D15F73-BE2B-6867-DC01-B3C1E8AFDED0", It.IsAny()), Times.Once()); } @@ -3237,7 +3237,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidGrant, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3022), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2022), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByIdAsync("18D15F73-BE2B-6867-DC01-B3C1E8AFDED0", It.IsAny()), Times.Once()); Mock.Get(manager).Verify(manager => manager.HasStatusAsync(authorization, Statuses.Valid, It.IsAny()), Times.Once()); diff --git a/test/OpenIddict.Server.IntegrationTests/OpenIddictServerIntegrationTests.Introspection.cs b/test/OpenIddict.Server.IntegrationTests/OpenIddictServerIntegrationTests.Introspection.cs index a95f39be..3fa6f803 100644 --- a/test/OpenIddict.Server.IntegrationTests/OpenIddictServerIntegrationTests.Introspection.cs +++ b/test/OpenIddict.Server.IntegrationTests/OpenIddictServerIntegrationTests.Introspection.cs @@ -42,7 +42,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3084), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2084), response.ErrorDescription); } [Theory] @@ -152,7 +152,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3029(Parameters.Token), response.ErrorDescription); + Assert.Equal(SR.FormatID2029(Parameters.Token), response.ErrorDescription); } [Fact] @@ -176,7 +176,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidToken, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3004), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2004), response.ErrorDescription); } [Fact] @@ -217,7 +217,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidToken, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3019), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2019), response.ErrorDescription); } [Theory] @@ -262,7 +262,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.UnsupportedTokenType, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3076), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2076), response.ErrorDescription); } [Fact] @@ -305,7 +305,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidToken, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3077), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2077), response.ErrorDescription); } [Fact] @@ -347,7 +347,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidToken, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3077), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2077), response.ErrorDescription); } [Fact] @@ -369,7 +369,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidClient, response.Error); - Assert.Equal(SR.FormatID3029(Parameters.ClientId), response.ErrorDescription); + Assert.Equal(SR.FormatID2029(Parameters.ClientId), response.ErrorDescription); } [Fact] @@ -399,7 +399,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidClient, response.Error); - Assert.Equal(SR.FormatID3052(Parameters.ClientId), response.ErrorDescription); + Assert.Equal(SR.FormatID2052(Parameters.ClientId), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByClientIdAsync("Fabrikam", It.IsAny()), Times.Once()); } @@ -441,7 +441,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.UnauthorizedClient, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3075), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2075), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByClientIdAsync("Fabrikam", It.IsAny()), Times.AtLeastOnce()); Mock.Get(manager).Verify(manager => manager.HasPermissionAsync(application, @@ -480,7 +480,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidClient, response.Error); - Assert.Equal(SR.FormatID3053(Parameters.ClientSecret), response.ErrorDescription); + Assert.Equal(SR.FormatID2053(Parameters.ClientSecret), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByClientIdAsync("Fabrikam", It.IsAny()), Times.AtLeastOnce()); Mock.Get(manager).Verify(manager => manager.HasClientTypeAsync(application, ClientTypes.Public, It.IsAny()), Times.Once()); @@ -518,7 +518,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidClient, response.Error); - Assert.Equal(SR.FormatID3054(Parameters.ClientSecret), response.ErrorDescription); + Assert.Equal(SR.FormatID2054(Parameters.ClientSecret), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByClientIdAsync("Fabrikam", It.IsAny()), Times.AtLeastOnce()); Mock.Get(manager).Verify(manager => manager.HasClientTypeAsync(application, ClientTypes.Public, It.IsAny()), Times.Once()); @@ -1068,7 +1068,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidToken, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3004), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2004), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByReferenceIdAsync("QaTk2f6UPe9trKismGBJr0OIs0KqpvNrqRsJqGuJAAI", It.IsAny()), Times.AtLeastOnce()); } @@ -1253,7 +1253,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidToken, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3023), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2023), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByIdAsync("18D15F73-BE2B-6867-DC01-B3C1E8AFDED0", It.IsAny()), Times.Once()); } @@ -1351,7 +1351,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidToken, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3023), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2023), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByIdAsync("18D15F73-BE2B-6867-DC01-B3C1E8AFDED0", It.IsAny()), Times.Once()); Mock.Get(manager).Verify(manager => manager.HasStatusAsync(authorization, Statuses.Valid, It.IsAny()), Times.Once()); @@ -1436,7 +1436,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidToken, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3019), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2019), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByReferenceIdAsync("QaTk2f6UPe9trKismGBJr0OIs0KqpvNrqRsJqGuJAAI", It.IsAny()), Times.Once()); Mock.Get(manager).Verify(manager => manager.HasStatusAsync(token, Statuses.Valid, It.IsAny()), Times.Once()); diff --git a/test/OpenIddict.Server.IntegrationTests/OpenIddictServerIntegrationTests.Revocation.cs b/test/OpenIddict.Server.IntegrationTests/OpenIddictServerIntegrationTests.Revocation.cs index 62d91eb9..c39e78bc 100644 --- a/test/OpenIddict.Server.IntegrationTests/OpenIddictServerIntegrationTests.Revocation.cs +++ b/test/OpenIddict.Server.IntegrationTests/OpenIddictServerIntegrationTests.Revocation.cs @@ -40,7 +40,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3084), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2084), response.ErrorDescription); } [Theory] @@ -150,7 +150,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3029(Parameters.Token), response.ErrorDescription); + Assert.Equal(SR.FormatID2029(Parameters.Token), response.ErrorDescription); } [Theory] @@ -195,7 +195,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.UnsupportedTokenType, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3079), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2079), response.ErrorDescription); } [Fact] @@ -238,7 +238,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidToken, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3080), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2080), response.ErrorDescription); } [Fact] @@ -280,7 +280,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidToken, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3080), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2080), response.ErrorDescription); } [Fact] @@ -303,7 +303,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidClient, response.Error); - Assert.Equal(SR.FormatID3029(Parameters.ClientId), response.ErrorDescription); + Assert.Equal(SR.FormatID2029(Parameters.ClientId), response.ErrorDescription); } [Fact] @@ -333,7 +333,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidClient, response.Error); - Assert.Equal(SR.FormatID3052(Parameters.ClientId), response.ErrorDescription); + Assert.Equal(SR.FormatID2052(Parameters.ClientId), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByClientIdAsync("Fabrikam", It.IsAny()), Times.AtLeastOnce()); } @@ -376,7 +376,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.UnauthorizedClient, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3078), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2078), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByClientIdAsync("Fabrikam", It.IsAny()), Times.AtLeastOnce()); Mock.Get(manager).Verify(manager => manager.HasPermissionAsync(application, @@ -416,7 +416,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidClient, response.Error); - Assert.Equal(SR.FormatID3053(Parameters.ClientSecret), response.ErrorDescription); + Assert.Equal(SR.FormatID2053(Parameters.ClientSecret), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByClientIdAsync("Fabrikam", It.IsAny()), Times.AtLeastOnce()); Mock.Get(manager).Verify(manager => manager.HasClientTypeAsync(application, ClientTypes.Public, It.IsAny()), Times.Once()); @@ -455,7 +455,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidClient, response.Error); - Assert.Equal(SR.FormatID3054(Parameters.ClientSecret), response.ErrorDescription); + Assert.Equal(SR.FormatID2054(Parameters.ClientSecret), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByClientIdAsync("Fabrikam", It.IsAny()), Times.AtLeastOnce()); Mock.Get(manager).Verify(manager => manager.HasClientTypeAsync(application, ClientTypes.Public, It.IsAny()), Times.Once()); @@ -497,7 +497,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidClient, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3055), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2055), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByClientIdAsync("Fabrikam", It.IsAny()), Times.AtLeastOnce()); Mock.Get(manager).Verify(manager => manager.HasClientTypeAsync(application, ClientTypes.Public, It.IsAny()), Times.AtLeastOnce()); @@ -693,7 +693,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidToken, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3004), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2004), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByIdAsync("3E228451-1555-46F7-A471-951EFBA23A56", It.IsAny()), Times.AtLeastOnce()); Mock.Get(manager).Verify(manager => manager.TryRevokeAsync(It.IsAny(), It.IsAny()), Times.Never()); @@ -753,7 +753,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidToken, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3019), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2019), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByIdAsync("3E228451-1555-46F7-A471-951EFBA23A56", It.IsAny()), Times.AtLeastOnce()); Mock.Get(manager).Verify(manager => manager.TryRevokeAsync(It.IsAny(), It.IsAny()), Times.Never()); diff --git a/test/OpenIddict.Server.IntegrationTests/OpenIddictServerIntegrationTests.Session.cs b/test/OpenIddict.Server.IntegrationTests/OpenIddictServerIntegrationTests.Session.cs index 3edf2314..1dae1e95 100644 --- a/test/OpenIddict.Server.IntegrationTests/OpenIddictServerIntegrationTests.Session.cs +++ b/test/OpenIddict.Server.IntegrationTests/OpenIddictServerIntegrationTests.Session.cs @@ -37,7 +37,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3084), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2084), response.ErrorDescription); } [Theory] @@ -133,10 +133,10 @@ namespace OpenIddict.Server.IntegrationTests } [Theory] - [InlineData("/path", SR.ID3030)] - [InlineData("/tmp/file.xml", SR.ID3030)] - [InlineData("C:\\tmp\\file.xml", SR.ID3030)] - [InlineData("http://www.fabrikam.com/path#param=value", SR.ID3031)] + [InlineData("/path", SR.ID2030)] + [InlineData("/tmp/file.xml", SR.ID2030)] + [InlineData("C:\\tmp\\file.xml", SR.ID2030)] + [InlineData("http://www.fabrikam.com/path#param=value", SR.ID2031)] public async Task ValidateLogoutRequest_InvalidRedirectUriCausesAnError(string address, string message) { // Arrange @@ -179,7 +179,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3052(Parameters.PostLogoutRedirectUri), response.ErrorDescription); + Assert.Equal(SR.FormatID2052(Parameters.PostLogoutRedirectUri), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByPostLogoutRedirectUriAsync("http://www.fabrikam.com/path", It.IsAny()), Times.Once()); } @@ -223,7 +223,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3052(Parameters.PostLogoutRedirectUri), response.ErrorDescription); + Assert.Equal(SR.FormatID2052(Parameters.PostLogoutRedirectUri), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByPostLogoutRedirectUriAsync("http://www.fabrikam.com/path", It.IsAny()), Times.Once()); Mock.Get(manager).Verify(manager => manager.HasPermissionAsync(applications[0], Permissions.Endpoints.Logout, It.IsAny()), Times.Once()); diff --git a/test/OpenIddict.Server.IntegrationTests/OpenIddictServerIntegrationTests.Userinfo.cs b/test/OpenIddict.Server.IntegrationTests/OpenIddictServerIntegrationTests.Userinfo.cs index 8bb2bd70..c8dd18db 100644 --- a/test/OpenIddict.Server.IntegrationTests/OpenIddictServerIntegrationTests.Userinfo.cs +++ b/test/OpenIddict.Server.IntegrationTests/OpenIddictServerIntegrationTests.Userinfo.cs @@ -37,7 +37,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3084), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2084), response.ErrorDescription); } [Theory] @@ -164,7 +164,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidToken, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3004), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2004), response.ErrorDescription); } [Fact] @@ -202,7 +202,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidToken, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3019), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2019), response.ErrorDescription); } [Theory] diff --git a/test/OpenIddict.Server.IntegrationTests/OpenIddictServerIntegrationTests.cs b/test/OpenIddict.Server.IntegrationTests/OpenIddictServerIntegrationTests.cs index 7fc965a6..e029ce66 100644 --- a/test/OpenIddict.Server.IntegrationTests/OpenIddictServerIntegrationTests.cs +++ b/test/OpenIddict.Server.IntegrationTests/OpenIddictServerIntegrationTests.cs @@ -47,7 +47,7 @@ namespace OpenIddict.Server.IntegrationTests return client.PostAsync("/authenticate", new OpenIddictRequest()); }); - Assert.Equal(SR.GetResourceString(SR.ID1001), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0002), exception.Message); } [Fact] @@ -76,7 +76,7 @@ namespace OpenIddict.Server.IntegrationTests return client.GetAsync("/authenticate"); }); - Assert.Equal(SR.GetResourceString(SR.ID1001), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0002), exception.Message); } [Fact] @@ -110,7 +110,7 @@ namespace OpenIddict.Server.IntegrationTests }); }); - Assert.Equal(SR.GetResourceString(SR.ID1000), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0001), exception.Message); } [Fact] @@ -718,7 +718,7 @@ namespace OpenIddict.Server.IntegrationTests }); // Assert - Assert.Equal(SR.GetResourceString(SR.ID1003), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0004), exception.Message); } [Fact] @@ -768,7 +768,7 @@ namespace OpenIddict.Server.IntegrationTests }); // Assert - Assert.Equal(SR.FormatID1004(TokenTypeHints.AuthorizationCode, TokenTypeHints.AccessToken), exception.Message); + Assert.Equal(SR.FormatID0005(TokenTypeHints.AuthorizationCode, TokenTypeHints.AccessToken), exception.Message); } [Fact] @@ -1115,7 +1115,7 @@ namespace OpenIddict.Server.IntegrationTests return client.PostAsync("/challenge", new OpenIddictRequest()); }); - Assert.Equal(SR.GetResourceString(SR.ID1005), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0006), exception.Message); } [Fact] @@ -1144,7 +1144,7 @@ namespace OpenIddict.Server.IntegrationTests return client.GetAsync("/challenge"); }); - Assert.Equal(SR.GetResourceString(SR.ID1005), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0006), exception.Message); } [Fact] @@ -1179,7 +1179,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.AccessDenied, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3015), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2015), response.ErrorDescription); Assert.Null(response.ErrorUri); } @@ -1213,7 +1213,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidGrant, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3024), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2024), response.ErrorDescription); Assert.Null(response.ErrorUri); } @@ -1261,7 +1261,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InsufficientAccess, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3025), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2025), response.ErrorDescription); Assert.Null(response.ErrorUri); } @@ -1372,7 +1372,7 @@ namespace OpenIddict.Server.IntegrationTests return client.PostAsync("/signin", new OpenIddictRequest()); }); - Assert.Equal(SR.GetResourceString(SR.ID1009), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0010), exception.Message); } [Fact] @@ -1401,7 +1401,7 @@ namespace OpenIddict.Server.IntegrationTests return client.GetAsync("/signin"); }); - Assert.Equal(SR.GetResourceString(SR.ID1009), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0010), exception.Message); } [Fact] @@ -1434,7 +1434,7 @@ namespace OpenIddict.Server.IntegrationTests }); }); - Assert.Equal(SR.GetResourceString(SR.ID1010), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0011), exception.Message); } [Fact] @@ -1467,7 +1467,7 @@ namespace OpenIddict.Server.IntegrationTests }); }); - Assert.Equal(SR.GetResourceString(SR.ID1013), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0014), exception.Message); } [Fact] @@ -1500,7 +1500,7 @@ namespace OpenIddict.Server.IntegrationTests }); }); - Assert.Equal(SR.GetResourceString(SR.ID1014), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0015), exception.Message); } [Fact] @@ -3131,7 +3131,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidGrant, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3016), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2016), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByIdAsync("3E228451-1555-46F7-A471-951EFBA23A56", It.IsAny()), Times.AtLeastOnce()); Mock.Get(manager).Verify(manager => manager.TryRedeemAsync(token, It.IsAny()), Times.Once()); @@ -3269,7 +3269,7 @@ namespace OpenIddict.Server.IntegrationTests // Assert Assert.Equal(Errors.InvalidGrant, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3018), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2018), response.ErrorDescription); Mock.Get(manager).Verify(manager => manager.FindByIdAsync("60FFF7EA-F98E-437B-937E-5073CC313103", It.IsAny()), Times.AtLeastOnce()); Mock.Get(manager).Verify(manager => manager.TryRedeemAsync(token, It.IsAny()), Times.Once()); @@ -4020,7 +4020,7 @@ namespace OpenIddict.Server.IntegrationTests return client.PostAsync("/signout", new OpenIddictRequest()); }); - Assert.Equal(SR.GetResourceString(SR.ID1023), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0024), exception.Message); } [Fact] @@ -4049,7 +4049,7 @@ namespace OpenIddict.Server.IntegrationTests return client.GetAsync("/signout"); }); - Assert.Equal(SR.GetResourceString(SR.ID1023), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0024), exception.Message); } [Theory] diff --git a/test/OpenIddict.Server.Owin.IntegrationTests/OpenIddictServerOwinIntegrationTests.Authentication.cs b/test/OpenIddict.Server.Owin.IntegrationTests/OpenIddictServerOwinIntegrationTests.Authentication.cs index 456047b8..d81d66d5 100644 --- a/test/OpenIddict.Server.Owin.IntegrationTests/OpenIddictServerOwinIntegrationTests.Authentication.cs +++ b/test/OpenIddict.Server.Owin.IntegrationTests/OpenIddictServerOwinIntegrationTests.Authentication.cs @@ -31,7 +31,7 @@ namespace OpenIddict.Server.Owin.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3028(Parameters.RequestId), response.ErrorDescription); + Assert.Equal(SR.FormatID2028(Parameters.RequestId), response.ErrorDescription); } [Fact] @@ -56,7 +56,7 @@ namespace OpenIddict.Server.Owin.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3052(Parameters.RequestId), response.ErrorDescription); + Assert.Equal(SR.FormatID2052(Parameters.RequestId), response.ErrorDescription); } } } diff --git a/test/OpenIddict.Server.Owin.IntegrationTests/OpenIddictServerOwinIntegrationTests.Exchange.cs b/test/OpenIddict.Server.Owin.IntegrationTests/OpenIddictServerOwinIntegrationTests.Exchange.cs index 8e2f4f7b..dd87b07d 100644 --- a/test/OpenIddict.Server.Owin.IntegrationTests/OpenIddictServerOwinIntegrationTests.Exchange.cs +++ b/test/OpenIddict.Server.Owin.IntegrationTests/OpenIddictServerOwinIntegrationTests.Exchange.cs @@ -53,7 +53,7 @@ namespace OpenIddict.Server.Owin.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3087), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2087), response.ErrorDescription); } } } diff --git a/test/OpenIddict.Server.Owin.IntegrationTests/OpenIddictServerOwinIntegrationTests.Introspection.cs b/test/OpenIddict.Server.Owin.IntegrationTests/OpenIddictServerOwinIntegrationTests.Introspection.cs index a79bef50..6dc5af7f 100644 --- a/test/OpenIddict.Server.Owin.IntegrationTests/OpenIddictServerOwinIntegrationTests.Introspection.cs +++ b/test/OpenIddict.Server.Owin.IntegrationTests/OpenIddictServerOwinIntegrationTests.Introspection.cs @@ -51,7 +51,7 @@ namespace OpenIddict.Server.Owin.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3087), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2087), response.ErrorDescription); } } } diff --git a/test/OpenIddict.Server.Owin.IntegrationTests/OpenIddictServerOwinIntegrationTests.Revocation.cs b/test/OpenIddict.Server.Owin.IntegrationTests/OpenIddictServerOwinIntegrationTests.Revocation.cs index 7b6ebfa7..2541da63 100644 --- a/test/OpenIddict.Server.Owin.IntegrationTests/OpenIddictServerOwinIntegrationTests.Revocation.cs +++ b/test/OpenIddict.Server.Owin.IntegrationTests/OpenIddictServerOwinIntegrationTests.Revocation.cs @@ -51,7 +51,7 @@ namespace OpenIddict.Server.Owin.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3087), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2087), response.ErrorDescription); } } } diff --git a/test/OpenIddict.Server.Owin.IntegrationTests/OpenIddictServerOwinIntegrationTests.Session.cs b/test/OpenIddict.Server.Owin.IntegrationTests/OpenIddictServerOwinIntegrationTests.Session.cs index 15453471..7f01e8f1 100644 --- a/test/OpenIddict.Server.Owin.IntegrationTests/OpenIddictServerOwinIntegrationTests.Session.cs +++ b/test/OpenIddict.Server.Owin.IntegrationTests/OpenIddictServerOwinIntegrationTests.Session.cs @@ -31,7 +31,7 @@ namespace OpenIddict.Server.Owin.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3028(Parameters.RequestId), response.ErrorDescription); + Assert.Equal(SR.FormatID2028(Parameters.RequestId), response.ErrorDescription); } [Fact] @@ -56,7 +56,7 @@ namespace OpenIddict.Server.Owin.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.FormatID3052(Parameters.RequestId), response.ErrorDescription); + Assert.Equal(SR.FormatID2052(Parameters.RequestId), response.ErrorDescription); } } } diff --git a/test/OpenIddict.Server.Owin.IntegrationTests/OpenIddictServerOwinIntegrationTests.cs b/test/OpenIddict.Server.Owin.IntegrationTests/OpenIddictServerOwinIntegrationTests.cs index 1888e5c6..d5bc2068 100644 --- a/test/OpenIddict.Server.Owin.IntegrationTests/OpenIddictServerOwinIntegrationTests.cs +++ b/test/OpenIddict.Server.Owin.IntegrationTests/OpenIddictServerOwinIntegrationTests.cs @@ -245,7 +245,7 @@ namespace OpenIddict.Server.Owin.IntegrationTests // Assert Assert.Equal(Errors.InvalidRequest, response.Error); - Assert.Equal(SR.GetResourceString(SR.ID3083), response.ErrorDescription); + Assert.Equal(SR.GetResourceString(SR.ID2083), response.ErrorDescription); } [Theory] diff --git a/test/OpenIddict.Server.Quartz.Tests/OpenIddictServerQuartzBuilderTests.cs b/test/OpenIddict.Server.Quartz.Tests/OpenIddictServerQuartzBuilderTests.cs index d14414fb..8e27e31e 100644 --- a/test/OpenIddict.Server.Quartz.Tests/OpenIddictServerQuartzBuilderTests.cs +++ b/test/OpenIddict.Server.Quartz.Tests/OpenIddictServerQuartzBuilderTests.cs @@ -92,7 +92,7 @@ namespace OpenIddict.Server.Quartz.Tests var exception = Assert.Throws(() => builder.SetMaximumRefireCount(-1)); Assert.Equal("count", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1278), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0279), exception.Message); } [Fact] @@ -122,7 +122,7 @@ namespace OpenIddict.Server.Quartz.Tests var exception = Assert.Throws(() => builder.SetMinimumAuthorizationLifespan(TimeSpan.FromSeconds(-1))); Assert.Equal("lifespan", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1279), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0280), exception.Message); } [Fact] @@ -152,7 +152,7 @@ namespace OpenIddict.Server.Quartz.Tests var exception = Assert.Throws(() => builder.SetMinimumTokenLifespan(TimeSpan.FromSeconds(-1))); Assert.Equal("lifespan", exception.ParamName); - Assert.StartsWith(SR.GetResourceString(SR.ID1279), exception.Message); + Assert.StartsWith(SR.GetResourceString(SR.ID0280), exception.Message); } [Fact] diff --git a/test/OpenIddict.Server.Quartz.Tests/OpenIddictServerQuartzJobTests.cs b/test/OpenIddict.Server.Quartz.Tests/OpenIddictServerQuartzJobTests.cs index da30fe5e..cc6710a2 100644 --- a/test/OpenIddict.Server.Quartz.Tests/OpenIddictServerQuartzJobTests.cs +++ b/test/OpenIddict.Server.Quartz.Tests/OpenIddictServerQuartzJobTests.cs @@ -19,7 +19,7 @@ namespace OpenIddict.Server.Quartz.Tests // Arrange, act and assert var exception = Assert.Throws(() => new OpenIddictServerQuartzJob()); - Assert.Equal(SR.GetResourceString(SR.ID1081), exception.Message); + Assert.Equal(SR.GetResourceString(SR.ID0082), exception.Message); } [Fact] @@ -109,7 +109,7 @@ namespace OpenIddict.Server.Quartz.Tests Assert.True(exception.UnscheduleFiringTrigger); Assert.IsType(exception.InnerException); - Assert.Equal(SR.GetResourceString(SR.ID1277), exception.InnerException!.Message); + Assert.Equal(SR.GetResourceString(SR.ID0278), exception.InnerException!.Message); } [Fact] @@ -129,7 +129,7 @@ namespace OpenIddict.Server.Quartz.Tests Assert.True(exception.UnscheduleFiringTrigger); Assert.IsType(exception.InnerException); - Assert.Equal(SR.GetResourceString(SR.ID1277), exception.InnerException!.Message); + Assert.Equal(SR.GetResourceString(SR.ID0278), exception.InnerException!.Message); } [Fact] diff --git a/test/OpenIddict.Server.Tests/OpenIddictServerBuilderTests.cs b/test/OpenIddict.Server.Tests/OpenIddictServerBuilderTests.cs index 1e943d69..d6836550 100644 --- a/test/OpenIddict.Server.Tests/OpenIddictServerBuilderTests.cs +++ b/test/OpenIddict.Server.Tests/OpenIddictServerBuilderTests.cs @@ -657,7 +657,7 @@ namespace OpenIddict.Server.Tests // Act and assert var exception = Assert.Throws(() => builder.SetAuthorizationEndpointUris(new Uri(uri))); Assert.Equal("addresses", exception.ParamName); - Assert.Contains(SR.GetResourceString(SR.ID1071), exception.Message); + Assert.Contains(SR.GetResourceString(SR.ID0072), exception.Message); } [Theory] @@ -671,7 +671,7 @@ namespace OpenIddict.Server.Tests // Act and assert var exception = Assert.Throws(() => builder.SetAuthorizationEndpointUris(new Uri(uri, UriKind.RelativeOrAbsolute))); Assert.Equal("addresses", exception.ParamName); - Assert.Contains(SR.FormatID1080("~"), exception.Message); + Assert.Contains(SR.FormatID0081("~"), exception.Message); } [Fact] @@ -741,7 +741,7 @@ namespace OpenIddict.Server.Tests // Act and assert var exception = Assert.Throws(() => builder.SetConfigurationEndpointUris(new Uri(uri))); Assert.Equal("addresses", exception.ParamName); - Assert.Contains(SR.GetResourceString(SR.ID1071), exception.Message); + Assert.Contains(SR.GetResourceString(SR.ID0072), exception.Message); } [Theory] @@ -755,7 +755,7 @@ namespace OpenIddict.Server.Tests // Act and assert var exception = Assert.Throws(() => builder.SetConfigurationEndpointUris(new Uri(uri, UriKind.RelativeOrAbsolute))); Assert.Equal("addresses", exception.ParamName); - Assert.Contains(SR.FormatID1080("~"), exception.Message); + Assert.Contains(SR.FormatID0081("~"), exception.Message); } [Fact] @@ -825,7 +825,7 @@ namespace OpenIddict.Server.Tests // Act and assert var exception = Assert.Throws(() => builder.SetCryptographyEndpointUris(new Uri(uri))); Assert.Equal("addresses", exception.ParamName); - Assert.Contains(SR.GetResourceString(SR.ID1071), exception.Message); + Assert.Contains(SR.GetResourceString(SR.ID0072), exception.Message); } [Theory] @@ -839,7 +839,7 @@ namespace OpenIddict.Server.Tests // Act and assert var exception = Assert.Throws(() => builder.SetCryptographyEndpointUris(new Uri(uri, UriKind.RelativeOrAbsolute))); Assert.Equal("addresses", exception.ParamName); - Assert.Contains(SR.FormatID1080("~"), exception.Message); + Assert.Contains(SR.FormatID0081("~"), exception.Message); } [Fact] @@ -909,7 +909,7 @@ namespace OpenIddict.Server.Tests // Act and assert var exception = Assert.Throws(() => builder.SetDeviceEndpointUris(new Uri(uri))); Assert.Equal("addresses", exception.ParamName); - Assert.Contains(SR.GetResourceString(SR.ID1071), exception.Message); + Assert.Contains(SR.GetResourceString(SR.ID0072), exception.Message); } [Theory] @@ -923,7 +923,7 @@ namespace OpenIddict.Server.Tests // Act and assert var exception = Assert.Throws(() => builder.SetDeviceEndpointUris(new Uri(uri, UriKind.RelativeOrAbsolute))); Assert.Equal("addresses", exception.ParamName); - Assert.Contains(SR.FormatID1080("~"), exception.Message); + Assert.Contains(SR.FormatID0081("~"), exception.Message); } [Fact] @@ -993,7 +993,7 @@ namespace OpenIddict.Server.Tests // Act and assert var exception = Assert.Throws(() => builder.SetIntrospectionEndpointUris(new Uri(uri))); Assert.Equal("addresses", exception.ParamName); - Assert.Contains(SR.GetResourceString(SR.ID1071), exception.Message); + Assert.Contains(SR.GetResourceString(SR.ID0072), exception.Message); } [Theory] @@ -1007,7 +1007,7 @@ namespace OpenIddict.Server.Tests // Act and assert var exception = Assert.Throws(() => builder.SetIntrospectionEndpointUris(new Uri(uri, UriKind.RelativeOrAbsolute))); Assert.Equal("addresses", exception.ParamName); - Assert.Contains(SR.FormatID1080("~"), exception.Message); + Assert.Contains(SR.FormatID0081("~"), exception.Message); } [Fact] @@ -1077,7 +1077,7 @@ namespace OpenIddict.Server.Tests // Act and assert var exception = Assert.Throws(() => builder.SetLogoutEndpointUris(new Uri(uri))); Assert.Equal("addresses", exception.ParamName); - Assert.Contains(SR.GetResourceString(SR.ID1071), exception.Message); + Assert.Contains(SR.GetResourceString(SR.ID0072), exception.Message); } [Theory] @@ -1091,7 +1091,7 @@ namespace OpenIddict.Server.Tests // Act and assert var exception = Assert.Throws(() => builder.SetLogoutEndpointUris(new Uri(uri, UriKind.RelativeOrAbsolute))); Assert.Equal("addresses", exception.ParamName); - Assert.Contains(SR.FormatID1080("~"), exception.Message); + Assert.Contains(SR.FormatID0081("~"), exception.Message); } [Fact] @@ -1161,7 +1161,7 @@ namespace OpenIddict.Server.Tests // Act and assert var exception = Assert.Throws(() => builder.SetRevocationEndpointUris(new Uri(uri))); Assert.Equal("addresses", exception.ParamName); - Assert.Contains(SR.GetResourceString(SR.ID1071), exception.Message); + Assert.Contains(SR.GetResourceString(SR.ID0072), exception.Message); } [Theory] @@ -1175,7 +1175,7 @@ namespace OpenIddict.Server.Tests // Act and assert var exception = Assert.Throws(() => builder.SetRevocationEndpointUris(new Uri(uri, UriKind.RelativeOrAbsolute))); Assert.Equal("addresses", exception.ParamName); - Assert.Contains(SR.FormatID1080("~"), exception.Message); + Assert.Contains(SR.FormatID0081("~"), exception.Message); } [Fact] @@ -1245,7 +1245,7 @@ namespace OpenIddict.Server.Tests // Act and assert var exception = Assert.Throws(() => builder.SetTokenEndpointUris(new Uri(uri))); Assert.Equal("addresses", exception.ParamName); - Assert.Contains(SR.GetResourceString(SR.ID1071), exception.Message); + Assert.Contains(SR.GetResourceString(SR.ID0072), exception.Message); } [Theory] @@ -1259,7 +1259,7 @@ namespace OpenIddict.Server.Tests // Act and assert var exception = Assert.Throws(() => builder.SetTokenEndpointUris(new Uri(uri, UriKind.RelativeOrAbsolute))); Assert.Equal("addresses", exception.ParamName); - Assert.Contains(SR.FormatID1080("~"), exception.Message); + Assert.Contains(SR.FormatID0081("~"), exception.Message); } [Fact] @@ -1329,7 +1329,7 @@ namespace OpenIddict.Server.Tests // Act and assert var exception = Assert.Throws(() => builder.SetUserinfoEndpointUris(new Uri(uri))); Assert.Equal("addresses", exception.ParamName); - Assert.Contains(SR.GetResourceString(SR.ID1071), exception.Message); + Assert.Contains(SR.GetResourceString(SR.ID0072), exception.Message); } [Theory] @@ -1343,7 +1343,7 @@ namespace OpenIddict.Server.Tests // Act and assert var exception = Assert.Throws(() => builder.SetUserinfoEndpointUris(new Uri(uri, UriKind.RelativeOrAbsolute))); Assert.Equal("addresses", exception.ParamName); - Assert.Contains(SR.FormatID1080("~"), exception.Message); + Assert.Contains(SR.FormatID0081("~"), exception.Message); } [Fact] @@ -1413,7 +1413,7 @@ namespace OpenIddict.Server.Tests // Act and assert var exception = Assert.Throws(() => builder.SetVerificationEndpointUris(new Uri(uri))); Assert.Equal("addresses", exception.ParamName); - Assert.Contains(SR.GetResourceString(SR.ID1071), exception.Message); + Assert.Contains(SR.GetResourceString(SR.ID0072), exception.Message); } [Theory] @@ -1427,7 +1427,7 @@ namespace OpenIddict.Server.Tests // Act and assert var exception = Assert.Throws(() => builder.SetVerificationEndpointUris(new Uri(uri, UriKind.RelativeOrAbsolute))); Assert.Equal("addresses", exception.ParamName); - Assert.Contains(SR.FormatID1080("~"), exception.Message); + Assert.Contains(SR.FormatID0081("~"), exception.Message); } [Fact]