identity: use Quartz.NET for token cleanup

This commit is contained in:
Abdullah Atta committed 2023-01-24 15:34:18 +05:00
1 parent f38e61d58f
commit c560f2ac5f
5 files changed
+197 -11

No files matched your search

@@ -0,0 +1,20 @@
using System.Threading.Tasks;
using Quartz;
using Streetwriters.Identity.Services;
namespace Streetwriters.Identity.Jobs
{
public class TokenCleanupJob : IJob
{
private TokenCleanup TokenCleanup { get; set; }
public TokenCleanupJob(TokenCleanup tokenCleanup)
{
TokenCleanup = tokenCleanup;
}
public Task Execute(IJobExecutionContext context)
{
return TokenCleanup.RemoveExpiredGrantsAsync();
}
}
}