enableClientAuthentication method

Future<void> enableClientAuthentication({
  1. required String directoryId,
  2. required ClientAuthenticationType type,
})

Enables alternative client authentication methods for the specified directory.

May throw DirectoryDoesNotExistException. May throw UnsupportedOperationException. May throw InvalidClientAuthStatusException. May throw AccessDeniedException. May throw NoAvailableCertificateException. May throw ClientException. May throw ServiceException.

Parameter directoryId : The identifier of the specified directory.

Parameter type : The type of client authentication to enable. Currently only the value SmartCard is supported. Smart card authentication in AD Connector requires that you enable Kerberos Constrained Delegation for the Service User to the LDAP service in the on-premises AD.

Implementation

Future<void> enableClientAuthentication({
  required String directoryId,
  required ClientAuthenticationType type,
}) async {
  ArgumentError.checkNotNull(directoryId, 'directoryId');
  ArgumentError.checkNotNull(type, 'type');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'DirectoryService_20150416.EnableClientAuthentication'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'DirectoryId': directoryId,
      'Type': type.toValue(),
    },
  );
}