{"record":{"id":"7a0c87d61bc7d850","repo":"sqlmapproject/sqlmap","slug":"you-specified-the-http-authentication-type-but-di","errorCode":null,"errorMessage":"you specified the HTTP authentication type, but did not provide the credentials","messagePattern":"you specified the HTTP authentication type, but did not provide the credentials","errorType":"exception","errorClass":"SqlmapSyntaxException","httpStatus":null,"severity":"error","filePath":"lib/core/option.py","lineNumber":1484,"sourceCode":"def _setHTTPAuthentication():\n    \"\"\"\n    Check and set the HTTP(s) authentication method (Basic, Digest, Bearer, NTLM, Negotiate or PKI),\n    username and password for first three methods, or PEM private key file for\n    PKI authentication\n    \"\"\"\n\n    global authHandler\n\n    if not conf.authType and not conf.authCred and not conf.authFile:\n        return\n\n    if conf.authFile and not conf.authType:\n        conf.authType = AUTH_TYPE.PKI\n\n    elif conf.authType and not conf.authCred and not conf.authFile:\n        errMsg = \"you specified the HTTP authentication type, but \"\n        errMsg += \"did not provide the credentials\"\n        raise SqlmapSyntaxException(errMsg)\n\n    elif not conf.authType and conf.authCred:\n        errMsg = \"you specified the HTTP authentication credentials, \"\n        errMsg += \"but did not provide the type (e.g. --auth-type=\\\"basic\\\")\"\n        raise SqlmapSyntaxException(errMsg)\n\n    elif (conf.authType or \"\").lower() not in (AUTH_TYPE.BASIC, AUTH_TYPE.DIGEST, AUTH_TYPE.BEARER, AUTH_TYPE.NTLM, AUTH_TYPE.NEGOTIATE, AUTH_TYPE.PKI):\n        errMsg = \"HTTP authentication type value must be \"\n        errMsg += \"Basic, Digest, Bearer, NTLM, Negotiate or PKI\"\n        raise SqlmapSyntaxException(errMsg)\n\n    if not conf.authFile:\n        debugMsg = \"setting the HTTP authentication type and credentials\"\n        logger.debug(debugMsg)\n\n        authType = conf.authType.lower()\n\n        if authType in (AUTH_TYPE.BASIC, AUTH_TYPE.DIGEST):","sourceCodeStart":1466,"sourceCodeEnd":1502,"githubUrl":"https://github.com/sqlmapproject/sqlmap/blob/0a35b20e3953d341be6c7ac75ccb0b3362540c8d/lib/core/option.py#L1466-L1502","documentation":"_setHTTPAuthentication validates that --auth-type and --auth-cred (or --auth-file) are supplied together. When --auth-type is given but neither credentials nor an auth file accompany it, sqlmap cannot build an authenticator, so this SqlmapSyntaxException is raised — a paired-option completeness check that fires before any HTTP request is made.","triggerScenarios":"Thrown at lib/core/option.py:1484 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add credentials matching the chosen type, e.g. `--auth-type=basic --auth-cred=\"user:pass\"`.","For PKI authentication, provide `--auth-file=/path/to/key.pem` instead of credentials.","If authentication is not actually needed, remove --auth-type from the command line.","For Bearer tokens, pass the token as --auth-cred, e.g. `--auth-type=bearer --auth-cred=\"<token>\"`."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0a35b20e3953d341be6c7ac75ccb0b3362540c8d","analyzedAt":"2026-08-26T23:02:52.002Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}