use of com.auth0.json.mgmt.client.Client in project auth0-java by auth0.
the class UserBlocksEntity method deleteByIdentifier.
/**
* Delete any existing User Blocks for a given identifier. A token with scope update:users is needed.
* See https://auth0.com/docs/api/management/v2#!/User_Blocks/delete_user_blocks
*
* @param identifier the identifier. Either a username, phone_number, or email.
* @return a Request to execute.
*/
public Request<Void> deleteByIdentifier(String identifier) {
Asserts.assertNotNull(identifier, "identifier");
String url = baseUrl.newBuilder().addPathSegments("api/v2/user-blocks").addQueryParameter("identifier", identifier).build().toString();
VoidRequest request = new VoidRequest(client, url, "DELETE");
request.addHeader("Authorization", "Bearer " + apiToken);
return request;
}
use of com.auth0.json.mgmt.client.Client in project auth0-java by auth0.
the class UsersEntity method deleteMultifactorProvider.
/**
* Delete an existing User's Multifactor Provider.
* A token with scope update:users is needed.
* See https://auth0.com/docs/api/management/v2#!/Users/delete_multifactor_by_provider
*
* @param userId the user id
* @param provider the multifactor provider
* @return a Request to execute.
*/
public Request<Void> deleteMultifactorProvider(String userId, String provider) {
Asserts.assertNotNull(userId, "user id");
Asserts.assertNotNull(provider, "provider");
String url = baseUrl.newBuilder().addPathSegments("api/v2/users").addPathSegment(userId).addPathSegment("multifactor").addPathSegment(provider).build().toString();
VoidRequest request = new VoidRequest(client, url, "DELETE");
request.addHeader("Authorization", "Bearer " + apiToken);
return request;
}
use of com.auth0.json.mgmt.client.Client in project auth0-java by auth0.
the class ClientsEntity method delete.
/**
* Delete an existing Application. A token with scope delete:clients is needed.
* See https://auth0.com/docs/api/management/v2#!/Clients/delete_clients_by_id
*
* @param clientId the application's client id.
* @return a Request to execute.
*/
public Request<Void> delete(String clientId) {
Asserts.assertNotNull(clientId, "client id");
String url = baseUrl.newBuilder().addPathSegments("api/v2/clients").addPathSegment(clientId).build().toString();
VoidRequest request = new VoidRequest(client, url, "DELETE");
request.addHeader("Authorization", "Bearer " + apiToken);
return request;
}
use of com.auth0.json.mgmt.client.Client in project auth0-java by auth0.
the class ConnectionsEntity method delete.
/**
* Delete an existing Connection. A token with scope delete:connections is needed.
* See https://auth0.com/docs/api/management/v2#!/Connections/delete_connections_by_id
*
* @param connectionId the connection id.
* @return a Request to execute.
*/
public Request<Void> delete(String connectionId) {
Asserts.assertNotNull(connectionId, "connection id");
String url = baseUrl.newBuilder().addPathSegments("api/v2/connections").addPathSegment(connectionId).build().toString();
VoidRequest request = new VoidRequest(client, url, "DELETE");
request.addHeader("Authorization", "Bearer " + apiToken);
return request;
}
use of com.auth0.json.mgmt.client.Client in project auth0-java by auth0.
the class DeviceCredentialsEntity method delete.
/**
* Delete an existing Device Credentials. A token with scope delete:device_credentials is needed.
* See https://auth0.com/docs/api/management/v2#!/Device_Credentials/post_device_credentials
*
* @param deviceCredentialsId the device credentials id
* @return a Request to execute.
*/
public Request<Void> delete(String deviceCredentialsId) {
Asserts.assertNotNull(deviceCredentialsId, "device credentials id");
String url = baseUrl.newBuilder().addPathSegments("api/v2/device-credentials").addPathSegment(deviceCredentialsId).build().toString();
VoidRequest request = new VoidRequest(client, url, "DELETE");
request.addHeader("Authorization", "Bearer " + apiToken);
return request;
}
Aggregations