/*
* Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
* See https://github.com/openiddict/openiddict-core for more information concerning
* the license and the contributors participating to this project.
*/
using System;
namespace OpenIddict.Core
{
///
/// Provides various settings needed to configure the OpenIddict core services.
///
public class OpenIddictCoreOptions
{
///
/// Gets or sets the type corresponding to the default Application entity,
/// used by the non-generic application manager and the server/validation services.
///
public Type DefaultApplicationType { get; set; }
///
/// Gets or sets the type corresponding to the default Authorization entity,
/// used by the non-generic authorization manager and the server/validation services.
///
public Type DefaultAuthorizationType { get; set; }
///
/// Gets or sets the type corresponding to the default Scope entity,
/// used by the non-generic scope manager and the server/validation services.
///
public Type DefaultScopeType { get; set; }
///
/// Gets or sets the type corresponding to the default Token entity,
/// used by the non-generic token manager and the server/validation services.
///
public Type DefaultTokenType { get; set; }
///
/// Gets or sets a boolean indicating whether additional filtering should be disabled,
/// so that the OpenIddict managers don't execute a second check to ensure the results
/// returned by the stores exactly match the specified query filters, casing included.
/// This property SHOULD NOT be set to true except when the underlying stores
/// are guaranteed to execute case-sensitive filtering at the database level.
/// Disabling this feature MAY result in security vulnerabilities in the other cases.
///
public bool DisableAdditionalFiltering { get; set; }
///
/// Gets or sets a boolean indicating whether entity caching should be disabled.
/// Disabling entity caching may have a noticeable impact on the performance
/// of your application and result in multiple queries being sent by the stores.
///
public bool DisableEntityCaching { get; set; }
///
/// Gets or sets the maximum number of cached entries allowed. When the threshold
/// is reached, the cache is automatically compacted to ensure it doesn't grow
/// abnormally and doesn't cause a memory starvation or out-of-memory exceptions.
/// This property is not used when is true.
///
public int EntityCacheLimit { get; set; } = 250;
}
}