---
title: Configuring basic authentication
description: Disable or enable basic authentication and configure an identity mapper for basic authentication.
component: pingdirectory
version: 11.0
page_id: pingdirectory:consent_solution_guide:pd_cs_config_basic_authn
canonical_url: https://docs.pingidentity.com/pingdirectory/11.0/consent_solution_guide/pd_cs_config_basic_authn.html
revdate: September 13, 2023
section_ids:
  about-this-task: About this task
  steps: Steps
  example: Example:
  example-2: Example:
  example-3: Example:
  example-4: Example:
---

# Configuring basic authentication

Disable or enable basic authentication and configure an identity mapper for basic authentication.

## About this task

By default, basic authentication is enabled. The settings are configured in the Consent HTTP Servlet Extension configuration.

|   |                                                                                                                                           |
| - | ----------------------------------------------------------------------------------------------------------------------------------------- |
|   | All of these configuration changes require the Consent servlet to be reloaded before they can take effect. To do this, see the last step. |

## Steps

* To disable basic authentication, use the following command.

  ### Example:

  ```shell
  $ bin/dsconfig set-http-servlet-extension-prop \
    --extension-name Consent \
    --set basic-auth-enabled:false
  ```

* To enable basic authentication, use the following command.

  ### Example:

  ```shell
  $ bin/dsconfig set-http-servlet-extension-prop \
    --extension-name Consent \
    --set basic-auth-enabled:true
  ```

* To configure an identity mapper for basic authentication, use the following command.

  ### Example:

  ```shell
  $ bin/dsconfig set-http-servlet-extension-prop \
    --extension-name Consent \
    --set "identity-mapper:User ID Exact Match"
  ```

* To restart the connection handler that hosts the Consent servlet, use the following commands.

  ### Example:

  ```shell
  $ bin/dsconfig set-connection-handler-prop \
    --handler-name "HTTPS Connection Handler" \
    --set enabled:false
  ```

  ```shell
  $ bin/dsconfig set-connection-handler-prop \
    --handler-name "HTTPS Connection Handler" \
    --set enabled:true
  ```
