public void SetExpired(string accessToken)
        {
            JsapiTicketBag bag = Load(accessToken);

            bag.SetExpired();
            Store(accessToken, bag);
        }
        public JsapiTicketBag Load(string accessToken)
        {
            JsapiTicketBag bag = new JsapiTicketBag();

            if (_JsapiTicketBags.Keys.Contains(accessToken))
            {
                bag = _JsapiTicketBags[accessToken];
            }
            return(bag);
        }
        public void Store(string accessToken, JsapiTicketBag bag)
        {
            if (!_JsapiTicketBags.Keys.Contains(accessToken))
            {
                lock (_lockInitializing)
                {
                    if (!_JsapiTicketBags.Keys.Contains(accessToken))
                    {
                        _JsapiTicketBags.Add(accessToken, null);
                    }
                }
            }

            _JsapiTicketBags[accessToken] = bag;
        }
        public string GetTicket(string accessToken)
        {
            JsapiTicketBag bag = Load(accessToken);

            return(bag.JsapiTicketJson.ticket);
        }
        public bool IsExpired(string accessToken)
        {
            JsapiTicketBag bag = Load(accessToken);

            return(bag.IsExpired);
        }