diff options
Diffstat (limited to 'Software/Visual_Studio/Tango.Web/Authentication/TokensManager.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.Web/Authentication/TokensManager.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.Web/Authentication/TokensManager.cs b/Software/Visual_Studio/Tango.Web/Authentication/TokensManager.cs new file mode 100644 index 000000000..20fc8ab50 --- /dev/null +++ b/Software/Visual_Studio/Tango.Web/Authentication/TokensManager.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.Web.Authentication +{ + public class TokensManager + { + private List<String> _tokens; + + public TokensManager() + { + _tokens = new List<string>(); + } + + public String CreateNew() + { + String token = Guid.NewGuid().ToString(); + _tokens.Add(token); + return token; + } + + public bool Exists(String token) + { + return _tokens.Contains(token); + } + } +} |
