diff --git a/Directory.Build.props b/Directory.Build.props
index 31704373..8058bc86 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -62,6 +62,11 @@
+
+
+
+
+
diff --git a/Directory.Packages.props b/Directory.Packages.props
index b5579558..0835967b 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -21,6 +21,7 @@
+ The application to add to the cache.
/// The that can be used to abort the operation.
/// A that can be used to monitor the asynchronous operation.
- ValueTask AddAsync([NotNull] TApplication application, CancellationToken cancellationToken);
+ ValueTask AddAsync(TApplication application, CancellationToken cancellationToken);
///
/// Retrieves an application using its client identifier.
@@ -34,7 +33,7 @@ namespace OpenIddict.Abstractions
/// A that can be used to monitor the asynchronous operation,
/// whose result returns the client application corresponding to the identifier.
///
- ValueTask FindByClientIdAsync([NotNull] string identifier, CancellationToken cancellationToken);
+ ValueTask FindByClientIdAsync(string identifier, CancellationToken cancellationToken);
///
/// Retrieves an application using its unique identifier.
@@ -45,7 +44,7 @@ namespace OpenIddict.Abstractions
/// A that can be used to monitor the asynchronous operation,
/// whose result returns the client application corresponding to the identifier.
///
- ValueTask FindByIdAsync([NotNull] string identifier, CancellationToken cancellationToken);
+ ValueTask FindByIdAsync(string identifier, CancellationToken cancellationToken);
///
/// Retrieves all the applications associated with the specified redirect_uri.
@@ -53,8 +52,7 @@ namespace OpenIddict.Abstractions
/// The redirect_uri associated with the applications.
/// The that can be used to abort the operation.
/// The client applications corresponding to the specified redirect_uri.
- IAsyncEnumerable FindByPostLogoutRedirectUriAsync(
- [NotNull] string address, CancellationToken cancellationToken);
+ IAsyncEnumerable FindByPostLogoutRedirectUriAsync(string address, CancellationToken cancellationToken);
///
/// Retrieves all the applications associated with the specified redirect_uri.
@@ -62,8 +60,7 @@ namespace OpenIddict.Abstractions
/// The redirect_uri associated with the applications.
/// The that can be used to abort the operation.
/// The client applications corresponding to the specified redirect_uri.
- IAsyncEnumerable FindByRedirectUriAsync(
- [NotNull] string address, CancellationToken cancellationToken);
+ IAsyncEnumerable FindByRedirectUriAsync(string address, CancellationToken cancellationToken);
///
/// Removes the specified application from the cache.
@@ -71,6 +68,6 @@ namespace OpenIddict.Abstractions
/// The application to remove from the cache.
/// The that can be used to abort the operation.
/// A that can be used to monitor the asynchronous operation.
- ValueTask RemoveAsync([NotNull] TApplication application, CancellationToken cancellationToken);
+ ValueTask RemoveAsync(TApplication application, CancellationToken cancellationToken);
}
}
diff --git a/src/OpenIddict.Abstractions/Caches/IOpenIddictAuthorizationCache.cs b/src/OpenIddict.Abstractions/Caches/IOpenIddictAuthorizationCache.cs
index e25fd5a7..e78a9150 100644
--- a/src/OpenIddict.Abstractions/Caches/IOpenIddictAuthorizationCache.cs
+++ b/src/OpenIddict.Abstractions/Caches/IOpenIddictAuthorizationCache.cs
@@ -8,7 +8,6 @@ using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading;
using System.Threading.Tasks;
-using JetBrains.Annotations;
namespace OpenIddict.Abstractions
{
@@ -24,7 +23,7 @@ namespace OpenIddict.Abstractions
/// The authorization to add to the cache.
/// The that can be used to abort the operation.
/// A that can be used to monitor the asynchronous operation.
- ValueTask AddAsync([NotNull] TAuthorization authorization, CancellationToken cancellationToken);
+ ValueTask AddAsync(TAuthorization authorization, CancellationToken cancellationToken);
///
/// Retrieves the authorizations corresponding to the specified
@@ -34,8 +33,7 @@ namespace OpenIddict.Abstractions
/// The client associated with the authorization.
/// The that can be used to abort the operation.
/// The authorizations corresponding to the subject/client.
- IAsyncEnumerable FindAsync(
- [NotNull] string subject, [NotNull] string client, CancellationToken cancellationToken);
+ IAsyncEnumerable FindAsync(string subject, string client, CancellationToken cancellationToken);
///
/// Retrieves the authorizations matching the specified parameters.
@@ -45,8 +43,7 @@ namespace OpenIddict.Abstractions
/// The authorization status.
/// The that can be used to abort the operation.
/// The authorizations corresponding to the criteria.
- IAsyncEnumerable FindAsync(
- [NotNull] string subject, [NotNull] string client, [NotNull] string status, CancellationToken cancellationToken);
+ IAsyncEnumerable FindAsync(string subject, string client, string status, CancellationToken cancellationToken);
///
/// Retrieves the authorizations matching the specified parameters.
@@ -58,8 +55,8 @@ namespace OpenIddict.Abstractions
/// The that can be used to abort the operation.
/// The authorizations corresponding to the criteria.
IAsyncEnumerable FindAsync(
- [NotNull] string subject, [NotNull] string client, [NotNull] string status,
- [NotNull] string type, CancellationToken cancellationToken);
+ string subject, string client, string status,
+ string type, CancellationToken cancellationToken);
///
/// Retrieves the authorizations matching the specified parameters.
@@ -72,8 +69,8 @@ namespace OpenIddict.Abstractions
/// The that can be used to abort the operation.
/// The authorizations corresponding to the criteria.
IAsyncEnumerable FindAsync(
- [NotNull] string subject, [NotNull] string client, [NotNull] string status,
- [NotNull] string type, ImmutableArray scopes, CancellationToken cancellationToken);
+ string subject, string client, string status,
+ string type, ImmutableArray scopes, CancellationToken cancellationToken);
///
/// Retrieves the list of authorizations corresponding to the specified application identifier.
@@ -81,8 +78,7 @@ namespace OpenIddict.Abstractions
/// The application identifier associated with the authorizations.
/// The that can be used to abort the operation.
/// The authorizations corresponding to the specified application.
- IAsyncEnumerable FindByApplicationIdAsync(
- [NotNull] string identifier, CancellationToken cancellationToken);
+ IAsyncEnumerable FindByApplicationIdAsync(string identifier, CancellationToken cancellationToken);
///
/// Retrieves an authorization using its unique identifier.
@@ -93,7 +89,7 @@ namespace OpenIddict.Abstractions
/// A that can be used to monitor the asynchronous operation,
/// whose result returns the authorization corresponding to the identifier.
///
- ValueTask FindByIdAsync([NotNull] string identifier, CancellationToken cancellationToken);
+ ValueTask FindByIdAsync(string identifier, CancellationToken cancellationToken);
///
/// Retrieves all the authorizations corresponding to the specified subject.
@@ -101,7 +97,7 @@ namespace OpenIddict.Abstractions
/// The subject associated with the authorization.
/// The that can be used to abort the operation.
/// The authorizations corresponding to the specified subject.
- IAsyncEnumerable FindBySubjectAsync([NotNull] string subject, CancellationToken cancellationToken);
+ IAsyncEnumerable FindBySubjectAsync(string subject, CancellationToken cancellationToken);
///
/// Removes the specified authorization from the cache.
@@ -109,6 +105,6 @@ namespace OpenIddict.Abstractions
/// The authorization to remove from the cache.
/// The that can be used to abort the operation.
/// A that can be used to monitor the asynchronous operation.
- ValueTask RemoveAsync([NotNull] TAuthorization authorization, CancellationToken cancellationToken);
+ ValueTask RemoveAsync(TAuthorization authorization, CancellationToken cancellationToken);
}
}
diff --git a/src/OpenIddict.Abstractions/Caches/IOpenIddictScopeCache.cs b/src/OpenIddict.Abstractions/Caches/IOpenIddictScopeCache.cs
index 7cf3eb4d..bcb6ca6b 100644
--- a/src/OpenIddict.Abstractions/Caches/IOpenIddictScopeCache.cs
+++ b/src/OpenIddict.Abstractions/Caches/IOpenIddictScopeCache.cs
@@ -8,7 +8,6 @@ using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading;
using System.Threading.Tasks;
-using JetBrains.Annotations;
namespace OpenIddict.Abstractions
{
@@ -24,7 +23,7 @@ namespace OpenIddict.Abstractions
/// The scope to add to the cache.
/// The that can be used to abort the operation.
/// A that can be used to monitor the asynchronous operation.
- ValueTask AddAsync([NotNull] TScope scope, CancellationToken cancellationToken);
+ ValueTask AddAsync(TScope scope, CancellationToken cancellationToken);
///
/// Retrieves a scope using its unique identifier.
@@ -35,7 +34,7 @@ namespace OpenIddict.Abstractions
/// A that can be used to monitor the asynchronous operation,
/// whose result returns the scope corresponding to the identifier.
///
- ValueTask FindByIdAsync([NotNull] string identifier, CancellationToken cancellationToken);
+ ValueTask FindByIdAsync(string identifier, CancellationToken cancellationToken);
///
/// Retrieves a scope using its name.
@@ -46,7 +45,7 @@ namespace OpenIddict.Abstractions
/// A that can be used to monitor the asynchronous operation,
/// whose result returns the scope corresponding to the specified name.
///
- ValueTask FindByNameAsync([NotNull] string name, CancellationToken cancellationToken);
+ ValueTask FindByNameAsync(string name, CancellationToken cancellationToken);
///
/// Retrieves a list of scopes using their name.
@@ -62,7 +61,7 @@ namespace OpenIddict.Abstractions
/// The resource associated with the scopes.
/// The that can be used to abort the operation.
/// The scopes associated with the specified resource.
- IAsyncEnumerable FindByResourceAsync([NotNull] string resource, CancellationToken cancellationToken);
+ IAsyncEnumerable FindByResourceAsync(string resource, CancellationToken cancellationToken);
///
/// Removes the specified scope from the cache.
@@ -70,6 +69,6 @@ namespace OpenIddict.Abstractions
/// The scope to remove from the cache.
/// The that can be used to abort the operation.
/// A that can be used to monitor the asynchronous operation.
- ValueTask RemoveAsync([NotNull] TScope scope, CancellationToken cancellationToken);
+ ValueTask RemoveAsync(TScope scope, CancellationToken cancellationToken);
}
}
diff --git a/src/OpenIddict.Abstractions/Caches/IOpenIddictTokenCache.cs b/src/OpenIddict.Abstractions/Caches/IOpenIddictTokenCache.cs
index 78a6a81d..75ae32c9 100644
--- a/src/OpenIddict.Abstractions/Caches/IOpenIddictTokenCache.cs
+++ b/src/OpenIddict.Abstractions/Caches/IOpenIddictTokenCache.cs
@@ -7,7 +7,6 @@
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
-using JetBrains.Annotations;
namespace OpenIddict.Abstractions
{
@@ -23,7 +22,7 @@ namespace OpenIddict.Abstractions
/// The token to add to the cache.
/// The that can be used to abort the operation.
/// A that can be used to monitor the asynchronous operation.
- ValueTask AddAsync([NotNull] TToken token, CancellationToken cancellationToken);
+ ValueTask AddAsync(TToken token, CancellationToken cancellationToken);
///
/// Retrieves the tokens corresponding to the specified
@@ -33,8 +32,7 @@ namespace OpenIddict.Abstractions
/// The client associated with the token.
/// The that can be used to abort the operation.
/// The tokens corresponding to the subject/client.
- IAsyncEnumerable FindAsync([NotNull] string subject,
- [NotNull] string client, CancellationToken cancellationToken);
+ IAsyncEnumerable FindAsync(string subject, string client, CancellationToken cancellationToken);
///
/// Retrieves the tokens matching the specified parameters.
@@ -44,9 +42,7 @@ namespace OpenIddict.Abstractions
/// The token status.
/// The that can be used to abort the operation.
/// The tokens corresponding to the criteria.
- IAsyncEnumerable FindAsync(
- [NotNull] string subject, [NotNull] string client,
- [NotNull] string status, CancellationToken cancellationToken);
+ IAsyncEnumerable FindAsync(string subject, string client, string status, CancellationToken cancellationToken);
///
/// Retrieves the tokens matching the specified parameters.
@@ -58,8 +54,8 @@ namespace OpenIddict.Abstractions
/// The that can be used to abort the operation.
/// The tokens corresponding to the criteria.
IAsyncEnumerable FindAsync(
- [NotNull] string subject, [NotNull] string client,
- [NotNull] string status, [NotNull] string type, CancellationToken cancellationToken);
+ string subject, string client,
+ string status, string type, CancellationToken cancellationToken);
///
/// Retrieves the list of tokens corresponding to the specified application identifier.
@@ -67,7 +63,7 @@ namespace OpenIddict.Abstractions
/// The application identifier associated with the tokens.
/// The that can be used to abort the operation.
/// The tokens corresponding to the specified application.
- IAsyncEnumerable FindByApplicationIdAsync([NotNull] string identifier, CancellationToken cancellationToken);
+ IAsyncEnumerable FindByApplicationIdAsync(string identifier, CancellationToken cancellationToken);
///
/// Retrieves the list of tokens corresponding to the specified authorization identifier.
@@ -75,7 +71,7 @@ namespace OpenIddict.Abstractions
/// The authorization identifier associated with the tokens.
/// The that can be used to abort the operation.
/// The tokens corresponding to the specified authorization.
- IAsyncEnumerable FindByAuthorizationIdAsync([NotNull] string identifier, CancellationToken cancellationToken);
+ IAsyncEnumerable FindByAuthorizationIdAsync(string identifier, CancellationToken cancellationToken);
///
/// Retrieves a token using its unique identifier.
@@ -86,7 +82,7 @@ namespace OpenIddict.Abstractions
/// A that can be used to monitor the asynchronous operation,
/// whose result returns the token corresponding to the unique identifier.
///
- ValueTask FindByIdAsync([NotNull] string identifier, CancellationToken cancellationToken);
+ ValueTask FindByIdAsync(string identifier, CancellationToken cancellationToken);
///
/// Retrieves the list of tokens corresponding to the specified reference identifier.
@@ -98,7 +94,7 @@ namespace OpenIddict.Abstractions
/// A that can be used to monitor the asynchronous operation,
/// whose result returns the tokens corresponding to the specified reference identifier.
///
- ValueTask FindByReferenceIdAsync([NotNull] string identifier, CancellationToken cancellationToken);
+ ValueTask FindByReferenceIdAsync(string identifier, CancellationToken cancellationToken);
///
/// Retrieves the list of tokens corresponding to the specified subject.
@@ -106,7 +102,7 @@ namespace OpenIddict.Abstractions
/// The subject associated with the tokens.
/// The that can be used to abort the operation.
/// The tokens corresponding to the specified subject.
- IAsyncEnumerable FindBySubjectAsync([NotNull] string subject, CancellationToken cancellationToken);
+ IAsyncEnumerable FindBySubjectAsync(string subject, CancellationToken cancellationToken);
///
/// Removes the specified token from the cache.
@@ -114,6 +110,6 @@ namespace OpenIddict.Abstractions
/// The token to remove from the cache.
/// The that can be used to abort the operation.
/// A that can be used to monitor the asynchronous operation.
- ValueTask RemoveAsync([NotNull] TToken token, CancellationToken cancellationToken);
+ ValueTask RemoveAsync(TToken token, CancellationToken cancellationToken);
}
}
diff --git a/src/OpenIddict.Abstractions/Descriptors/OpenIddictApplicationDescriptor.cs b/src/OpenIddict.Abstractions/Descriptors/OpenIddictApplicationDescriptor.cs
index 280ee25d..399397d7 100644
--- a/src/OpenIddict.Abstractions/Descriptors/OpenIddictApplicationDescriptor.cs
+++ b/src/OpenIddict.Abstractions/Descriptors/OpenIddictApplicationDescriptor.cs
@@ -10,29 +10,26 @@ namespace OpenIddict.Abstractions
public class OpenIddictApplicationDescriptor
{
///
- /// Gets or sets the client identifier
- /// associated with the application.
+ /// Gets or sets the client identifier associated with the application.
///
- public string ClientId { get; set; }
+ public string? ClientId { get; set; }
///
/// Gets or sets the client secret associated with the application.
/// Note: depending on the application manager used when creating it,
/// this property may be hashed or encrypted for security reasons.
///
- public string ClientSecret { get; set; }
+ public string? ClientSecret { get; set; }
///
- /// Gets or sets the consent type
- /// associated with the application.
+ /// Gets or sets the consent type associated with the application.
///
- public string ConsentType { get; set; }
+ public string? ConsentType { get; set; }
///
- /// Gets or sets the display name
- /// associated with the application.
+ /// Gets or sets the display name associated with the application.
///
- public string DisplayName { get; set; }
+ public string? DisplayName { get; set; }
///
/// Gets the localized display names associated with the application.
@@ -46,14 +43,12 @@ namespace OpenIddict.Abstractions
public HashSet Permissions { get; } = new HashSet(StringComparer.Ordinal);
///
- /// Gets the logout callback URLs
- /// associated with the application.
+ /// Gets the logout callback URLs associated with the application.
///
public HashSet PostLogoutRedirectUris { get; } = new HashSet();
///
- /// Gets the callback URLs
- /// associated with the application.
+ /// Gets the callback URLs associated with the application.
///
public HashSet RedirectUris { get; } = new HashSet();
@@ -63,9 +58,8 @@ namespace OpenIddict.Abstractions
public HashSet Requirements { get; } = new HashSet(StringComparer.Ordinal);
///
- /// Gets or sets the application type
- /// associated with the application.
+ /// Gets or sets the application type associated with the application.
///
- public string Type { get; set; }
+ public string? Type { get; set; }
}
}
diff --git a/src/OpenIddict.Abstractions/Descriptors/OpenIddictAuthorizationDescriptor.cs b/src/OpenIddict.Abstractions/Descriptors/OpenIddictAuthorizationDescriptor.cs
index 13915489..f53911a5 100644
--- a/src/OpenIddict.Abstractions/Descriptors/OpenIddictAuthorizationDescriptor.cs
+++ b/src/OpenIddict.Abstractions/Descriptors/OpenIddictAuthorizationDescriptor.cs
@@ -12,13 +12,13 @@ namespace OpenIddict.Abstractions
///
/// Gets or sets the application identifier associated with the authorization.
///
- public string ApplicationId { get; set; }
+ public string? ApplicationId { get; set; }
///
/// Gets or sets the optional principal associated with the authorization.
/// Note: this property is not stored by the default authorization stores.
///
- public ClaimsPrincipal Principal { get; set; }
+ public ClaimsPrincipal? Principal { get; set; }
///
/// Gets the scopes associated with the authorization.
@@ -28,16 +28,16 @@ namespace OpenIddict.Abstractions
///
/// Gets or sets the status associated with the authorization.
///
- public string Status { get; set; }
+ public string? Status { get; set; }
///
/// Gets or sets the subject associated with the authorization.
///
- public string Subject { get; set; }
+ public string? Subject { get; set; }
///
/// Gets or sets the type of the authorization.
///
- public string Type { get; set; }
+ public string? Type { get; set; }
}
}
diff --git a/src/OpenIddict.Abstractions/Descriptors/OpenIddictScopeDescriptor.cs b/src/OpenIddict.Abstractions/Descriptors/OpenIddictScopeDescriptor.cs
index 5329a81e..3ea35327 100644
--- a/src/OpenIddict.Abstractions/Descriptors/OpenIddictScopeDescriptor.cs
+++ b/src/OpenIddict.Abstractions/Descriptors/OpenIddictScopeDescriptor.cs
@@ -10,10 +10,9 @@ namespace OpenIddict.Abstractions
public class OpenIddictScopeDescriptor
{
///
- /// Gets or sets the description
- /// associated with the scope.
+ /// Gets or sets the description associated with the scope.
///
- public string Description { get; set; }
+ public string? Description { get; set; }
///
/// Gets the localized descriptions associated with the scope.
@@ -21,10 +20,9 @@ namespace OpenIddict.Abstractions
public Dictionary Descriptions { get; } = new Dictionary();
///
- /// Gets or sets the display name
- /// associated with the scope.
+ /// Gets or sets the display name associated with the scope.
///
- public string DisplayName { get; set; }
+ public string? DisplayName { get; set; }
///
/// Gets the localized display names associated with the scope.
@@ -32,10 +30,9 @@ namespace OpenIddict.Abstractions
public Dictionary DisplayNames { get; } = new Dictionary();
///
- /// Gets or sets the unique name
- /// associated with the scope.
+ /// Gets or sets the unique name associated with the scope.
///
- public string Name { get; set; }
+ public string? Name { get; set; }
///
/// Gets the resources associated with the scope.
diff --git a/src/OpenIddict.Abstractions/Descriptors/OpenIddictTokenDescriptor.cs b/src/OpenIddict.Abstractions/Descriptors/OpenIddictTokenDescriptor.cs
index 2b01b2cf..0dea593a 100644
--- a/src/OpenIddict.Abstractions/Descriptors/OpenIddictTokenDescriptor.cs
+++ b/src/OpenIddict.Abstractions/Descriptors/OpenIddictTokenDescriptor.cs
@@ -11,12 +11,12 @@ namespace OpenIddict.Abstractions
///
/// Gets or sets the application identifier associated with the token.
///
- public string ApplicationId { get; set; }
+ public string? ApplicationId { get; set; }
///
/// Gets or sets the authorization identifier associated with the token.
///
- public string AuthorizationId { get; set; }
+ public string? AuthorizationId { get; set; }
///
/// Gets or sets the creation date associated with the token.
@@ -31,34 +31,34 @@ namespace OpenIddict.Abstractions
///
/// Gets or sets the payload associated with the token.
///
- public string Payload { get; set; }
+ public string? Payload { get; set; }
///
/// Gets or sets the optional principal associated with the token.
/// Note: this property is not stored by the default token stores.
///
- public ClaimsPrincipal Principal { get; set; }
+ public ClaimsPrincipal? Principal { get; set; }
///
/// Gets or sets the reference identifier associated with the token.
/// Note: depending on the application manager used when creating it,
/// this property may be hashed or encrypted for security reasons.
///
- public string ReferenceId { get; set; }
+ public string? ReferenceId { get; set; }
///
/// Gets or sets the status associated with the token.
///
- public string Status { get; set; }
+ public string? Status { get; set; }
///
/// Gets or sets the subject associated with the token.
///
- public string Subject { get; set; }
+ public string? Subject { get; set; }
///
/// Gets or sets the token type.
///
- public string Type { get; set; }
+ public string? Type { get; set; }
}
}
diff --git a/src/OpenIddict.Abstractions/Managers/IOpenIddictApplicationManager.cs b/src/OpenIddict.Abstractions/Managers/IOpenIddictApplicationManager.cs
index a518a4b4..2c877a8d 100644
--- a/src/OpenIddict.Abstractions/Managers/IOpenIddictApplicationManager.cs
+++ b/src/OpenIddict.Abstractions/Managers/IOpenIddictApplicationManager.cs
@@ -6,7 +6,6 @@ using System.Globalization;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
-using JetBrains.Annotations;
namespace OpenIddict.Abstractions
{
@@ -40,7 +39,7 @@ namespace OpenIddict.Abstractions
/// A that can be used to monitor the asynchronous operation,
/// whose result returns the number of applications that match the specified query.
///
- ValueTask CountAsync([NotNull] Func, IQueryable> query, CancellationToken cancellationToken = default);
+ ValueTask CountAsync(Func, IQueryable> query, CancellationToken cancellationToken = default);
///
/// Creates a new application based on the specified descriptor.
@@ -53,7 +52,7 @@ namespace OpenIddict.Abstractions
/// A that can be used to monitor the asynchronous operation,
/// whose result returns the unique identifier associated with the application.
///
- ValueTask