summaryrefslogtreecommitdiff
path: root/DSACore/Models/Network
diff options
context:
space:
mode:
authornatrixaeria <janng@gmx.de>2019-05-17 21:02:08 +0200
committernatrixaeria <janng@gmx.de>2019-05-17 21:02:08 +0200
commitbc74dde4dd7cf40216de4f0aae9a1b9ddf5e044b (patch)
treec1c7f759645417989f15f9716efbf68a8f1d3a6d /DSACore/Models/Network
parent921d023a7652be5b1232ac41aeb2646b5f83ceb5 (diff)
parentaad1d69b5e2bb0c82f657f7693462fd95a91fb9f (diff)
Merge branch 'scribble' of https://github.com/TrueDoctor/DiscoBot into scribble
Diffstat (limited to 'DSACore/Models/Network')
-rw-r--r--DSACore/Models/Network/Token.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/DSACore/Models/Network/Token.cs b/DSACore/Models/Network/Token.cs
new file mode 100644
index 0000000..0021317
--- /dev/null
+++ b/DSACore/Models/Network/Token.cs
@@ -0,0 +1,21 @@
+using System;
+using Microsoft.EntityFrameworkCore;
+
+namespace DSACore.Models.Network
+{
+ public class Token
+ {
+ public string Group { get; set; }
+ private DateTime creation = DateTime.Now;
+
+ public Token(string @group)
+ {
+ Group = @group;
+ }
+
+ public bool IsValid()
+ {
+ return DateTime.Now - creation < TimeSpan.FromMinutes(1);
+ }
+ }
+} \ No newline at end of file