Ejemplo n.º 1
0
        private AuthenticationRequest BuildAuthenticationRequest()
        {
            AuthenticationRequest req = new AuthenticationRequest();
            req.Credentials = this.Credentials;

            return req;
        }
Ejemplo n.º 2
0
 public void Read(TProtocol iprot)
 {
     TField field;
     iprot.ReadStructBegin();
     while (true)
     {
       field = iprot.ReadFieldBegin();
       if (field.Type == TType.Stop) {
     break;
       }
       switch (field.ID)
       {
     case 1:
       if (field.Type == TType.Struct) {
     Auth_request = new AuthenticationRequest();
     Auth_request.Read(iprot);
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     default:
       TProtocolUtil.Skip(iprot, field.Type);
       break;
       }
       iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
 }
Ejemplo n.º 3
0
 public void send_login(AuthenticationRequest auth_request)
 {
     oprot_.WriteMessageBegin(new TMessage("login", TMessageType.Call, seqid_));
     login_args args = new login_args();
     args.Auth_request = auth_request;
     args.Write(oprot_);
     oprot_.WriteMessageEnd();
     oprot_.Transport.Flush();
 }
Ejemplo n.º 4
0
 public void login(AuthenticationRequest auth_request)
 {
     send_login(auth_request);
     recv_login();
 }
Ejemplo n.º 5
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="authRequest"></param>
 public void Login(AuthenticationRequest authRequest)
 {
     GetClient().login(authRequest);
 }
Ejemplo n.º 6
0
 public void send_login(AuthenticationRequest auth_request)
 #endif
 {
   oprot_.WriteMessageBegin(new TMessage("login", TMessageType.Call, seqid_));
   login_args args = new login_args();
   args.Auth_request = auth_request;
   args.Write(oprot_);
   oprot_.WriteMessageEnd();
   #if SILVERLIGHT
   return oprot_.Transport.BeginFlush(callback, state);
   #else
   oprot_.Transport.Flush();
   #endif
 }
Ejemplo n.º 7
0
 public IAsyncResult send_login(AsyncCallback callback, object state, AuthenticationRequest auth_request)
Ejemplo n.º 8
0
      public void login(AuthenticationRequest auth_request)
      {
        #if !SILVERLIGHT
        send_login(auth_request);
        recv_login();

        #else
        var asyncResult = Begin_login(null, null, auth_request);
        End_login(asyncResult);

        #endif
      }
Ejemplo n.º 9
0
 public IAsyncResult Begin_login(AsyncCallback callback, object state, AuthenticationRequest auth_request)
 {
   return send_login(callback, state, auth_request);
 }
Ejemplo n.º 10
0
 public void login(string keyspace, AuthenticationRequest auth_request)
 {
     send_login(keyspace, auth_request);
     recv_login();
 }
Ejemplo n.º 11
0
 public AccessLevel login(AuthenticationRequest auth_request)
 {
     send_login(auth_request);
     return recv_login();
 }
Ejemplo n.º 12
0
        public void Login(string username, string password)
        {
            var auth = new AuthenticationRequest {
                Credentials = new Dictionary<string, string> { { "username", username }, { "password", password } }
            };

            try
            {
                GetClient().login(auth);
                IsAuthenticated = true;
            }
            catch (Exception exc)
            {
                IsAuthenticated = false;
                throw new CassandraException("Login failed.", exc);
            }
        }