|
|
@ -430,7 +430,7 @@ namespace OpenIddict.EntityFramework |
|
|
// Bind the token to the specified client application, if applicable.
|
|
|
// Bind the token to the specified client application, if applicable.
|
|
|
if (!string.IsNullOrEmpty(descriptor.ApplicationId)) |
|
|
if (!string.IsNullOrEmpty(descriptor.ApplicationId)) |
|
|
{ |
|
|
{ |
|
|
var application = await Applications.FindAsync(new object[] { ConvertIdentifierFromString(descriptor.ApplicationId) }, cancellationToken); |
|
|
var application = await Applications.FindAsync(cancellationToken, ConvertIdentifierFromString(descriptor.ApplicationId)); |
|
|
if (application == null) |
|
|
if (application == null) |
|
|
{ |
|
|
{ |
|
|
throw new InvalidOperationException("The application associated with the token cannot be found."); |
|
|
throw new InvalidOperationException("The application associated with the token cannot be found."); |
|
|
@ -442,7 +442,7 @@ namespace OpenIddict.EntityFramework |
|
|
// Bind the token to the specified authorization, if applicable.
|
|
|
// Bind the token to the specified authorization, if applicable.
|
|
|
if (!string.IsNullOrEmpty(descriptor.AuthorizationId)) |
|
|
if (!string.IsNullOrEmpty(descriptor.AuthorizationId)) |
|
|
{ |
|
|
{ |
|
|
var authorization = await Authorizations.FindAsync(new object[] { ConvertIdentifierFromString(descriptor.AuthorizationId) }, cancellationToken); |
|
|
var authorization = await Authorizations.FindAsync(cancellationToken, ConvertIdentifierFromString(descriptor.AuthorizationId)); |
|
|
if (authorization == null) |
|
|
if (authorization == null) |
|
|
{ |
|
|
{ |
|
|
throw new InvalidOperationException("The authorization associated with the token cannot be found."); |
|
|
throw new InvalidOperationException("The authorization associated with the token cannot be found."); |
|
|
|