diff --git a/src/Auth0.AuthenticationApi/AuthenticationApiClient.cs b/src/Auth0.AuthenticationApi/AuthenticationApiClient.cs index 92ef5f5c5..69393869c 100644 --- a/src/Auth0.AuthenticationApi/AuthenticationApiClient.cs +++ b/src/Auth0.AuthenticationApi/AuthenticationApiClient.cs @@ -1,10 +1,10 @@ -using System; +using Auth0.AuthenticationApi.Builders; +using Auth0.AuthenticationApi.Models; +using Auth0.Core.Http; +using System; using System.Collections.Generic; using System.Net.Http; using System.Threading.Tasks; -using Auth0.AuthenticationApi.Builders; -using Auth0.AuthenticationApi.Models; -using Auth0.Core.Http; namespace Auth0.AuthenticationApi { @@ -16,9 +16,6 @@ namespace Auth0.AuthenticationApi /// public class AuthenticationApiClient : IAuthenticationApiClient { - /// - /// The base URI - /// private readonly Uri _baseUri; private AuthenticationApiClient(Uri baseUri, ApiConnection connection) @@ -336,7 +333,13 @@ public async Task GetTokenAsync(ResourceOwnerTokenRequest r return response; } - /// + + /// + /// Gets information about the last API call made using this client. + /// + /// + /// A containing information about the last API call made. + /// public ApiInfo GetLastApiInfo() { return Connection.ApiInfo; @@ -414,7 +417,7 @@ public Task StartPasswordlessSmsFlowAsync(PasswordlessS /// Unlinks a secondary account from a primary account. /// /// The containing the information of the accounts to unlink. - /// Nothing + /// A that represents the asynchronous unlink operation. public async Task UnlinkUserAsync(UnlinkUserRequest request) { await Connection.PostAsync("unlink", request, null, null, null, null, null).ConfigureAwait(false); diff --git a/src/Auth0.Core/Http/ApiConnection.cs b/src/Auth0.Core/Http/ApiConnection.cs index 9b5a91000..b0783d18c 100644 --- a/src/Auth0.Core/Http/ApiConnection.cs +++ b/src/Auth0.Core/Http/ApiConnection.cs @@ -1,3 +1,5 @@ +using Auth0.Core.Exceptions; +using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; @@ -5,13 +7,11 @@ using System.Reflection; using System.Text; using System.Threading.Tasks; -using Auth0.Core.Exceptions; -using Newtonsoft.Json; namespace Auth0.Core.Http { /// - /// The communication layer between the various API clients and the actual API backend. + /// The communication layer between the API clients and the HTTP REST backend. /// public class ApiConnection : IApiConnection, IDisposable { @@ -26,12 +26,24 @@ public class ApiConnection : IApiConnection, IDisposable /// public ApiInfo ApiInfo { get; private set; } + /// + /// Creates a new instance of ApiConnection using an optional . + /// + /// A valid Auth0 Management API v2 token. + /// The URL of the tenant to manage. + /// An optional to modify outgoing requests. public ApiConnection(string token, string baseUrl, HttpMessageHandler handler = null) : this(token, baseUrl, new HttpClient(handler ?? new HttpClientHandler())) { _disposeHttpClient = true; } + /// + /// Creates a new instance of ApiConnection using a provided . + /// + /// A valid Auth0 Management API v2 token. + /// The URL of the tenant to manage. + /// A used to send outgoing requests. public ApiConnection(string token, string baseUrl, HttpClient httpClient) { _token = token; @@ -81,14 +93,6 @@ private void ApplyHeaders(HttpRequestMessage message, IDictionary - /// Builds the content of the message. This will build the appropriate for the request based - /// on the type of the parameters passed in. - /// - /// The body. - /// The parameters. - /// The file parameters. - /// HttpContent. private HttpContent BuildMessageContent(object body, IDictionary parameters, IList fileParameters) { @@ -123,13 +127,6 @@ private HttpContent BuildMessageContent(object body, IDictionary }), Encoding.UTF8, "application/json"); } - /// - /// Builds up the URL for the request by substituting values for URL segments and adding query string parameters. - /// - /// The resource. - /// The URL segments. - /// The query strings. - /// Uri. private Uri BuildRequestUri(string resource, IDictionary urlSegments, IDictionary queryStrings) { @@ -143,7 +140,7 @@ private Uri BuildRequestUri(string resource, IDictionary urlSegm /// The resource. /// The URL segments. /// - /// Task<T>. + /// A that represents the asynchronous Delete operation. public async Task DeleteAsync(string resource, IDictionary urlSegments, IDictionary queryStrings) where T : class { @@ -166,7 +163,7 @@ public async Task DeleteAsync(string resource, IDictionary /// The body. /// The URL segments. /// - /// Task<T>. + /// A that represents the asynchronous Delete operation. public async Task DeleteAsync(string resource, object body, IDictionary urlSegments, IDictionary queryStrings) where T : class { return await RunAsync(resource, @@ -210,13 +207,6 @@ public async Task GetAsync(string resource, IDictionary ur converters).ConfigureAwait(false); } - /// - /// Handles errors returned from the API. It will check the response code, deserialize any relevant JSON error payload - /// and throw an appropriate exception. - /// - /// The returned from the API. - /// A . - /// private async Task HandleErrors(HttpResponseMessage response) { if (!response.IsSuccessStatusCode) @@ -251,13 +241,13 @@ private async Task HandleErrors(HttpResponseMessage response) } /// - /// Performs an HTTP PATCH. + /// Performs an HTTP PATCH operation. /// /// /// The resource. /// The body. /// The URL segments. - /// Task<T>. + /// A that represents the asynchronous Patch operation. public async Task PatchAsync(string resource, object body, Dictionary urlSegments) where T : class { @@ -283,7 +273,7 @@ public async Task PatchAsync(string resource, object body, DictionaryThe URL segments. /// The headers. /// The query strings. - /// Task<T>. + /// A that represents the asynchronous Post operation. public async Task PostAsync(string resource, object body, IDictionary parameters, IList fileParameters, IDictionary urlSegments, IDictionary headers, IDictionary queryStrings) where T : class @@ -310,7 +300,7 @@ public async Task PostAsync(string resource, object body, IDictionaryThe URL segments. /// The headers. /// The query strings. - /// Task<T>. + /// A that represents the asynchronous Put operation. public async Task PutAsync(string resource, object body, IDictionary parameters, IList fileParameters, IDictionary urlSegments, IDictionary headers, IDictionary queryStrings) where T : class @@ -340,7 +330,7 @@ public async Task PutAsync(string resource, object body, IDictionaryThe headers. /// The file parameters. /// The list of to use during deserialization. - /// Task<T>. + /// A that represents the asynchronous Run operation. private async Task RunAsync(string resource, HttpMethod httpMethod, object body, IDictionary urlSegments, IDictionary queryStrings, IDictionary parameters, IDictionary headers, diff --git a/src/Auth0.ManagementApi/Clients/BlacklistedTokensClient.cs b/src/Auth0.ManagementApi/Clients/BlacklistedTokensClient.cs index 2c101c6a1..6450af7d0 100644 --- a/src/Auth0.ManagementApi/Clients/BlacklistedTokensClient.cs +++ b/src/Auth0.ManagementApi/Clients/BlacklistedTokensClient.cs @@ -22,7 +22,7 @@ public BlacklistedTokensClient(IApiConnection connection) /// /// Gets all the blacklisted claims. /// - /// The aud claim for which you want to get blacklisted tokens. This is your API Key. + /// The JWT's aud claim. The client_id of the client for which it was issued. /// A list of objects. public Task> GetAllAsync(string aud) { @@ -37,7 +37,7 @@ public Task> GetAllAsync(string aud) /// Blacklists a JWT token. /// /// The containing the information of the token to blacklist. - /// A indicating the request completion. + /// A that represents the asynchronous create operation. public Task CreateAsync(BlacklistedTokenCreateRequest request) { return Connection.PostAsync("blacklists/tokens", request, null, null, null, null, null); diff --git a/src/Auth0.ManagementApi/Clients/ClientBase.cs b/src/Auth0.ManagementApi/Clients/ClientBase.cs index ff79a164a..32e5f3f98 100644 --- a/src/Auth0.ManagementApi/Clients/ClientBase.cs +++ b/src/Auth0.ManagementApi/Clients/ClientBase.cs @@ -8,7 +8,7 @@ namespace Auth0.ManagementApi.Clients public class ClientBase { /// - /// The which is used to make all HTTPS REST calls. + /// The which is used to make all REST calls. /// internal IApiConnection Connection { get; } diff --git a/src/Auth0.ManagementApi/Clients/ClientGrantsClient.cs b/src/Auth0.ManagementApi/Clients/ClientGrantsClient.cs index cc85afd15..6afda550d 100644 --- a/src/Auth0.ManagementApi/Clients/ClientGrantsClient.cs +++ b/src/Auth0.ManagementApi/Clients/ClientGrantsClient.cs @@ -36,7 +36,7 @@ public Task CreateAsync(ClientGrantCreateRequest request) /// Deletes a client grant. /// /// The identifier of the Client Grant to delete. - /// A indicating the request completion. + /// A that represents the asynchronous delete operation. public Task DeleteAsync(string id) { return Connection.DeleteAsync("client-grants/{id}", @@ -51,7 +51,7 @@ public Task DeleteAsync(string id) /// /// Specifies criteria to use when querying client grants. /// Specifies to use in requesting paged results. - /// A containing the matching instances. + /// A containing the client grants requested. public Task> GetAllAsync(GetClientGrantsRequest request, PaginationInfo pagination) { if (request == null) diff --git a/src/Auth0.ManagementApi/Clients/ClientsClient.cs b/src/Auth0.ManagementApi/Clients/ClientsClient.cs index 262836583..bc114f641 100644 --- a/src/Auth0.ManagementApi/Clients/ClientsClient.cs +++ b/src/Auth0.ManagementApi/Clients/ClientsClient.cs @@ -39,7 +39,7 @@ public Task CreateAsync(ClientCreateRequest request) /// Deletes a client and all its related assets (like rules, connections, etc) given its id. /// /// The id of the client to delete. - /// A indicating the request completion. + /// A that represents the asynchronous delete operation. public Task DeleteAsync(string id) { return Connection.DeleteAsync("clients/{id}", @@ -111,7 +111,7 @@ public Task GetAsync(string id, string fields = null, bool includeFields /// /// Rotate a client secret. The generated secret is NOT base64 encoded. /// - /// The id of the client which secret needs to be rotated + /// The id of the client which secret needs to be rotated. /// The that has had its secret rotated. public Task RotateClientSecret(string id) { diff --git a/src/Auth0.ManagementApi/Clients/ConnectionsClient.cs b/src/Auth0.ManagementApi/Clients/ConnectionsClient.cs index 79ab713e6..51cd2b8cf 100644 --- a/src/Auth0.ManagementApi/Clients/ConnectionsClient.cs +++ b/src/Auth0.ManagementApi/Clients/ConnectionsClient.cs @@ -36,6 +36,7 @@ public Task CreateAsync(ConnectionCreateRequest request) /// Deletes a connection and all its users. /// /// The id of the connection to delete. + /// A that represents the asynchronous delete operation. public Task DeleteAsync(string id) { return Connection.DeleteAsync("connections/{id}", new Dictionary @@ -45,14 +46,14 @@ public Task DeleteAsync(string id) } /// - /// Deletes a specified connection user by its email. + /// Deletes a specified connection user by its . /// /// /// Currently only database connections are supported and you cannot delete all users from specific connection. /// - /// The identifier of the connection - /// The email of the user to delete - /// + /// The identifier of the connection. + /// The email of the user to delete. + /// A that represents the asynchronous delete operation. public Task DeleteUserAsync(string id, string email) { return Connection.DeleteAsync("connections/{id}/users", @@ -67,7 +68,7 @@ public Task DeleteUserAsync(string id, string email) } /// - /// Retrieves a connection by its + /// Retrieves a connection by its . /// /// The id of the connection to retrieve. /// A comma separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields. diff --git a/src/Auth0.ManagementApi/Clients/CustomDomainsClient.cs b/src/Auth0.ManagementApi/Clients/CustomDomainsClient.cs index 2e08cc2f2..4a23cd8a7 100644 --- a/src/Auth0.ManagementApi/Clients/CustomDomainsClient.cs +++ b/src/Auth0.ManagementApi/Clients/CustomDomainsClient.cs @@ -23,7 +23,7 @@ internal CustomDomainsClient(IApiConnection connection) /// Creates a new custom domain and returns it. /// /// A representing the new domain. - /// The new domain. + /// The containing the newly created custom domain. /// The custom domain will need to be verified before it starts accepting requests. public Task CreateAsync(CustomDomainCreateRequest request) { @@ -34,7 +34,7 @@ public Task CreateAsync(CustomDomainCreateRequest request) /// Deletes a custom domain by its ID. /// /// The ID of the domain to delete. - /// + /// A that represents the asyncronous delete operation. /// When deleted, Auth0 will stop serving requests for this domain. public Task DeleteAsync(string id) { @@ -48,7 +48,7 @@ public Task DeleteAsync(string id) /// /// Retrieves the status of every custom domain. /// - /// The list of custom domains + /// A containing the details of every custom domain. public Task> GetAllAsync() { return Connection.GetAsync>("custom-domains", null, null, null, null); @@ -58,7 +58,7 @@ public Task> GetAllAsync() /// Retrieves a custom domain status by its ID /// /// The ID of the domain to retrieve. - /// The domain. + /// The that was requested. public Task GetAsync(string id) { return Connection.GetAsync("custom-domains/{id}", @@ -73,7 +73,7 @@ public Task GetAsync(string id) /// Run the verification process for the custom domain. /// /// The ID of the domain to verify. - /// + /// The that was requested. public Task VerifyAsync(string id) { return Connection.PostAsync("custom-domains/{id}/verify", null, null, null, diff --git a/src/Auth0.ManagementApi/Clients/DeviceCredentialsClient.cs b/src/Auth0.ManagementApi/Clients/DeviceCredentialsClient.cs index afc204c34..d5a02ca73 100644 --- a/src/Auth0.ManagementApi/Clients/DeviceCredentialsClient.cs +++ b/src/Auth0.ManagementApi/Clients/DeviceCredentialsClient.cs @@ -24,9 +24,9 @@ public DeviceCredentialsClient(ApiConnection connection) /// /// A comma separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields. /// True if the fields specified are to be excluded from the result, false otherwise (defaults to true). - /// The user id of the devices to retrieve + /// The user id of the devices to retrieve. /// The client id of the devices to retrieve. - /// The type of credentials + /// The type of credentials. /// A list of which conforms to the criteria specified. public Task> GetAllAsync(string fields = null, bool includeFields = true, string userId = null, string clientId = null, string type = null) { @@ -45,7 +45,7 @@ public Task> GetAllAsync(string fields = null, bool incl /// Creates a new device credential. /// /// The request containing the details of the device credential to create. - /// Tnew newly created + /// The newly created . public Task CreateAsync(DeviceCredentialCreateRequest request) { return Connection.PostAsync("device-credentials", request, null, null, null, null, null); @@ -54,7 +54,8 @@ public Task CreateAsync(DeviceCredentialCreateRequest request) /// /// Deletes a device credential. /// - /// The id of the device credential to delete + /// The id of the device credential to delete. + /// A that represents the asynchronous delete operation. public Task DeleteAsync(string id) { return Connection.DeleteAsync("device-credentials/{id}", diff --git a/src/Auth0.ManagementApi/Clients/EmailProviderClient.cs b/src/Auth0.ManagementApi/Clients/EmailProviderClient.cs index 84437fa15..90344edf1 100644 --- a/src/Auth0.ManagementApi/Clients/EmailProviderClient.cs +++ b/src/Auth0.ManagementApi/Clients/EmailProviderClient.cs @@ -5,7 +5,9 @@ namespace Auth0.ManagementApi.Clients { - /// + /// + /// Contains all the methods to call the /emails/provider endpoints. + /// @@ -33,7 +35,7 @@ public Task ConfigureAsync(EmailProviderConfigureRequest request) /// /// Deletes the email provider. /// - /// + /// A that represents the asynchronous delete operation. public Task DeleteAsync() { return Connection.DeleteAsync("emails/provider", null, null); diff --git a/src/Auth0.ManagementApi/Clients/EmailTemplatesClient.cs b/src/Auth0.ManagementApi/Clients/EmailTemplatesClient.cs index 8c9098466..66b6cbf8d 100644 --- a/src/Auth0.ManagementApi/Clients/EmailTemplatesClient.cs +++ b/src/Auth0.ManagementApi/Clients/EmailTemplatesClient.cs @@ -24,10 +24,10 @@ public EmailTemplatesClient(IApiConnection connection) } /// - /// Creates a new email template + /// Creates a new email template. /// - /// The containing details of the template to create - /// + /// The containing details of the template to create. + /// The newly created . public Task CreateAsync(EmailTemplateCreateRequest request) { return Connection.PostAsync("email-templates", request, null, null, null, null, null); @@ -36,8 +36,8 @@ public Task CreateAsync(EmailTemplateCreateRequest request) /// /// Gets an email template. /// - /// The name of template you wish to retrieve - /// + /// The name of email template you wish to retrieve. + /// The that was requested. public Task GetAsync(EmailTemplateName templateName) { return Connection.GetAsync("email-templates/{templateName}", @@ -48,11 +48,11 @@ public Task GetAsync(EmailTemplateName templateName) } /// - /// Updates an email template + /// Updates an email template. /// - /// The name of the template to update - /// The containing details of the template to patch - /// + /// The name of the email template to update. + /// The containing details of the template to patch. + /// The newly updated . public Task PatchAsync(EmailTemplateName templateName, EmailTemplatePatchRequest request) { return Connection.PatchAsync("email-templates/{templateName}", request, new Dictionary @@ -62,11 +62,11 @@ public Task PatchAsync(EmailTemplateName templateName, EmailTempl } /// - /// Updates an email template + /// Updates an email template. /// - /// The name of the template to patch - /// The containing details of the template to update - /// + /// The name of the email template to patch. + /// The containing details of the template to update. + /// The newly updated . public Task UpdateAsync(EmailTemplateName templateName, EmailTemplateUpdateRequest request) { return Connection.PutAsync("email-templates/{templateName}", request, null, null, new Dictionary diff --git a/src/Auth0.ManagementApi/Clients/GuardianClient.cs b/src/Auth0.ManagementApi/Clients/GuardianClient.cs index b37294ab1..0d3bec51d 100644 --- a/src/Auth0.ManagementApi/Clients/GuardianClient.cs +++ b/src/Auth0.ManagementApi/Clients/GuardianClient.cs @@ -39,7 +39,7 @@ public Task CreateEnrollmentTicketAsync( /// Deletes an enrollment. /// /// The ID of the enrollment to delete. - /// A that completes when the delete is completed. + /// A that represents the asynchronous delete operation. public Task DeleteEnrollmentAsync(string id) { return Connection diff --git a/src/Auth0.ManagementApi/Clients/JobsClient.cs b/src/Auth0.ManagementApi/Clients/JobsClient.cs index 74835cdfa..e721a2a62 100644 --- a/src/Auth0.ManagementApi/Clients/JobsClient.cs +++ b/src/Auth0.ManagementApi/Clients/JobsClient.cs @@ -6,7 +6,9 @@ namespace Auth0.ManagementApi.Clients { - /// + /// + /// Contains all the methods to call the /jobs endpoints. + /// public class JobsClient : ClientBase { /// @@ -45,8 +47,8 @@ public Task GetAsync(string id) /// The connection identifier. /// Name of the file. /// The file. - /// Update the user if already exists - /// Customer defined id + /// Whether to update the user if already exists. + /// Customer defined id. /// A instance containing the information about the job. public Task ImportUsersAsync(string connectionId, string fileName, Stream file, bool? upsert = null, string externalId = null) { diff --git a/src/Auth0.ManagementApi/Clients/ResourceServersClient.cs b/src/Auth0.ManagementApi/Clients/ResourceServersClient.cs index e560ec6b9..9a43adc86 100644 --- a/src/Auth0.ManagementApi/Clients/ResourceServersClient.cs +++ b/src/Auth0.ManagementApi/Clients/ResourceServersClient.cs @@ -21,20 +21,20 @@ public ResourceServersClient(IApiConnection connection) : base(connection) } /// - /// Creates a new resource server + /// Creates a new resource server. /// - /// Contains the information for the resource server to create - /// + /// Contains the information for the resource server to create. + /// The newly created . public Task CreateAsync(ResourceServerCreateRequest request) { return Connection.PostAsync("resource-servers", request, null, null, null, null, null); } /// - /// Deletes a resource server + /// Deletes a resource server. /// - /// The id of the resource server to delete - /// + /// The id of the resource server to delete. + /// A that represents the asynchronous delete operation. public Task DeleteAsync(string id) { return Connection.DeleteAsync("resource-servers/{id}", new Dictionary @@ -44,10 +44,10 @@ public Task DeleteAsync(string id) } /// - /// Get a resource server by its id + /// Get a resource server by its id. /// - /// The id of the resource server - /// A + /// The id of the resource server. + /// The that was requested. public Task GetAsync(string id) { return Connection.GetAsync("resource-servers/{id}", @@ -75,11 +75,11 @@ public Task> GetAllAsync(PaginationInfo pagination) } /// - /// Updates a resource server + /// Updates a resource server, /// - /// The id of the resource server to update - /// Contains the information for the resource server to update - /// + /// The id of the resource server to update. + /// Contains the information for the resource server to update. + /// The newly updated . public Task UpdateAsync(string id, ResourceServerUpdateRequest request) { return Connection.PatchAsync("resource-servers/{id}", request, new Dictionary diff --git a/src/Auth0.ManagementApi/Clients/RolesClient.cs b/src/Auth0.ManagementApi/Clients/RolesClient.cs index fd59f7992..af2b8f07e 100644 --- a/src/Auth0.ManagementApi/Clients/RolesClient.cs +++ b/src/Auth0.ManagementApi/Clients/RolesClient.cs @@ -16,7 +16,7 @@ public class RolesClient : ClientBase /// /// Initializes a new instance of the class. /// - /// The connection. + /// The to use. public RolesClient(ApiConnection connection) : base(connection) { @@ -25,7 +25,7 @@ public RolesClient(ApiConnection connection) /// /// Creates a new role according to the request. /// - /// The containing the details of the role to create. + /// The containing the details of the role to create. /// The newly created . public Task CreateAsync(RoleCreateRequest request) { @@ -36,7 +36,7 @@ public Task CreateAsync(RoleCreateRequest request) /// Deletes a role. /// /// The ID of the role to delete. - /// Task. + /// A that represents the asynchronous delete operation. public Task DeleteAsync(string id) { return Connection.DeleteAsync("roles/{id}", new Dictionary @@ -45,7 +45,11 @@ public Task DeleteAsync(string id) }, null); } - /// + /// + /// Retrieves a list of all roles. + /// + /// Specifies criteria to use when querying roles. + /// An containing the roles public Task> GetAllAsync(GetRolesRequest request) { if (request == null) @@ -58,7 +62,12 @@ public Task> GetAllAsync(GetRolesRequest request) }, null, new PagedListConverter("roles")); } - /// + /// + /// Retrieves a list of all roles. + /// + /// Specifies criteria to use when querying roles. + /// Specifies pagination info to use when requesting paged results. + /// An containing the roles requested. public Task> GetAllAsync(GetRolesRequest request, PaginationInfo pagination) { if (request == null) @@ -76,7 +85,11 @@ public Task> GetAllAsync(GetRolesRequest request, PaginationInf }, null, new PagedListConverter("roles")); } - /// + /// + /// Retrieves a role by its ID. + /// + /// The ID of the role to retrieve. + /// The that was requested. public Task GetAsync(string id) { return Connection.GetAsync("roles/{id}", @@ -86,7 +99,12 @@ public Task GetAsync(string id) }, null, null, null); } - /// + /// + /// Updates a role. + /// + /// The ID of the role to update. + /// A containing the information to update. + /// The newly updated . public Task UpdateAsync(string id, RoleUpdateRequest request) { return Connection.PatchAsync("roles/{id}", request, new Dictionary @@ -95,7 +113,11 @@ public Task UpdateAsync(string id, RoleUpdateRequest request) }); } - /// + /// + /// Retrieves a list of users associated with a role. + /// + /// The ID of the role to query. + /// An containing the assigned users. public Task> GetUsersAsync(string id) { return Connection.GetAsync>("roles/{id}/users", @@ -105,7 +127,12 @@ public Task> GetUsersAsync(string id) }, null, null, new PagedListConverter("users")); } - /// + /// + /// Retrieves a list of users associated with a role. + /// + /// The ID of the role to query. + /// Specifies to use in requesting paged results. + /// An containing the assigned user. public Task> GetUsersAsync(string id, PaginationInfo pagination) { return Connection.GetAsync>("roles/{id}/users", @@ -118,7 +145,12 @@ public Task> GetUsersAsync(string id, PaginationInfo pa }, null, null, new PagedListConverter("users")); } - /// + /// + /// Assigns Users to a role. + /// + /// The ID of the role to assign users to. + /// A containing the user IDs to assign to the role. + /// A that represents the asynchronous assign operation. public Task AssignUsersAsync(string id, AssignUsersRequest request) { return Connection.PostAsync("roles/{id}/users", request, null, null, diff --git a/src/Auth0.ManagementApi/Clients/RulesClient.cs b/src/Auth0.ManagementApi/Clients/RulesClient.cs index 7a114d59b..c70d99c41 100644 --- a/src/Auth0.ManagementApi/Clients/RulesClient.cs +++ b/src/Auth0.ManagementApi/Clients/RulesClient.cs @@ -36,6 +36,7 @@ public Task CreateAsync(RuleCreateRequest request) /// Deletes a rule. /// /// The ID of the rule to delete. + /// A that represents the asynchronous delete operation. public Task DeleteAsync(string id) { return Connection.DeleteAsync("rules/{id}", @@ -50,7 +51,7 @@ public Task DeleteAsync(string id) /// /// Specifies criteria to use when querying rules. /// Specifies pagination info to use when requesting paged results. - /// An containing the rules + /// An containing the rules requested. public Task> GetAllAsync(GetRulesRequest request, PaginationInfo pagination) { if (request == null) @@ -83,7 +84,7 @@ public Task> GetAllAsync(GetRulesRequest request, PaginationInf /// True if the fields specified are to be included in the result, false otherwise (defaults to /// true). /// - /// The . + /// The that was requested. public Task GetAsync(string id, string fields = null, bool includeFields = true) { return Connection.GetAsync("rules/{id}", @@ -103,7 +104,7 @@ public Task GetAsync(string id, string fields = null, bool includeFields = /// /// The ID of the rule to update. /// A containing the information to update. - /// + /// The newly updated . public Task UpdateAsync(string id, RuleUpdateRequest request) { return Connection.PatchAsync("rules/{id}", request, new Dictionary diff --git a/src/Auth0.ManagementApi/Clients/TenantSettingsClient.cs b/src/Auth0.ManagementApi/Clients/TenantSettingsClient.cs index d3116418a..5d4967aff 100644 --- a/src/Auth0.ManagementApi/Clients/TenantSettingsClient.cs +++ b/src/Auth0.ManagementApi/Clients/TenantSettingsClient.cs @@ -23,12 +23,12 @@ public TenantSettingsClient(IApiConnection connection) /// Gets the settings for the tenant. /// /// - /// A comma separated list of fields to include or exclude (depending on includeFields) from the - /// result, empty to retrieve all fields + /// A comma-separated list of fields to include or exclude (depending on includeFields) from the + /// result, empty to retrieve all fields. /// /// /// if the fields specified are to be included in the result, otherwise (defaults to - /// ) + /// ). /// /// A containing the settings for the tenant. public Task GetAsync(string fields = null, bool includeFields = true) diff --git a/src/Auth0.ManagementApi/Clients/TicketsClient.cs b/src/Auth0.ManagementApi/Clients/TicketsClient.cs index 00c4a62d7..38d2b44e0 100644 --- a/src/Auth0.ManagementApi/Clients/TicketsClient.cs +++ b/src/Auth0.ManagementApi/Clients/TicketsClient.cs @@ -22,7 +22,7 @@ public TicketsClient(IApiConnection connection) /// Creates an email verification ticket. /// /// The containing the details of the ticket to create. - /// The . + /// The newly created . public Task CreateEmailVerificationTicketAsync(EmailVerificationTicketRequest request) { return Connection.PostAsync("tickets/email-verification", request, null, null, null, null, null); @@ -32,7 +32,7 @@ public Task CreateEmailVerificationTicketAsync(EmailVerificationTicketRe /// Creates a password change ticket. /// /// The containing the details of the ticket to create. - /// The . + /// The newly created . public Task CreatePasswordChangeTicketAsync(PasswordChangeTicketRequest request) { return Connection.PostAsync("tickets/password-change", request, null, null, null, null, null); diff --git a/src/Auth0.ManagementApi/Clients/UserBlocksClient.cs b/src/Auth0.ManagementApi/Clients/UserBlocksClient.cs index 951bcc9dc..f5e8cc162 100644 --- a/src/Auth0.ManagementApi/Clients/UserBlocksClient.cs +++ b/src/Auth0.ManagementApi/Clients/UserBlocksClient.cs @@ -6,7 +6,7 @@ namespace Auth0.ManagementApi.Clients { /// - /// Contains all the methods for the /user-blocks endpoints + /// Contains all the methods for the /user-blocks endpoints. /// public class UserBlocksClient : ClientBase { @@ -22,8 +22,8 @@ public UserBlocksClient(IApiConnection connection) /// /// Get a user's blocks by identifier. /// - /// The identifier of the user. Can be a user's email address, username or phone number - /// + /// The identifier of the user. Can be a user's email address, username or phone number. + /// The relating to the user requested. public Task GetByIdentifierAsync(string identifier) { return Connection.GetAsync("user-blocks", @@ -37,8 +37,8 @@ public Task GetByIdentifierAsync(string identifier) /// /// Get a user's blocks by user id. /// - /// The id of the user - /// + /// The id of the user. + /// The relating to the user requested. public Task GetByUserIdAsync(string id) { return Connection.GetAsync("user-blocks/{id}", @@ -52,8 +52,8 @@ public Task GetByUserIdAsync(string id) /// /// Unblock a user by their identifier. /// - /// The identifier of the user. Can be a user's email address, username or phone number - /// + /// The identifier of the user to unblock. Can be a user's email address, username or phone number. + /// A that represents the asynchronous unblock operation. public Task UnblockByIdentifierAsync(string identifier) { return Connection.DeleteAsync("user-blocks", @@ -67,8 +67,8 @@ public Task UnblockByIdentifierAsync(string identifier) /// /// Unblock a user by their id. /// - /// The id of the user - /// + /// The id of the user to unblock. + /// A that represents the asynchronous unblock operation. public Task UnblockByUserIdAsync(string id) { return Connection.DeleteAsync("user-blocks/{id}", diff --git a/src/Auth0.ManagementApi/Clients/UsersClient.cs b/src/Auth0.ManagementApi/Clients/UsersClient.cs index dc7a0d69d..3984bc094 100644 --- a/src/Auth0.ManagementApi/Clients/UsersClient.cs +++ b/src/Auth0.ManagementApi/Clients/UsersClient.cs @@ -27,7 +27,7 @@ public UsersClient(ApiConnection connection) /// /// The ID of the user to assign roles to. /// A containing the role IDs to assign to the user. - /// + /// A that represents the asynchronous assign operation. public Task AssignRolesAsync(string id, AssignRolesRequest request) { return Connection.PostAsync("users/{id}/roles", request, null, null, @@ -41,7 +41,7 @@ public Task AssignRolesAsync(string id, AssignRolesRequest request) /// Creates a new user. /// /// The containing the properties of the user to create. - /// + /// The newly created . public Task CreateAsync(UserCreateRequest request) { return Connection.PostAsync("users", request, null, null, null, null, null); @@ -51,6 +51,7 @@ public Task CreateAsync(UserCreateRequest request) /// Deletes a user. /// /// The id of the user to delete. + /// A that represents the asynchronous delete operation. public Task DeleteAsync(string id) { if (string.IsNullOrWhiteSpace(id)) @@ -67,8 +68,8 @@ public Task DeleteAsync(string id) /// Deletes a user's multifactor provider. /// /// The id of the user who multi factor provider to delete. - /// The type of the multifactor provider. Supported values 'duo' or 'google-authenticator' - /// + /// The type of the multifactor provider. Supported values 'duo' or 'google-authenticator'. + /// A that represents the asynchronous delete operation. public Task DeleteMultifactorProviderAsync(string id, string provider) { return Connection.DeleteAsync("users/{id}/multifactor/{provider}", @@ -119,7 +120,7 @@ public Task> GetAllAsync(GetUsersRequest request, PaginationInf /// true if the fields specified are to be included in the result, false otherwise (defaults to /// true) /// - /// The . + /// The that was requested. public Task GetAsync(string id, string fields = null, bool includeFields = true) { return Connection.GetAsync("users/{id}", @@ -164,7 +165,7 @@ public Task> GetLogsAsync(GetUserLogsRequest request, Pagin /// /// Retrieve assigned roles for a specific user. /// - /// The user id of the roles to retrieve + /// The user id of the roles to retrieve. /// Specifies pagination info to use when requesting paged results. /// An containing the roles for the user. public Task> GetRolesAsync(string userId, PaginationInfo pagination) @@ -188,10 +189,10 @@ public Task> GetRolesAsync(string userId, PaginationInfo pagina /// /// Gets all users by email address. /// - /// The email address to search for - /// A comma separated list of fields to include or exclude (depending on ) from the result, null to retrieve all fields - /// true if the fields specified are to be included in the result, false otherwise. Defaults to true - /// + /// The email address to search for. + /// A comma separated list of fields to include or exclude (depending on ) from the result, null to retrieve all fields. + /// true if the fields specified are to be included in the result, false otherwise. Defaults to true. + /// A containing all users for this email address. public Task> GetUsersByEmailAsync(string email, string fields = null, bool? includeFields = null) { return Connection.GetAsync>("users-by-email", null, @@ -208,7 +209,7 @@ public Task> GetUsersByEmailAsync(string email, string fields = null /// /// The ID of the primary account. /// The containing details of the secondary account to link. - /// + /// A containing details about this account link. public Task> LinkAccountAsync(string id, UserAccountLinkRequest request) { return Connection.PostAsync>("users/{id}/identities", request, null, null, new Dictionary @@ -223,7 +224,7 @@ public Task> LinkAccountAsync(string id, UserAccountL /// The ID of the primary account. /// The JWT of the primary account. /// The JWT for the secondary account you wish to link. - /// + /// A containing details about this account link. public Task> LinkAccountAsync(string id, string primaryJwtToken, string secondaryJwtToken) { var request = new UserAccountJwtLinkRequest @@ -245,7 +246,7 @@ public Task> LinkAccountAsync(string id, string prima /// /// The ID of the user to remove roles from. /// A containing the role IDs to remove to the user. - /// + /// A that represents the asynchronous remove operation. public Task RemoveRolesAsync(string id, AssignRolesRequest request) { return Connection.DeleteAsync("users/{id}/roles", request, new Dictionary @@ -260,8 +261,8 @@ public Task RemoveRolesAsync(string id, AssignRolesRequest request) /// /// The ID of the primary account. /// The type of the identity provider. - /// The ID for the secondary account - /// + /// The ID for the secondary account. + /// A containing details about this account link. public Task> UnlinkAccountAsync(string primaryUserId, string provider, string secondaryUserId) { return Connection.DeleteAsync>("users/{id}/identities/{provider}/{secondaryid}", new Dictionary @@ -277,7 +278,7 @@ public Task> UnlinkAccountAsync(string primaryUserId, /// /// The id of the user to update. /// The containing the information you wish to update. - /// + /// The newly updated . public Task UpdateAsync(string id, UserUpdateRequest request) { return Connection.PatchAsync("users/{id}", request, new Dictionary diff --git a/src/Auth0.ManagementApi/ManagementApiClient.cs b/src/Auth0.ManagementApi/ManagementApiClient.cs index 989c8d4ac..76df085dc 100644 --- a/src/Auth0.ManagementApi/ManagementApiClient.cs +++ b/src/Auth0.ManagementApi/ManagementApiClient.cs @@ -144,9 +144,9 @@ private ManagementApiClient(string token, Uri baseUri, ApiConnection apiConnecti /// /// Initializes a new instance of the class. /// - /// The token. - /// The base URI. - /// The which is used for HTTP requests + /// A valid Auth0 Management API v2 token. + /// The URL of the tenant to manage. + /// The which is used for HTTP requests. public ManagementApiClient(string token, Uri baseUri, HttpMessageHandler handler) : this(token, baseUri, new ApiConnection(token, baseUri.AbsoluteUri, handler)) { @@ -155,9 +155,9 @@ public ManagementApiClient(string token, Uri baseUri, HttpMessageHandler handler /// /// Initializes a new instance of the class. /// - /// The token. - /// The base URI. - /// The which is used for HTTP requests + /// A valid Auth0 Management API v2 token. + /// The URL of the tenant to manage. + /// The which is used for HTTP requests. public ManagementApiClient(string token, Uri baseUri, HttpClient httpClient) : this(token, baseUri, new ApiConnection(token, baseUri.AbsoluteUri, httpClient)) { @@ -166,8 +166,8 @@ public ManagementApiClient(string token, Uri baseUri, HttpClient httpClient) /// /// Initializes a new instance of the class. /// - /// The token. - /// The base URI. + /// A valid Auth0 Management API v2 token. + /// The URL of the tenant to manage. public ManagementApiClient(string token, Uri baseUri) : this(token, baseUri, (HttpMessageHandler)null) { @@ -176,9 +176,9 @@ public ManagementApiClient(string token, Uri baseUri) /// /// Initializes a new instance of the class. /// - /// The token. - /// Your Auth0 domain, e.g. tenant.auth0.com. - /// The which is used for HTTP requests + /// A valid Auth0 Management API v2 token. + /// Your Auth0 domain. tenant.auth0.com + /// The which is used for HTTP requests. public ManagementApiClient(string token, string domain, HttpMessageHandler handler) : this(token, new Uri($"https://{domain}/api/v2"), handler) { @@ -187,9 +187,9 @@ public ManagementApiClient(string token, string domain, HttpMessageHandler handl /// /// Initializes a new instance of the class. /// - /// The token. - /// Your Auth0 domain, e.g. tenant.auth0.com. - /// The which is used for HTTP requests + /// A valid Auth0 Management API v2 token. + /// Your Auth0 domain. tenant.auth0.com + /// The which is used for HTTP requests. public ManagementApiClient(string token, string domain, HttpClient httpClient) : this(token, new Uri($"https://{domain}/api/v2"), httpClient) {