BaseClass.cs 519 B

123456789101112131415161718192021222324
  1. using System;
  2. using Microsoft.AspNetCore.Http;
  3. namespace MySystem.PublicClass.GraphQL
  4. {
  5. public class BaseClass
  6. {
  7. public BaseClass()
  8. {
  9. }
  10. public bool CheckToken(HttpContext httpContext, string device, string token)
  11. {
  12. if (device == "1")
  13. {
  14. if (token == Library.function.GetCookie(httpContext, "Token"))
  15. {
  16. return true;
  17. }
  18. }
  19. return false;
  20. }
  21. }
  22. }