@ -66,7 +66,8 @@ namespace Microsoft.Extensions.DependencyInjection
public IServiceCollection Services { get ; }
public IServiceCollection Services { get ; }
/// <summary>
/// <summary>
/// Adds a custom application manager.
/// Adds a custom application manager derived from
/// <see cref="OpenIddictApplicationManager{TApplication}"/>.
/// </summary>
/// </summary>
/// <typeparam name="TManager">The type of the custom manager.</typeparam>
/// <typeparam name="TManager">The type of the custom manager.</typeparam>
/// <returns>The <see cref="OpenIddictBuilder"/>.</returns>
/// <returns>The <see cref="OpenIddictBuilder"/>.</returns>
@ -74,7 +75,8 @@ namespace Microsoft.Extensions.DependencyInjection
= > AddApplicationManager ( typeof ( TManager ) ) ;
= > AddApplicationManager ( typeof ( TManager ) ) ;
/// <summary>
/// <summary>
/// Adds a custom application manager.
/// Adds a custom application manager derived from
/// <see cref="OpenIddictApplicationManager{TApplication}"/>.
/// </summary>
/// </summary>
/// <param name="type">The type of the custom manager.</param>
/// <param name="type">The type of the custom manager.</param>
/// <returns>The <see cref="OpenIddictBuilder"/>.</returns>
/// <returns>The <see cref="OpenIddictBuilder"/>.</returns>
@ -88,7 +90,7 @@ namespace Microsoft.Extensions.DependencyInjection
var contract = typeof ( OpenIddictApplicationManager < > ) . MakeGenericType ( ApplicationType ) ;
var contract = typeof ( OpenIddictApplicationManager < > ) . MakeGenericType ( ApplicationType ) ;
if ( ! contract . IsAssignableFrom ( type ) )
if ( ! contract . IsAssignableFrom ( type ) )
{
{
throw new InvalidOperationException ( "Custom managers must be derived from OpenIddictApplicationManager ." ) ;
throw new InvalidOperationException ( "The specified type is invalid ." ) ;
}
}
Services . AddScoped ( contract , type ) ;
Services . AddScoped ( contract , type ) ;
@ -97,7 +99,8 @@ namespace Microsoft.Extensions.DependencyInjection
}
}
/// <summary>
/// <summary>
/// Adds a custom application store.
/// Adds a custom application store derived from
/// <see cref="IOpenIddictApplicationStore{TApplication}"/>.
/// </summary>
/// </summary>
/// <typeparam name="TStore">The type of the custom store.</typeparam>
/// <typeparam name="TStore">The type of the custom store.</typeparam>
/// <returns>The <see cref="OpenIddictBuilder"/>.</returns>
/// <returns>The <see cref="OpenIddictBuilder"/>.</returns>
@ -105,7 +108,8 @@ namespace Microsoft.Extensions.DependencyInjection
= > AddApplicationStore ( typeof ( TStore ) ) ;
= > AddApplicationStore ( typeof ( TStore ) ) ;
/// <summary>
/// <summary>
/// Adds a custom application store.
/// Adds a custom application store derived from
/// <see cref="IOpenIddictApplicationStore{TApplication}"/>.
/// </summary>
/// </summary>
/// <param name="type">The type of the custom store.</param>
/// <param name="type">The type of the custom store.</param>
/// <returns>The <see cref="OpenIddictBuilder"/>.</returns>
/// <returns>The <see cref="OpenIddictBuilder"/>.</returns>
@ -119,7 +123,7 @@ namespace Microsoft.Extensions.DependencyInjection
var contract = typeof ( IOpenIddictApplicationStore < > ) . MakeGenericType ( ApplicationType ) ;
var contract = typeof ( IOpenIddictApplicationStore < > ) . MakeGenericType ( ApplicationType ) ;
if ( ! contract . IsAssignableFrom ( type ) )
if ( ! contract . IsAssignableFrom ( type ) )
{
{
throw new InvalidOperationException ( "Custom stores must implement IOpenIddictApplicationStore ." ) ;
throw new InvalidOperationException ( "The specified type is invalid ." ) ;
}
}
Services . AddScoped ( contract , type ) ;
Services . AddScoped ( contract , type ) ;
@ -128,7 +132,8 @@ namespace Microsoft.Extensions.DependencyInjection
}
}
/// <summary>
/// <summary>
/// Adds a custom authorization manager.
/// Adds a custom authorization manager derived from
/// <see cref="OpenIddictAuthorizationManager{TAuthorization}"/>.
/// </summary>
/// </summary>
/// <typeparam name="TManager">The type of the custom manager.</typeparam>
/// <typeparam name="TManager">The type of the custom manager.</typeparam>
/// <returns>The <see cref="OpenIddictBuilder"/>.</returns>
/// <returns>The <see cref="OpenIddictBuilder"/>.</returns>
@ -136,7 +141,8 @@ namespace Microsoft.Extensions.DependencyInjection
= > AddAuthorizationManager ( typeof ( TManager ) ) ;
= > AddAuthorizationManager ( typeof ( TManager ) ) ;
/// <summary>
/// <summary>
/// Adds a custom authorization manager.
/// Adds a custom authorization manager derived from
/// <see cref="OpenIddictAuthorizationManager{TAuthorization}"/>.
/// </summary>
/// </summary>
/// <param name="type">The type of the custom manager.</param>
/// <param name="type">The type of the custom manager.</param>
/// <returns>The <see cref="OpenIddictBuilder"/>.</returns>
/// <returns>The <see cref="OpenIddictBuilder"/>.</returns>
@ -150,7 +156,7 @@ namespace Microsoft.Extensions.DependencyInjection
var contract = typeof ( OpenIddictAuthorizationManager < > ) . MakeGenericType ( AuthorizationType ) ;
var contract = typeof ( OpenIddictAuthorizationManager < > ) . MakeGenericType ( AuthorizationType ) ;
if ( ! contract . IsAssignableFrom ( type ) )
if ( ! contract . IsAssignableFrom ( type ) )
{
{
throw new InvalidOperationException ( "Custom managers must be derived from OpenIddictAuthorizationManager ." ) ;
throw new InvalidOperationException ( "The specified type is invalid ." ) ;
}
}
Services . AddScoped ( contract , type ) ;
Services . AddScoped ( contract , type ) ;
@ -159,7 +165,8 @@ namespace Microsoft.Extensions.DependencyInjection
}
}
/// <summary>
/// <summary>
/// Adds a custom authorization store.
/// Adds a custom authorization store derived from
/// <see cref="IOpenIddictAuthorizationStore{TAuthorization}"/>.
/// </summary>
/// </summary>
/// <typeparam name="TStore">The type of the custom store.</typeparam>
/// <typeparam name="TStore">The type of the custom store.</typeparam>
/// <returns>The <see cref="OpenIddictBuilder"/>.</returns>
/// <returns>The <see cref="OpenIddictBuilder"/>.</returns>
@ -167,7 +174,8 @@ namespace Microsoft.Extensions.DependencyInjection
= > AddAuthorizationStore ( typeof ( TStore ) ) ;
= > AddAuthorizationStore ( typeof ( TStore ) ) ;
/// <summary>
/// <summary>
/// Adds a custom authorization store.
/// Adds a custom authorization store derived from
/// <see cref="IOpenIddictAuthorizationStore{TAuthorization}"/>.
/// </summary>
/// </summary>
/// <param name="type">The type of the custom store.</param>
/// <param name="type">The type of the custom store.</param>
/// <returns>The <see cref="OpenIddictBuilder"/>.</returns>
/// <returns>The <see cref="OpenIddictBuilder"/>.</returns>
@ -181,7 +189,7 @@ namespace Microsoft.Extensions.DependencyInjection
var contract = typeof ( IOpenIddictAuthorizationStore < > ) . MakeGenericType ( AuthorizationType ) ;
var contract = typeof ( IOpenIddictAuthorizationStore < > ) . MakeGenericType ( AuthorizationType ) ;
if ( ! contract . IsAssignableFrom ( type ) )
if ( ! contract . IsAssignableFrom ( type ) )
{
{
throw new InvalidOperationException ( "Custom stores must implement IOpenIddictAuthorizationStore ." ) ;
throw new InvalidOperationException ( "The specified type is invalid ." ) ;
}
}
Services . AddScoped ( contract , type ) ;
Services . AddScoped ( contract , type ) ;
@ -190,7 +198,8 @@ namespace Microsoft.Extensions.DependencyInjection
}
}
/// <summary>
/// <summary>
/// Adds a custom scope manager.
/// Adds a custom scope manager derived from
/// <see cref="OpenIddictScopeManager{TScope}"/>.
/// </summary>
/// </summary>
/// <typeparam name="TManager">The type of the custom manager.</typeparam>
/// <typeparam name="TManager">The type of the custom manager.</typeparam>
/// <returns>The <see cref="OpenIddictBuilder"/>.</returns>
/// <returns>The <see cref="OpenIddictBuilder"/>.</returns>
@ -198,7 +207,8 @@ namespace Microsoft.Extensions.DependencyInjection
= > AddScopeManager ( typeof ( TManager ) ) ;
= > AddScopeManager ( typeof ( TManager ) ) ;
/// <summary>
/// <summary>
/// Adds a custom scope manager.
/// Adds a custom scope manager derived from
/// <see cref="OpenIddictScopeManager{TScope}"/>.
/// </summary>
/// </summary>
/// <param name="type">The type of the custom manager.</param>
/// <param name="type">The type of the custom manager.</param>
/// <returns>The <see cref="OpenIddictBuilder"/>.</returns>
/// <returns>The <see cref="OpenIddictBuilder"/>.</returns>
@ -212,7 +222,7 @@ namespace Microsoft.Extensions.DependencyInjection
var contract = typeof ( OpenIddictScopeManager < > ) . MakeGenericType ( ScopeType ) ;
var contract = typeof ( OpenIddictScopeManager < > ) . MakeGenericType ( ScopeType ) ;
if ( ! contract . IsAssignableFrom ( type ) )
if ( ! contract . IsAssignableFrom ( type ) )
{
{
throw new InvalidOperationException ( "Custom managers must be derived from OpenIddictScopeManager ." ) ;
throw new InvalidOperationException ( "The specified type is invalid ." ) ;
}
}
Services . AddScoped ( contract , type ) ;
Services . AddScoped ( contract , type ) ;
@ -221,7 +231,8 @@ namespace Microsoft.Extensions.DependencyInjection
}
}
/// <summary>
/// <summary>
/// Adds a custom scope store.
/// Adds a custom scope store derived from
/// <see cref="IOpenIddictScopeStore{TScope}"/>.
/// </summary>
/// </summary>
/// <typeparam name="TStore">The type of the custom store.</typeparam>
/// <typeparam name="TStore">The type of the custom store.</typeparam>
/// <returns>The <see cref="OpenIddictBuilder"/>.</returns>
/// <returns>The <see cref="OpenIddictBuilder"/>.</returns>
@ -229,7 +240,8 @@ namespace Microsoft.Extensions.DependencyInjection
= > AddScopeStore ( typeof ( TStore ) ) ;
= > AddScopeStore ( typeof ( TStore ) ) ;
/// <summary>
/// <summary>
/// Adds a custom scope store.
/// Adds a custom scope store derived from
/// <see cref="IOpenIddictScopeStore{TScope}"/>.
/// </summary>
/// </summary>
/// <param name="type">The type of the custom store.</param>
/// <param name="type">The type of the custom store.</param>
/// <returns>The <see cref="OpenIddictBuilder"/>.</returns>
/// <returns>The <see cref="OpenIddictBuilder"/>.</returns>
@ -243,7 +255,7 @@ namespace Microsoft.Extensions.DependencyInjection
var contract = typeof ( IOpenIddictScopeStore < > ) . MakeGenericType ( ScopeType ) ;
var contract = typeof ( IOpenIddictScopeStore < > ) . MakeGenericType ( ScopeType ) ;
if ( ! contract . IsAssignableFrom ( type ) )
if ( ! contract . IsAssignableFrom ( type ) )
{
{
throw new InvalidOperationException ( "Custom stores must implement IOpenIddictScopeStore ." ) ;
throw new InvalidOperationException ( "The specified type is invalid ." ) ;
}
}
Services . AddScoped ( contract , type ) ;
Services . AddScoped ( contract , type ) ;
@ -252,7 +264,8 @@ namespace Microsoft.Extensions.DependencyInjection
}
}
/// <summary>
/// <summary>
/// Adds a custom token manager.
/// Adds a custom token manager derived from
/// <see cref="OpenIddictTokenManager{TToken}"/>.
/// </summary>
/// </summary>
/// <typeparam name="TManager">The type of the custom manager.</typeparam>
/// <typeparam name="TManager">The type of the custom manager.</typeparam>
/// <returns>The <see cref="OpenIddictBuilder"/>.</returns>
/// <returns>The <see cref="OpenIddictBuilder"/>.</returns>
@ -260,7 +273,8 @@ namespace Microsoft.Extensions.DependencyInjection
= > AddTokenManager ( typeof ( TManager ) ) ;
= > AddTokenManager ( typeof ( TManager ) ) ;
/// <summary>
/// <summary>
/// Adds a custom token manager.
/// Adds a custom token manager derived from
/// <see cref="OpenIddictTokenManager{TToken}"/>.
/// </summary>
/// </summary>
/// <param name="type">The type of the custom manager.</param>
/// <param name="type">The type of the custom manager.</param>
/// <returns>The <see cref="OpenIddictBuilder"/>.</returns>
/// <returns>The <see cref="OpenIddictBuilder"/>.</returns>
@ -274,7 +288,7 @@ namespace Microsoft.Extensions.DependencyInjection
var contract = typeof ( OpenIddictTokenManager < > ) . MakeGenericType ( TokenType ) ;
var contract = typeof ( OpenIddictTokenManager < > ) . MakeGenericType ( TokenType ) ;
if ( ! contract . IsAssignableFrom ( type ) )
if ( ! contract . IsAssignableFrom ( type ) )
{
{
throw new InvalidOperationException ( "Custom managers must be derived from OpenIddictTokenManager ." ) ;
throw new InvalidOperationException ( "The specified type is invalid ." ) ;
}
}
Services . AddScoped ( contract , type ) ;
Services . AddScoped ( contract , type ) ;
@ -283,7 +297,8 @@ namespace Microsoft.Extensions.DependencyInjection
}
}
/// <summary>
/// <summary>
/// Adds a custom token store.
/// Adds a custom token store derived from
/// <see cref="IOpenIddictTokenStore{TToken}"/>.
/// </summary>
/// </summary>
/// <typeparam name="TStore">The type of the custom store.</typeparam>
/// <typeparam name="TStore">The type of the custom store.</typeparam>
/// <returns>The <see cref="OpenIddictBuilder"/>.</returns>
/// <returns>The <see cref="OpenIddictBuilder"/>.</returns>
@ -291,7 +306,8 @@ namespace Microsoft.Extensions.DependencyInjection
= > AddTokenStore ( typeof ( TStore ) ) ;
= > AddTokenStore ( typeof ( TStore ) ) ;
/// <summary>
/// <summary>
/// Adds a custom token store.
/// Adds a custom token store derived from
/// <see cref="IOpenIddictTokenStore{TToken}"/>.
/// </summary>
/// </summary>
/// <param name="type">The type of the custom store.</param>
/// <param name="type">The type of the custom store.</param>
/// <returns>The <see cref="OpenIddictBuilder"/>.</returns>
/// <returns>The <see cref="OpenIddictBuilder"/>.</returns>
@ -305,7 +321,7 @@ namespace Microsoft.Extensions.DependencyInjection
var contract = typeof ( IOpenIddictTokenStore < > ) . MakeGenericType ( TokenType ) ;
var contract = typeof ( IOpenIddictTokenStore < > ) . MakeGenericType ( TokenType ) ;
if ( ! contract . IsAssignableFrom ( type ) )
if ( ! contract . IsAssignableFrom ( type ) )
{
{
throw new InvalidOperationException ( "Custom stores must implement IOpenIddictTokenStore ." ) ;
throw new InvalidOperationException ( "The specified type is invalid ." ) ;
}
}
Services . AddScoped ( contract , type ) ;
Services . AddScoped ( contract , type ) ;