diff --git a/src/OpenIddict.Abstractions/OpenIddictExtensions.cs b/src/OpenIddict.Abstractions/OpenIddictExtensions.cs
index b23473fe..6173a38e 100644
--- a/src/OpenIddict.Abstractions/OpenIddictExtensions.cs
+++ b/src/OpenIddict.Abstractions/OpenIddictExtensions.cs
@@ -9,6 +9,9 @@ using JetBrains.Annotations;
namespace Microsoft.Extensions.DependencyInjection
{
+ ///
+ /// Exposes extensions allowing to register the OpenIddict services.
+ ///
public static class OpenIddictExtensions
{
///
diff --git a/src/OpenIddict.Core/OpenIddictCoreExtensions.cs b/src/OpenIddict.Core/OpenIddictCoreExtensions.cs
index 6665822a..255cfd78 100644
--- a/src/OpenIddict.Core/OpenIddictCoreExtensions.cs
+++ b/src/OpenIddict.Core/OpenIddictCoreExtensions.cs
@@ -14,6 +14,9 @@ using OpenIddict.Core;
namespace Microsoft.Extensions.DependencyInjection
{
+ ///
+ /// Exposes extensions allowing to register the OpenIddict core services.
+ ///
public static class OpenIddictCoreExtensions
{
///
diff --git a/src/OpenIddict.EntityFramework/OpenIddictEntityFrameworkExtensions.cs b/src/OpenIddict.EntityFramework/OpenIddictEntityFrameworkExtensions.cs
index c5225680..ccbc32e7 100644
--- a/src/OpenIddict.EntityFramework/OpenIddictEntityFrameworkExtensions.cs
+++ b/src/OpenIddict.EntityFramework/OpenIddictEntityFrameworkExtensions.cs
@@ -13,6 +13,9 @@ using OpenIddict.EntityFramework.Models;
namespace Microsoft.Extensions.DependencyInjection
{
+ ///
+ /// Exposes extensions allowing to register the OpenIddict Entity Framework 6.x services.
+ ///
public static class OpenIddictEntityFrameworkExtensions
{
///
diff --git a/src/OpenIddict.EntityFrameworkCore/OpenIddictEntityFrameworkCoreExtensions.cs b/src/OpenIddict.EntityFrameworkCore/OpenIddictEntityFrameworkCoreExtensions.cs
index 8471b07e..8a9a5214 100644
--- a/src/OpenIddict.EntityFrameworkCore/OpenIddictEntityFrameworkCoreExtensions.cs
+++ b/src/OpenIddict.EntityFrameworkCore/OpenIddictEntityFrameworkCoreExtensions.cs
@@ -14,6 +14,9 @@ using OpenIddict.EntityFrameworkCore.Models;
namespace Microsoft.Extensions.DependencyInjection
{
+ ///
+ /// Exposes extensions allowing to register the OpenIddict Entity Framework Core services.
+ ///
public static class OpenIddictEntityFrameworkCoreExtensions
{
///
diff --git a/src/OpenIddict.MongoDb/OpenIddictMongoDbExtensions.cs b/src/OpenIddict.MongoDb/OpenIddictMongoDbExtensions.cs
index 8215db7f..7274f1cf 100644
--- a/src/OpenIddict.MongoDb/OpenIddictMongoDbExtensions.cs
+++ b/src/OpenIddict.MongoDb/OpenIddictMongoDbExtensions.cs
@@ -13,6 +13,9 @@ using OpenIddict.MongoDb.Models;
namespace Microsoft.Extensions.DependencyInjection
{
+ ///
+ /// Exposes extensions allowing to register the OpenIddict MongoDB services.
+ ///
public static class OpenIddictMongoDbExtensions
{
///
diff --git a/src/OpenIddict.Mvc/OpenIddictMvcBinder.cs b/src/OpenIddict.Mvc/Internal/OpenIddictMvcBinder.cs
similarity index 83%
rename from src/OpenIddict.Mvc/OpenIddictMvcBinder.cs
rename to src/OpenIddict.Mvc/Internal/OpenIddictMvcBinder.cs
index 857669b2..feae9a22 100644
--- a/src/OpenIddict.Mvc/OpenIddictMvcBinder.cs
+++ b/src/OpenIddict.Mvc/Internal/OpenIddictMvcBinder.cs
@@ -14,17 +14,24 @@ using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
-namespace OpenIddict.Mvc
+namespace OpenIddict.Mvc.Internal
{
///
/// Represents an ASP.NET Core MVC model binder that is able to bind
- /// and
- /// instances.
+ /// and instances.
+ /// Note: this API supports the OpenIddict infrastructure and is not intended to be used
+ /// directly from your code. This API may change or be removed in future minor releases.
///
public class OpenIddictMvcBinder : IModelBinder
{
private readonly IOptionsMonitor _options;
+ ///
+ /// Creates a new instance of the class.
+ /// and instances.
+ /// Note: this API supports the OpenIddict infrastructure and is not intended to be used
+ /// directly from your code. This API may change or be removed in future minor releases.
+ ///
public OpenIddictMvcBinder([NotNull] IOptionsMonitor options)
{
_options = options;
diff --git a/src/OpenIddict.Mvc/OpenIddictMvcBinderProvider.cs b/src/OpenIddict.Mvc/Internal/OpenIddictMvcBinderProvider.cs
similarity index 81%
rename from src/OpenIddict.Mvc/OpenIddictMvcBinderProvider.cs
rename to src/OpenIddict.Mvc/Internal/OpenIddictMvcBinderProvider.cs
index 167c0c8f..8e2938d0 100644
--- a/src/OpenIddict.Mvc/OpenIddictMvcBinderProvider.cs
+++ b/src/OpenIddict.Mvc/Internal/OpenIddictMvcBinderProvider.cs
@@ -10,11 +10,13 @@ using JetBrains.Annotations;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.AspNetCore.Mvc.ModelBinding.Binders;
-namespace OpenIddict.Mvc
+namespace OpenIddict.Mvc.Internal
{
///
- /// Represents an ASP.NET Core MVC model binder provider that is
- /// able to provide instances of .
+ /// Represents an ASP.NET Core MVC model binder provider that is able to provide instances
+ /// of for the OpenID Connect server primitives.
+ /// Note: this API supports the OpenIddict infrastructure and is not intended to be used
+ /// directly from your code. This API may change or be removed in future minor releases.
///
public class OpenIddictMvcBinderProvider : IModelBinderProvider
{
diff --git a/src/OpenIddict.Mvc/OpenIddictMvcExtensions.cs b/src/OpenIddict.Mvc/OpenIddictMvcExtensions.cs
index 6a6ade16..19320f1b 100644
--- a/src/OpenIddict.Mvc/OpenIddictMvcExtensions.cs
+++ b/src/OpenIddict.Mvc/OpenIddictMvcExtensions.cs
@@ -7,10 +7,13 @@
using System;
using JetBrains.Annotations;
using Microsoft.AspNetCore.Mvc;
-using OpenIddict.Mvc;
+using OpenIddict.Mvc.Internal;
namespace Microsoft.Extensions.DependencyInjection
{
+ ///
+ /// Exposes extensions allowing to register the OpenIddict MVC services.
+ ///
public static class OpenIddictMvcExtensions
{
///
diff --git a/src/OpenIddict.Server/Internal/OpenIddictServerEventService.cs b/src/OpenIddict.Server/Internal/OpenIddictServerEventService.cs
index e1a1bf61..bb160eee 100644
--- a/src/OpenIddict.Server/Internal/OpenIddictServerEventService.cs
+++ b/src/OpenIddict.Server/Internal/OpenIddictServerEventService.cs
@@ -23,6 +23,11 @@ namespace OpenIddict.Server.Internal
{
private readonly IServiceProvider _provider;
+ ///
+ /// Creates a new instance of the class.
+ /// Note: this API supports the OpenIddict infrastructure and is not intended to be used
+ /// directly from your code. This API may change or be removed in future minor releases.
+ ///
public OpenIddictServerEventService([NotNull] IServiceProvider provider)
{
_provider = provider;
diff --git a/src/OpenIddict.Server/Internal/OpenIddictServerHandler.cs b/src/OpenIddict.Server/Internal/OpenIddictServerHandler.cs
index 280096f1..bd00bb36 100644
--- a/src/OpenIddict.Server/Internal/OpenIddictServerHandler.cs
+++ b/src/OpenIddict.Server/Internal/OpenIddictServerHandler.cs
@@ -20,6 +20,11 @@ namespace OpenIddict.Server.Internal
///
public class OpenIddictServerHandler : OpenIdConnectServerHandler
{
+ ///
+ /// Creates a new instance of the class.
+ /// Note: this API supports the OpenIddict infrastructure and is not intended to be used
+ /// directly from your code. This API may change or be removed in future minor releases.
+ ///
public OpenIddictServerHandler(
[NotNull] IOptionsMonitor options,
[NotNull] ILoggerFactory logger,
diff --git a/src/OpenIddict.Server/Internal/OpenIddictServerInitializer.cs b/src/OpenIddict.Server/Internal/OpenIddictServerInitializer.cs
index 24441bae..8544329f 100644
--- a/src/OpenIddict.Server/Internal/OpenIddictServerInitializer.cs
+++ b/src/OpenIddict.Server/Internal/OpenIddictServerInitializer.cs
@@ -30,6 +30,8 @@ namespace OpenIddict.Server.Internal
///
/// Creates a new instance of the class.
+ /// Note: this API supports the OpenIddict infrastructure and is not intended to be used
+ /// directly from your code. This API may change or be removed in future minor releases.
///
public OpenIddictServerInitializer(
[NotNull] IDistributedCache cache,
diff --git a/src/OpenIddict.Server/Internal/OpenIddictServerProvider.cs b/src/OpenIddict.Server/Internal/OpenIddictServerProvider.cs
index cbf9cb6e..ec971a2d 100644
--- a/src/OpenIddict.Server/Internal/OpenIddictServerProvider.cs
+++ b/src/OpenIddict.Server/Internal/OpenIddictServerProvider.cs
@@ -34,6 +34,11 @@ namespace OpenIddict.Server.Internal
private readonly IOpenIddictScopeManager _scopeManager;
private readonly IOpenIddictTokenManager _tokenManager;
+ ///
+ /// Creates a new instance of the class.
+ /// Note: this API supports the OpenIddict infrastructure and is not intended to be used
+ /// directly from your code. This API may change or be removed in future minor releases.
+ ///
public OpenIddictServerProvider(
[NotNull] ILogger logger,
[NotNull] OpenIddictServerEventService eventService,
diff --git a/src/OpenIddict.Server/OpenIddictServerExtensions.cs b/src/OpenIddict.Server/OpenIddictServerExtensions.cs
index 54528207..9c93193f 100644
--- a/src/OpenIddict.Server/OpenIddictServerExtensions.cs
+++ b/src/OpenIddict.Server/OpenIddictServerExtensions.cs
@@ -18,6 +18,9 @@ using OpenIddict.Server.Internal;
namespace Microsoft.Extensions.DependencyInjection
{
+ ///
+ /// Exposes extensions allowing to register the OpenIddict server services.
+ ///
public static class OpenIddictServerExtensions
{
///
diff --git a/src/OpenIddict.Validation/Internal/OpenIddictValidationEventService.cs b/src/OpenIddict.Validation/Internal/OpenIddictValidationEventService.cs
index 07146aee..a686b661 100644
--- a/src/OpenIddict.Validation/Internal/OpenIddictValidationEventService.cs
+++ b/src/OpenIddict.Validation/Internal/OpenIddictValidationEventService.cs
@@ -21,6 +21,11 @@ namespace OpenIddict.Validation.Internal
{
private readonly IServiceProvider _provider;
+ ///
+ /// Creates a new instance of the class.
+ /// Note: this API supports the OpenIddict infrastructure and is not intended to be used
+ /// directly from your code. This API may change or be removed in future minor releases.
+ ///
public OpenIddictValidationEventService([NotNull] IServiceProvider provider)
{
_provider = provider;
diff --git a/src/OpenIddict.Validation/Internal/OpenIddictValidationHandler.cs b/src/OpenIddict.Validation/Internal/OpenIddictValidationHandler.cs
index df66863f..0e604389 100644
--- a/src/OpenIddict.Validation/Internal/OpenIddictValidationHandler.cs
+++ b/src/OpenIddict.Validation/Internal/OpenIddictValidationHandler.cs
@@ -20,6 +20,11 @@ namespace OpenIddict.Validation.Internal
///
public class OpenIddictValidationHandler : OAuthValidationHandler
{
+ ///
+ /// Creates a new instance of the class.
+ /// Note: this API supports the OpenIddict infrastructure and is not intended to be used
+ /// directly from your code. This API may change or be removed in future minor releases.
+ ///
public OpenIddictValidationHandler(
[NotNull] IOptionsMonitor options,
[NotNull] ILoggerFactory logger,
diff --git a/src/OpenIddict.Validation/Internal/OpenIddictValidationInitializer.cs b/src/OpenIddict.Validation/Internal/OpenIddictValidationInitializer.cs
index ee591ebe..ea39812e 100644
--- a/src/OpenIddict.Validation/Internal/OpenIddictValidationInitializer.cs
+++ b/src/OpenIddict.Validation/Internal/OpenIddictValidationInitializer.cs
@@ -24,6 +24,8 @@ namespace OpenIddict.Validation.Internal
///
/// Creates a new instance of the class.
+ /// Note: this API supports the OpenIddict infrastructure and is not intended to be used
+ /// directly from your code. This API may change or be removed in future minor releases.
///
public OpenIddictValidationInitializer([NotNull] IDataProtectionProvider dataProtectionProvider)
{
diff --git a/src/OpenIddict.Validation/Internal/OpenIddictValidationProvider.cs b/src/OpenIddict.Validation/Internal/OpenIddictValidationProvider.cs
index 05d25989..3efd000a 100644
--- a/src/OpenIddict.Validation/Internal/OpenIddictValidationProvider.cs
+++ b/src/OpenIddict.Validation/Internal/OpenIddictValidationProvider.cs
@@ -23,6 +23,11 @@ namespace OpenIddict.Validation.Internal
{
private readonly OpenIddictValidationEventService _eventService;
+ ///
+ /// Creates a new instance of the class.
+ /// Note: this API supports the OpenIddict infrastructure and is not intended to be used
+ /// directly from your code. This API may change or be removed in future minor releases.
+ ///
public OpenIddictValidationProvider([NotNull] OpenIddictValidationEventService eventService)
=> _eventService = eventService;
diff --git a/src/OpenIddict.Validation/OpenIddictValidationExtensions.cs b/src/OpenIddict.Validation/OpenIddictValidationExtensions.cs
index 50d2c9dc..ae7d9bd2 100644
--- a/src/OpenIddict.Validation/OpenIddictValidationExtensions.cs
+++ b/src/OpenIddict.Validation/OpenIddictValidationExtensions.cs
@@ -16,6 +16,9 @@ using OpenIddict.Validation.Internal;
namespace Microsoft.Extensions.DependencyInjection
{
+ ///
+ /// Exposes extensions allowing to register the OpenIddict validation services.
+ ///
public static class OpenIddictValidationExtensions
{
///
@@ -62,8 +65,9 @@ namespace Microsoft.Extensions.DependencyInjection
{
throw new InvalidOperationException(new StringBuilder()
.AppendLine("The OpenIddict validation handler cannot be registered as an authentication scheme.")
- .AppendLine("This may indicate that an instance of the OAuth validation handler was registered.")
- .Append("Make sure that 'services.AddAuthentication().AddOAuthValidation()' is not used.")
+ .AppendLine("This may indicate that an instance of the OAuth validation or JWT bearer handler was registered.")
+ .Append("Make sure that neither 'services.AddAuthentication().AddOAuthValidation()' nor ")
+ .Append("'services.AddAuthentication().AddJwtBearer()' are called from 'ConfigureServices'.")
.ToString());
}
diff --git a/test/OpenIddict.MongoDb.Tests/OpenIddictMongoDbContextTests.cs b/test/OpenIddict.MongoDb.Tests/OpenIddictMongoDbContextTests.cs
index 5edc54ad..93d70cef 100644
--- a/test/OpenIddict.MongoDb.Tests/OpenIddictMongoDbContextTests.cs
+++ b/test/OpenIddict.MongoDb.Tests/OpenIddictMongoDbContextTests.cs
@@ -73,9 +73,9 @@ namespace OpenIddict.MongoDb.Tests
var context = new OpenIddictMongoDbContext(options, provider);
// Act and assert
- var exception = await Assert.ThrowsAsync(async delegate
+ var exception = await Assert.ThrowsAsync(delegate
{
- await Task.WhenAll(
+ return Task.WhenAll(
context.GetDatabaseAsync(CancellationToken.None).AsTask(),
context.GetDatabaseAsync(CancellationToken.None).AsTask(),
context.GetDatabaseAsync(CancellationToken.None).AsTask(),
diff --git a/test/OpenIddict.Mvc.Tests/OpenIddictMvcModelBinderProviderTests.cs b/test/OpenIddict.Mvc.Tests/Internal/OpenIddictMvcModelBinderProviderTests.cs
similarity index 87%
rename from test/OpenIddict.Mvc.Tests/OpenIddictMvcModelBinderProviderTests.cs
rename to test/OpenIddict.Mvc.Tests/Internal/OpenIddictMvcModelBinderProviderTests.cs
index 4d804bb2..19ae03c6 100644
--- a/test/OpenIddict.Mvc.Tests/OpenIddictMvcModelBinderProviderTests.cs
+++ b/test/OpenIddict.Mvc.Tests/Internal/OpenIddictMvcModelBinderProviderTests.cs
@@ -6,20 +6,14 @@
using System;
using System.Collections.Generic;
-using System.Threading.Tasks;
using AspNet.Security.OpenIdConnect.Primitives;
-using AspNet.Security.OpenIdConnect.Server;
-using Microsoft.AspNetCore.Http;
-using Microsoft.AspNetCore.Http.Features;
-using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.AspNetCore.Mvc.ModelBinding.Binders;
using Microsoft.AspNetCore.Mvc.ModelBinding.Metadata;
-using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using Moq;
using Xunit;
-namespace OpenIddict.Mvc.Tests
+namespace OpenIddict.Mvc.Internal.Tests
{
public class OpenIddictMvcModelBinderProviderTests
{
diff --git a/test/OpenIddict.Mvc.Tests/OpenIddictMvcModelBinderTests.cs b/test/OpenIddict.Mvc.Tests/Internal/OpenIddictMvcModelBinderTests.cs
similarity index 99%
rename from test/OpenIddict.Mvc.Tests/OpenIddictMvcModelBinderTests.cs
rename to test/OpenIddict.Mvc.Tests/Internal/OpenIddictMvcModelBinderTests.cs
index ae5de244..499cca9c 100644
--- a/test/OpenIddict.Mvc.Tests/OpenIddictMvcModelBinderTests.cs
+++ b/test/OpenIddict.Mvc.Tests/Internal/OpenIddictMvcModelBinderTests.cs
@@ -19,7 +19,7 @@ using Microsoft.Extensions.Options;
using Moq;
using Xunit;
-namespace OpenIddict.Mvc.Tests
+namespace OpenIddict.Mvc.Internal.Tests
{
public class OpenIddictMvcModelBinderTests
{
diff --git a/test/OpenIddict.Mvc.Tests/OpenIddictMvcExtensionsTests.cs b/test/OpenIddict.Mvc.Tests/OpenIddictMvcExtensionsTests.cs
index 69ba0113..027eeec6 100644
--- a/test/OpenIddict.Mvc.Tests/OpenIddictMvcExtensionsTests.cs
+++ b/test/OpenIddict.Mvc.Tests/OpenIddictMvcExtensionsTests.cs
@@ -8,6 +8,7 @@ using System;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
+using OpenIddict.Mvc.Internal;
using Xunit;
namespace OpenIddict.Mvc.Tests
diff --git a/test/OpenIddict.Validation.Tests/OpenIddictValidationExtensionsTests.cs b/test/OpenIddict.Validation.Tests/OpenIddictValidationExtensionsTests.cs
index 677dce72..44702f99 100644
--- a/test/OpenIddict.Validation.Tests/OpenIddictValidationExtensionsTests.cs
+++ b/test/OpenIddict.Validation.Tests/OpenIddictValidationExtensionsTests.cs
@@ -190,8 +190,9 @@ namespace OpenIddict.Validation.Tests
Assert.Equal(new StringBuilder()
.AppendLine("The OpenIddict validation handler cannot be registered as an authentication scheme.")
- .AppendLine("This may indicate that an instance of the OAuth validation handler was registered.")
- .Append("Make sure that 'services.AddAuthentication().AddOAuthValidation()' is not used.")
+ .AppendLine("This may indicate that an instance of the OAuth validation or JWT bearer handler was registered.")
+ .Append("Make sure that neither 'services.AddAuthentication().AddOAuthValidation()' nor ")
+ .Append("'services.AddAuthentication().AddJwtBearer()' are called from 'ConfigureServices'.")
.ToString(), exception.Message);
}