Ejemplo n.º 1
0
        public TokenVerifier(DataSet.TokenRow token, DateTime now)
        {
            this.now = now;
            if (token == null)
            {
                subscriber = null;
                return;
            }

            this.token = token;
            SubscriberTableAdapter sta = new SubscriberTableAdapter();
            DataSet.SubscriberDataTable sdt = sta.GetDataById(token.SubscriberId);
            subscriber = sdt[0];
            if (subscriber.TitleId != SiteConstant.Title.Id)
            {
                subscriber = null;
            }
        }
Ejemplo n.º 2
0
 public TokenPublisher(DataSet.SubscriberRow subscriber, DateTime now)
 {
     this.subscriber = subscriber;
     this.now = now;
 }
Ejemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     TitleTableAdapter tta = new TitleTableAdapter();
     DataSet.TitleRow title = tta.GetDataByName("debug title")[0];
     SubscriberTableAdapter sta = new SubscriberTableAdapter();
     DataSet.SubscriberDataTable sdt = sta.GetDataByTitleId(title.Id);
     if (sdt.Count == 0)
     {
         sdt.AddSubscriberRow(title, "debug auth key", AuthScheme.Web.ToString(), Constant.Ago);
         sta.Update(sdt);
     }
     subscriber = sdt[0];
 }