Class ConnectionsClient
- Namespace
- Auth0.ManagementApi.Clients
- Assembly
- Auth0.ManagementApi.dll
Contains methods to access the /connections endpoints.
public class ConnectionsClient : BaseClient, IConnectionsClient
- Inheritance
-
ConnectionsClient
- Implements
- Inherited Members
Constructors
ConnectionsClient(IManagementConnection, Uri, IDictionary<string, string>)
Initializes a new instance of the ConnectionsClient.
public ConnectionsClient(IManagementConnection connection, Uri baseUri, IDictionary<string, string> defaultHeaders)
Parameters
connection
IManagementConnectionIManagementConnection used to make all API calls.
baseUri
UriUri of the endpoint to use in making API calls.
defaultHeaders
IDictionary<string, string>Dictionary containing default headers included with every request this client makes.
Methods
CheckStatusAsync(string, CancellationToken)
Retrieves the status of an ad/ldap connection.
public Task CheckStatusAsync(string id, CancellationToken cancellationToken = default)
Parameters
id
stringID of the connection to check.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
CreateAsync(ConnectionCreateRequest, CancellationToken)
Creates a new connection according to the request.
public Task<Connection> CreateAsync(ConnectionCreateRequest request, CancellationToken cancellationToken = default)
Parameters
request
ConnectionCreateRequestThe request containing the properties for the new connection.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
- Task<Connection>
A Connection containing the newly created Connection.
CreateScimConfigurationAsync(string, ScimConfigurationCreateRequest, CancellationToken)
Creates an ScimConfiguration.
public Task<ScimConfiguration> CreateScimConfigurationAsync(string id, ScimConfigurationCreateRequest request, CancellationToken cancellationToken = default)
Parameters
id
stringThe id of the connection to create an ScimConfiguration
request
ScimConfigurationCreateRequestScimConfigurationCreateRequest containing information required for creating an ScimConfiguration
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
CreateScimTokenAsync(string, ScimTokenCreateRequest, CancellationToken)
Creates an ScimToken.
public Task<ScimTokenCreateResponse> CreateScimTokenAsync(string id, ScimTokenCreateRequest request, CancellationToken cancellationToken = default)
Parameters
id
stringThe id of the connection to create an ScimToken
request
ScimTokenCreateRequestScimTokenCreateRequest containing information required for creating an ScimToken
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
DeleteAsync(string, CancellationToken)
Deletes a connection and all its users.
public Task DeleteAsync(string id, CancellationToken cancellationToken = default)
Parameters
id
stringThe id of the connection to delete.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
DeleteScimConfigurationAsync(string, CancellationToken)
Deletes an ScimConfiguration.
public Task DeleteScimConfigurationAsync(string id, CancellationToken cancellationToken = default)
Parameters
id
stringThe id of the connection to delete its SCIM configuration
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
DeleteScimTokenAsync(string, string, CancellationToken)
Deletes an SCIM token.
public Task DeleteScimTokenAsync(string id, string tokenId, CancellationToken cancellationToken = default)
Parameters
id
stringThe ID of the connection that owns the ScimToken to be deleted
tokenId
stringThe ID of the ScimToken to delete
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
DeleteUserAsync(string, string, CancellationToken)
Deletes a specified connection user by its email
.
public Task DeleteUserAsync(string id, string email, CancellationToken cancellationToken = default)
Parameters
id
stringThe identifier of the connection.
email
stringThe email of the user to delete.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
Remarks
Currently only database connections are supported and you cannot delete all users from specific connection.
GetAllAsync(GetConnectionsRequest, CheckpointPaginationInfo, CancellationToken)
Retrieves every connection matching the specified strategy. All connections are retrieved if no strategy is being specified. Accepts a list of fields to include or exclude in the resulting list of connection objects.
public Task<ICheckpointPagedList<Connection>> GetAllAsync(GetConnectionsRequest request, CheckpointPaginationInfo pagination = null, CancellationToken cancellationToken = default)
Parameters
request
GetConnectionsRequestpagination
CheckpointPaginationInfocancellationToken
CancellationToken
Returns
- Task<ICheckpointPagedList<Connection>>
List of Connection
GetAllAsync(GetConnectionsRequest, PaginationInfo, CancellationToken)
Retrieves every connection matching the specified strategy. All connections are retrieved if no strategy is being specified. Accepts a list of fields to include or exclude in the resulting list of connection objects.
public Task<IPagedList<Connection>> GetAllAsync(GetConnectionsRequest request, PaginationInfo pagination = null, CancellationToken cancellationToken = default)
Parameters
request
GetConnectionsRequestSpecifies criteria to use when querying connections.
pagination
PaginationInfoSpecifies pagination info to use when requesting paged results.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
- Task<IPagedList<Connection>>
An IPagedList<T> containing the list of connections.
GetAsync(string, string, bool, CancellationToken)
Retrieves a connection by its id
.
public Task<Connection> GetAsync(string id, string fields = null, bool includeFields = true, CancellationToken cancellationToken = default)
Parameters
id
stringThe id of the connection to retrieve.
fields
stringA comma separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields.
includeFields
boolTrue if the fields specified are to be included in the result, false otherwise (defaults to true).
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
- Task<Connection>
The Connection.
GetDefaultScimMappingAsync(string, CancellationToken)
Retrieves the default ScimMapping.
public Task<IList<ScimMapping>> GetDefaultScimMappingAsync(string id, CancellationToken cancellationToken = default)
Parameters
id
stringThe id of the connection to retrieve its default ScimMapping
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
- Task<IList<ScimMapping>>
An IList of ScimMapping.
GetScimConfigurationAsync(string, CancellationToken)
Retrieves an ScimConfiguration.
public Task<ScimConfiguration> GetScimConfigurationAsync(string id, CancellationToken cancellationToken = default)
Parameters
id
stringThe id of the connection to retrieve its ScimConfiguration
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
GetScimTokenAsync(string, CancellationToken)
Retrieves all ScimToken for the given connection.
public Task<IList<ScimToken>> GetScimTokenAsync(string id, CancellationToken cancellationToken = default)
Parameters
id
stringThe id of the connection to retrieve its ScimToken
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
UpdateAsync(string, ConnectionUpdateRequest, CancellationToken)
Updates a connection.
public Task<Connection> UpdateAsync(string id, ConnectionUpdateRequest request, CancellationToken cancellationToken = default)
Parameters
id
stringThe id of the connection to update.
request
ConnectionUpdateRequestThe ConnectionUpdateRequest containing the properties of the connection you wish to update.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
- Task<Connection>
The Connection that has been updated.
UpdateScimConfigurationAsync(string, ScimConfigurationUpdateRequest, CancellationToken)
Updates an ScimConfigurationn.
public Task<ScimConfiguration> UpdateScimConfigurationAsync(string id, ScimConfigurationUpdateRequest request, CancellationToken cancellationToken = default)
Parameters
id
stringThe id of the connection to update its SCIM configuration
request
ScimConfigurationUpdateRequestScimConfigurationUpdateRequest containing information required for updating an ScimConfiguration
cancellationToken
CancellationTokenThe cancellation token to cancel operation.