/// <summary>
        /// Returns token Expires timespan
        /// </summary>
        /// <param name="refreshTokenLifeTime"></param>
        /// <param name="refreshTokenLifeTimeType"></param>
        /// <returns></returns>
        private TimeSpan GetExpiresTimeSpan(int?refreshTokenLifeTime, int?refreshTokenLifeTimeType)
        {
            try
            {
                TimeSpan timeSpan = TimeSpan.MaxValue;

                var gc = CommonDBFunctions.GetGlobalCode(refreshTokenLifeTimeType);

                if (gc.CodeName == "Day" && gc.Code == "TOKENLIFETIMEDAY")
                {
                    timeSpan = TimeSpan.FromDays(Convert.ToDouble(refreshTokenLifeTime));
                }
                else if (gc.CodeName == "Hour" && gc.Code == "TOKENLIFETIMEHOUR")
                {
                    timeSpan = TimeSpan.FromHours(Convert.ToDouble(refreshTokenLifeTime));
                }
                else if (gc.CodeName == "Minute" && gc.Code == "TOKENLIFETIMEMINUTE")
                {
                    timeSpan = TimeSpan.FromMinutes(Convert.ToDouble(refreshTokenLifeTime));
                }

                return(timeSpan);
            }
            catch (Exception ex)
            {
                Exception excep = new Exception("Exception occured in SimpleAuthorizationServerProvider.GetExpiresTimeSpan method." + ex.Message);
                throw excep;
            }
        }
        /// <summary>
        /// Returns Token Expires Utc
        /// </summary>
        /// <param name="refreshTokenLifeTime"></param>
        /// <param name="refreshTokenLifeTimeType"></param>
        /// <param name="currentTime"></param>
        /// <returns></returns>
        private DateTime GetExpiresUtc(int?refreshTokenLifeTime, int?refreshTokenLifeTimeType, DateTime currentTime)
        {
            try
            {
                DateTime dateTime = DateTime.Now;

                var gc = CommonDBFunctions.GetGlobalCode(refreshTokenLifeTimeType);

                if (gc.CodeName == "Day" && gc.Code == "TOKENLIFETIMEDAY")
                {
                    dateTime = currentTime.AddDays(Convert.ToDouble(refreshTokenLifeTime));
                }
                else if (gc.CodeName == "Hour" && gc.Code == "TOKENLIFETIMEHOUR")
                {
                    dateTime = currentTime.AddHours(Convert.ToDouble(refreshTokenLifeTime));
                }
                else if (gc.CodeName == "Minute" && gc.Code == "TOKENLIFETIMEMINUTE")
                {
                    dateTime = currentTime.AddMinutes(Convert.ToDouble(refreshTokenLifeTime));
                }

                return(dateTime);
            }
            catch (Exception ex)
            {
                Exception excep = new Exception("Exception occured in SimpleAuthorizationServerProvider.GetExpiresUtc method." + ex.Message);
                throw excep;
            }
        }