Skip to content

Commit

Permalink
shorten NTLM configure key to ntlmAuth
Browse files Browse the repository at this point in the history
  • Loading branch information
dvargas46 committed Jun 21, 2023
1 parent 4f2fd94 commit 36e4928
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2270,7 +2270,7 @@ You can adjust configuration settings for the HTTP client used by Karate using t
`pauseIfNotPerf` | boolean | defaults to `false`, relevant only for performance-testing, see [`karate.pause()`](#karate-pause) and [`karate-gatling`](karate-gatling#think-time)
`xmlNamespaceAware` | boolean | defaults to `false`, to handle XML namespaces in [some special circumstances](https://github.com/karatelabs/karate/issues/1587)
`abortSuiteOnFailure` | boolean | defaults to `false`, to not attempt to run any more tests upon a failure
`ntlmAuthentication` | JSON | See [NTLM Authentication](#ntlm-authentication)
`ntlmAuth` | JSON | See [NTLM Authentication](#ntlm-authentication)

Examples:
```cucumber
Expand Down Expand Up @@ -2422,18 +2422,18 @@ Karate provides support for NTLM authentication using the Apache NTLMEngine impl
Example:
```cucumber
# enable NTLM authentication for the remaining scenario requests
* configure ntlmAuthentication = { username: 'admin', password: 'secret', domain: 'my.domain', workstation: 'my-pc' }
* configure ntlmAuth = { username: 'admin', password: 'secret', domain: 'my.domain', workstation: 'my-pc' }
# enable NTLM authentication with only credentials
* configure ntlmAuthentication = { username: 'admin', password: 'secret' }
* configure ntlmAuth = { username: 'admin', password: 'secret' }
# disable NTLM authentication
* configure ntlmAuthentication = null
* configure ntlmAuth = null
```

```js
// enable NTLM authentication within js
karate.confgure('ntlmAuthentication', { username: 'admin', password: 'secret', domain: 'my.domain', workstation: 'my-pc' })
karate.confgure('ntlmAuth', { username: 'admin', password: 'secret', domain: 'my.domain', workstation: 'my-pc' })
```

# Payload Assertions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ public boolean configure(String key, Variable value) { // TODO use enum
case "localAddress":
localAddress = value.getAsString();
return true;
case "ntlmAuthentication":
case "ntlmAuth":
if (value.isNull()) {
ntlmEnabled = false;
} else {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Feature: ntlm authentication

Scenario: various ways to configure ntlm authentication
* configure ntlmAuthentication = { username: 'admin', password: 'secret', domain: 'my.domain', workstation: 'ws' }
* configure ntlmAuthentication = { username: 'admin', password: 'secret' }
* configure ntlmAuthentication = null
* configure ntlmAuth = { username: 'admin', password: 'secret', domain: 'my.domain', workstation: 'my-pc' }
* configure ntlmAuth = { username: 'admin', password: 'secret' }
* configure ntlmAuth = null
* eval
"""
karate.configure('ntlmAuthentication', { username: 'admin', password: 'secret' })
karate.configure('ntlmAuth', { username: 'admin', password: 'secret' })
"""

0 comments on commit 36e4928

Please sign in to comment.