public async Task Test_jobs_sequence() { // Send an email verification request var emailRequest = new VerifyEmailJobRequest { UserId = _user.UserId, ClientId = GetVariable("AUTH0_CLIENT_ID") }; var emailRequestResponse = await _apiClient.Jobs.SendVerificationEmailAsync(emailRequest); emailRequestResponse.Should().NotBeNull(); emailRequestResponse.Id.Should().NotBeNull(); // Check to see whether we can get the exact same job again var job = await _apiClient.Jobs.GetAsync(emailRequestResponse.Id); job.Should().NotBeNull(); job.Id.Should().Be(emailRequestResponse.Id); // Send a user import request //using (Stream stream = this.GetType().Assembly.GetManifestResourceStream("Auth0.ManagementApi.IntegrationTests.user-import-test.json")) //{ // var importUsersResponse = await apiClient.Jobs.ImportUsers(connection.Id, "user-import-test.json", stream); // importUsersResponse.Should().NotBeNull(); // importUsersResponse.Id.Should().NotBeNull(); //} }
public async Task Test_jobs_sequence() { // Send an email verification request var emailRequest = new VerifyEmailJobRequest { UserId = user.UserId }; var emailRequestResponse = await apiClient.Jobs.SendVerificationEmailAsync(emailRequest); emailRequestResponse.Should().NotBeNull(); emailRequestResponse.Id.Should().NotBeNull(); // Check to see whether we can get the exact same job again var job = await apiClient.Jobs.GetAsync(emailRequestResponse.Id); job.Should().NotBeNull(); job.Id.Should().Be(emailRequestResponse.Id); // Send a user import request //using (Stream stream = this.GetType().Assembly.GetManifestResourceStream("Auth0.ManagementApi.IntegrationTests.user-import-test.json")) //{ // var importUsersResponse = await apiClient.Jobs.ImportUsers(connection.Id, "user-import-test.json", stream); // importUsersResponse.Should().NotBeNull(); // importUsersResponse.Id.Should().NotBeNull(); //} }
private static async Task TestJobsMethods(ManagementApiClient apiClient) { // Send an email verification request var emailRequest = new VerifyEmailJobRequest { UserId = "auth0|56443c91950b505a3399c3b3" }; var emailRequestResponse = await apiClient.Jobs.SendVerificationEmailAsync(emailRequest); // Get the job status var job = await apiClient.Jobs.GetAsync(emailRequestResponse.Id); // Send a user import request //using (FileStream fs = new FileStream("user-import-test.json", FileMode.Open)) //{ // var importUsersResponse = await apiClient.Jobs.ImportUsers("con_lQKQee7ZnEGc6OYH", "user-import-test.json", fs); //} }
/// <summary> /// Send an email to the specified user that asks them to click a link to verify their email address. /// </summary> /// <param name="request">The <see cref="VerifyEmailJobRequest"/> containing the information of the user whose email you want verified.</param> /// <returns>A <see cref="Job"/> instance containing the information about the job.</returns> public Task <Job> SendVerificationEmailAsync(VerifyEmailJobRequest request) { return(Connection.SendAsync <Job>(HttpMethod.Post, BuildUri("jobs/verification-email"), request, DefaultHeaders)); }
/// <summary> /// Send an email to the specified user that asks them to click a link to verify their email address. /// </summary> /// <param name="request">The <see cref="VerifyEmailJobRequest" /> containing the information of the user whose email you want verified.</param> /// <returns>A <see cref="Job" /> instance containing the information about the job.</returns> public Task<Job> SendVerificationEmail(VerifyEmailJobRequest request) { return Connection.PostAsync<Job>("jobs/verification-email", request, null, null, null, null, null); }
public Task <Job> SendVerificationEmail(VerifyEmailJobRequest request) { return(SendVerificationEmailAsync(request)); }
/// <summary> /// Send an email to the specified user that asks them to click a link to verify their email address. /// </summary> /// <param name="request">The <see cref="VerifyEmailJobRequest" /> containing the information of the user whose email you want verified.</param> /// <returns>A <see cref="Job" /> instance containing the information about the job.</returns> public Task <Job> SendVerificationEmailAsync(VerifyEmailJobRequest request) { return(Connection.PostAsync <Job>("jobs/verification-email", request, null, null, null, null, null)); }
public Task<Job> SendVerificationEmail(VerifyEmailJobRequest request) { return SendVerificationEmailAsync(request); }