Exemplo n.º 1
0
 public static DataSet.SubscriberRow PublishSubscriber(AuthScheme authScheme)
 {
     DataSet.SubscriberDataTable dt = new DataSet.SubscriberDataTable();
     SubscriberTableAdapter ta = new SubscriberTableAdapter();
     dt.AddSubscriberRow(SiteConstant.Title, Guid.NewGuid().ToString("N"), authScheme.ToString(), Constant.Ago);
     ta.Update(dt);
     return dt[0];
 }
Exemplo n.º 2
0
 public static DataSet.SubscriberRow ResolveSubscriber(string tokenBody, AuthScheme authScheme)
 {
     if (tokenBody == null)
     {
         return PublishSubscriber(authScheme);
     }
     TokenTableAdapter tta = new TokenTableAdapter();
     DataSet.TokenDataTable tdt = tta.GetDataByBody(tokenBody);
     if (tdt.Count == 0)
     {
         return PublishSubscriber(authScheme);
     }
     DataSet.TokenRow token = tdt[0];
     SubscriberTableAdapter sta = new SubscriberTableAdapter();
     DataSet.SubscriberRow subscriber = sta.GetDataById(token.SubscriberId)[0];
     if (subscriber.AuthScheme != authScheme.ToString())
     {
         throw new DoubtfulAuthBehaviorException("�F�؃g�[�N�������s���ꂽ�Ƃ��Ƃ͈قȂ�F�ؕ����œn����܂����B");
     }
     return subscriber;
 }
Exemplo n.º 3
0
 public bool IsAuthScheme(AuthScheme authScheme)
 {
     return subscriber.AuthScheme == authScheme.ToString();
 }
Exemplo n.º 4
0
		public Credentials getCredentials (AuthScheme scheme, string __p2, int __p3, bool __p4) {
			if (scheme.isComplete ())
				return null;			
			GSSCredential creds = m_internalProvider.getCredentials ();			
			return new DelegatedCredentials (creds);
		}