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; }
/// <remarks/> public void AuthenticateAsync(AuthenticateRequest AuthenticateRequest) { this.AuthenticateAsync(AuthenticateRequest, null); }
/// <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); }