|
|
@ -446,6 +446,26 @@ namespace OpenIddict.Core |
|
|
builder.ToImmutable(); |
|
|
builder.ToImmutable(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Retrieves the list of authorizations corresponding to the specified application identifier.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="identifier">The application identifier associated with the authorizations.</param>
|
|
|
|
|
|
/// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param>
|
|
|
|
|
|
/// <returns>
|
|
|
|
|
|
/// A <see cref="Task"/> that can be used to monitor the asynchronous operation,
|
|
|
|
|
|
/// whose result returns the authorizations corresponding to the specified application.
|
|
|
|
|
|
/// </returns>
|
|
|
|
|
|
public virtual Task<ImmutableArray<TAuthorization>> FindByApplicationIdAsync( |
|
|
|
|
|
[NotNull] string identifier, CancellationToken cancellationToken = default) |
|
|
|
|
|
{ |
|
|
|
|
|
if (string.IsNullOrEmpty(identifier)) |
|
|
|
|
|
{ |
|
|
|
|
|
throw new ArgumentException("The identifier cannot be null or empty.", nameof(identifier)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return Store.FindByApplicationIdAsync(identifier, cancellationToken); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Retrieves an authorization using its unique identifier.
|
|
|
/// Retrieves an authorization using its unique identifier.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
@ -1082,6 +1102,9 @@ namespace OpenIddict.Core |
|
|
async Task<ImmutableArray<object>> IOpenIddictAuthorizationManager.FindAsync(string subject, string client, string status, string type, ImmutableArray<string> scopes, CancellationToken cancellationToken) |
|
|
async Task<ImmutableArray<object>> IOpenIddictAuthorizationManager.FindAsync(string subject, string client, string status, string type, ImmutableArray<string> scopes, CancellationToken cancellationToken) |
|
|
=> (await FindAsync(subject, client, status, type, scopes, cancellationToken)).CastArray<object>(); |
|
|
=> (await FindAsync(subject, client, status, type, scopes, cancellationToken)).CastArray<object>(); |
|
|
|
|
|
|
|
|
|
|
|
async Task<ImmutableArray<object>> IOpenIddictAuthorizationManager.FindByApplicationIdAsync(string identifier, CancellationToken cancellationToken) |
|
|
|
|
|
=> (await FindByApplicationIdAsync(identifier, cancellationToken)).CastArray<object>(); |
|
|
|
|
|
|
|
|
async Task<object> IOpenIddictAuthorizationManager.FindByIdAsync(string identifier, CancellationToken cancellationToken) |
|
|
async Task<object> IOpenIddictAuthorizationManager.FindByIdAsync(string identifier, CancellationToken cancellationToken) |
|
|
=> await FindByIdAsync(identifier, cancellationToken); |
|
|
=> await FindByIdAsync(identifier, cancellationToken); |
|
|
|
|
|
|
|
|
|