public async Task <RequestResult> DeleteUnConfirmedUser(string username, string password) { RequestResult result = new RequestResult(); try { CognitoUserPool userPool = new CognitoUserPool(this.POOL_ID, this.CLIENTAPP_ID, provider); Amazon.Extensions.CognitoAuthentication.CognitoUser user = new Amazon.Extensions.CognitoAuthentication.CognitoUser(username, this.CLIENTAPP_ID, userPool, provider); AdminDeleteUserRequest req = new AdminDeleteUserRequest() { Username = username, UserPoolId = POOL_ID }; AdminDeleteUserResponse response = await provider.AdminDeleteUserAsync(req); if (response.HttpStatusCode == HttpStatusCode.OK) { result.Status = true; result.Message = "Deleted Successfully"; } } catch (Exception ex) { result.Status = false; result.Message = ex.Message; } return(result); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { AdminDeleteUserResponse response = new AdminDeleteUserResponse(); return(response); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { AdminDeleteUserResponse response = new AdminDeleteUserResponse(); return response; }