|
|
|
@ -24,18 +24,21 @@ namespace Volo.Abp.IdentityServer.MongoDB |
|
|
|
CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
return await GetMongoQueryable() |
|
|
|
.FirstOrDefaultAsync(d => d.UserCode == userCode, GetCancellationToken(cancellationToken)) |
|
|
|
; |
|
|
|
.Where(d => d.UserCode == userCode) |
|
|
|
.OrderBy(x => x.Id) |
|
|
|
.FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); |
|
|
|
} |
|
|
|
|
|
|
|
public virtual async Task<DeviceFlowCodes> FindByDeviceCodeAsync(string deviceCode, CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
return await GetMongoQueryable() |
|
|
|
.FirstOrDefaultAsync(d => d.DeviceCode == deviceCode, GetCancellationToken(cancellationToken)); |
|
|
|
.Where(d => d.DeviceCode == deviceCode) |
|
|
|
.OrderBy(x => x.Id) |
|
|
|
.FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); |
|
|
|
} |
|
|
|
|
|
|
|
public virtual async Task<List<DeviceFlowCodes>> GetListByExpirationAsync( |
|
|
|
DateTime maxExpirationDate, |
|
|
|
DateTime maxExpirationDate, |
|
|
|
int maxResultCount, |
|
|
|
CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
@ -46,4 +49,4 @@ namespace Volo.Abp.IdentityServer.MongoDB |
|
|
|
.ToListAsync(GetCancellationToken(cancellationToken)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|