diff options
| author | Dennis Kobert <d-kobert@web.de> | 2019-05-16 01:10:10 +0200 |
|---|---|---|
| committer | Dennis Kobert <d-kobert@web.de> | 2019-05-16 01:10:10 +0200 |
| commit | 91fc989eea5ee16c2f000064b5c040a6fe6f23b9 (patch) | |
| tree | 2cb29d1bc191cbba9aab216620a4a644b1f6d806 /DSACore/Models/Network | |
| parent | 6d988d13f7fc1652e2d041cfd1c4b40dce6a8adb (diff) | |
Implement tokens
Diffstat (limited to 'DSACore/Models/Network')
| -rw-r--r-- | DSACore/Models/Network/Token.cs | 21 |
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 |
