Beispiel #1
0
 public static void DeleteInstance()
 {
     if (instance != null)
     {
         instance = null;
     }
 }
Beispiel #2
0
 public static SecurityController GetInstance()
 {
     if (instance == null)
     {
         instance = new SecurityController();
     }
     return(instance);
 }
Beispiel #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));
        }