Esempio n. 1
0
 public static void DeleteInstance()
 {
     if (instance != null)
     {
         instance = null;
     }
 }
Esempio n. 2
0
 public static SecurityController GetInstance()
 {
     if (instance == null)
     {
         instance = new SecurityController();
     }
     return(instance);
 }
Esempio n. 3
0
        /// <summary>
        /// Security API Validator
        /// </summary>
        /// <returns></returns>
        protected bool ValidateSecurityAPI()
        {
            var AccessToken = string.Empty;

            if (Request.Headers.TryGetValue("AccessToken", out Microsoft.Extensions.Primitives.StringValues headerValues))
            {
                AccessToken = headerValues.FirstOrDefault();
            }

            return(SecurityController.GetInstance().ValidateSecurityToken(AccessToken));
        }