mirror of
https://github.com/streetwriters/notesnook-sync-server.git
synced 2026-10-12 14:57:08 +02:00
identity: use Quartz.NET for token cleanup
This commit is contained in:
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user