public string GetAuthenticationToken( string username, string password, string purpose )
 {
     AuthenticateRequest request = new AuthenticateRequest() {
         username = username,
         password = password,
         purpose = purpose
     };
     AuthenticateResponse response = m_service.Authenticate( request );
     if( null == response ) {
         throw new ResponseValidationException( "token authentication request failed" );
     }
     return response.token;
 }
예제 #2
0
 /// <remarks/>
 public void AuthenticateAsync(AuthenticateRequest AuthenticateRequest)
 {
     this.AuthenticateAsync(AuthenticateRequest, null);
 }
예제 #3
0
 /// <remarks/>
 public System.IAsyncResult BeginAuthenticate(AuthenticateRequest AuthenticateRequest, System.AsyncCallback callback, object asyncState)
 {
     return(this.BeginInvoke("Authenticate", new object[] {
         AuthenticateRequest
     }, callback, asyncState));
 }
 /// <remarks/>
 public System.IAsyncResult BeginAuthenticate(AuthenticateRequest AuthenticateRequest, System.AsyncCallback callback, object asyncState)
 {
     return this.BeginInvoke("Authenticate", new object[] {
                 AuthenticateRequest}, callback, asyncState);
 }
 /// <remarks/>
 public void AuthenticateAsync(AuthenticateRequest AuthenticateRequest, object userState)
 {
     if ((this.AuthenticateOperationCompleted == null)) {
         this.AuthenticateOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAuthenticateOperationCompleted);
     }
     this.InvokeAsync("Authenticate", new object[] {
                 AuthenticateRequest}, this.AuthenticateOperationCompleted, userState);
 }
 /// <remarks/>
 public void AuthenticateAsync(AuthenticateRequest AuthenticateRequest)
 {
     this.AuthenticateAsync(AuthenticateRequest, null);
 }