diff --git a/src/OpenIddict.Core/Managers/OpenIddictAuthorizationManager.cs b/src/OpenIddict.Core/Managers/OpenIddictAuthorizationManager.cs
index d32ea3fe..0617f147 100644
--- a/src/OpenIddict.Core/Managers/OpenIddictAuthorizationManager.cs
+++ b/src/OpenIddict.Core/Managers/OpenIddictAuthorizationManager.cs
@@ -173,16 +173,17 @@ namespace OpenIddict.Core
}
///
- /// Retrieves an authorization using its associated subject/client.
+ /// Retrieves the authorizations corresponding to the specified
+ /// subject and associated with the application identifier.
///
/// The subject associated with the authorization.
/// The client associated with the authorization.
/// The that can be used to abort the operation.
///
/// A that can be used to monitor the asynchronous operation,
- /// whose result returns the authorization corresponding to the subject/client.
+ /// whose result returns the authorizations corresponding to the subject/client.
///
- public virtual Task FindAsync([NotNull] string subject, [NotNull] string client, CancellationToken cancellationToken)
+ public virtual Task> FindAsync([NotNull] string subject, [NotNull] string client, CancellationToken cancellationToken)
{
if (string.IsNullOrEmpty(subject))
{
diff --git a/src/OpenIddict.Core/Stores/IOpenIddictAuthorizationStore.cs b/src/OpenIddict.Core/Stores/IOpenIddictAuthorizationStore.cs
index d4fb16d8..6b54e6df 100644
--- a/src/OpenIddict.Core/Stores/IOpenIddictAuthorizationStore.cs
+++ b/src/OpenIddict.Core/Stores/IOpenIddictAuthorizationStore.cs
@@ -72,16 +72,17 @@ namespace OpenIddict.Core
Task DeleteAsync([NotNull] TAuthorization authorization, CancellationToken cancellationToken);
///
- /// Retrieves an authorization using its associated subject/client.
+ /// Retrieves the authorizations corresponding to the specified
+ /// subject and associated with the application identifier.
///
/// The subject associated with the authorization.
/// The client associated with the authorization.
/// The that can be used to abort the operation.
///
/// A that can be used to monitor the asynchronous operation,
- /// whose result returns the authorization corresponding to the subject/client.
+ /// whose result returns the authorizations corresponding to the subject/client.
///
- Task FindAsync([NotNull] string subject, [NotNull] string client, CancellationToken cancellationToken);
+ Task> FindAsync([NotNull] string subject, [NotNull] string client, CancellationToken cancellationToken);
///
/// Retrieves an authorization using its unique identifier.
diff --git a/src/OpenIddict.Core/Stores/OpenIddictAuthorizationStore.cs b/src/OpenIddict.Core/Stores/OpenIddictAuthorizationStore.cs
index 331d3fa7..0ff0219d 100644
--- a/src/OpenIddict.Core/Stores/OpenIddictAuthorizationStore.cs
+++ b/src/OpenIddict.Core/Stores/OpenIddictAuthorizationStore.cs
@@ -85,16 +85,17 @@ namespace OpenIddict.Core
public abstract Task DeleteAsync([NotNull] TAuthorization authorization, CancellationToken cancellationToken);
///
- /// Retrieves an authorization using its associated subject/client.
+ /// Retrieves the authorizations corresponding to the specified
+ /// subject and associated with the application identifier.
///
/// The subject associated with the authorization.
/// The client associated with the authorization.
/// The that can be used to abort the operation.
///
/// A that can be used to monitor the asynchronous operation,
- /// whose result returns the authorization corresponding to the subject/client.
+ /// whose result returns the authorizations corresponding to the subject/client.
///
- public virtual Task FindAsync([NotNull] string subject, [NotNull] string client, CancellationToken cancellationToken)
+ public virtual Task> FindAsync([NotNull] string subject, [NotNull] string client, CancellationToken cancellationToken)
{
if (string.IsNullOrEmpty(subject))
{
@@ -117,7 +118,7 @@ namespace OpenIddict.Core
select authorization;
}
- return GetAsync(Query, cancellationToken);
+ return ListAsync(Query, cancellationToken);
}
///
diff --git a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictAuthorizationStore.cs b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictAuthorizationStore.cs
index 777524e0..635c9f91 100644
--- a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictAuthorizationStore.cs
+++ b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictAuthorizationStore.cs
@@ -188,16 +188,17 @@ namespace OpenIddict.EntityFrameworkCore
}
///
- /// Retrieves an authorization using its associated subject/client.
+ /// Retrieves the authorizations corresponding to the specified
+ /// subject and associated with the application identifier.
///
/// The subject associated with the authorization.
/// The client associated with the authorization.
/// The that can be used to abort the operation.
///
/// A that can be used to monitor the asynchronous operation,
- /// whose result returns the authorization corresponding to the subject/client.
+ /// whose result returns the authorizations corresponding to the subject/client.
///
- public override Task FindAsync([NotNull] string subject, [NotNull] string client, CancellationToken cancellationToken)
+ public override async Task> FindAsync([NotNull] string subject, [NotNull] string client, CancellationToken cancellationToken)
{
if (string.IsNullOrEmpty(subject))
{
@@ -225,7 +226,7 @@ namespace OpenIddict.EntityFrameworkCore
select authorization;
}
- return Query(Authorizations, Applications).SingleOrDefaultAsync(cancellationToken);
+ return ImmutableArray.Create(await Query(Authorizations, Applications).ToArrayAsync(cancellationToken));
}
///