Skip to content

Commit dea93c9

Browse files
regen docs
1 parent b18dbc6 commit dea93c9

File tree

1 file changed

+69
-87
lines changed

1 file changed

+69
-87
lines changed

README.md

Lines changed: 69 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ modify an existing installation) and select *Common Tools for Visual C++* during
3939
Only the following version combinations with the [MongoDB Node.js
4040
Driver](https://github.com/mongodb/node-mongodb-native) are considered stable.
4141

42-
42+
4343
| ------------- | -------------- | -------------- |
44-
| `[email protected]` | N/A ||
45-
| `[email protected]` |||
46-
| `[email protected]` |||
47-
| `[email protected]` || N/A |
44+
| `[email protected]` | N/A | |
45+
| `[email protected]` | | |
46+
| `[email protected]` | | |
47+
| `[email protected]` | | N/A |
4848

4949
### Installation
5050

@@ -131,7 +131,7 @@ MongoDB Node drivers (<code>mongodb&lt;4.0</code>).</p>
131131
## Functions
132132

133133
<dl>
134-
<dt><a href="#checkPassword">checkPassword(username, password, service, [defaultRealm], [callback])</a> ⇒ <code>Promise</code></dt>
134+
<dt><a href="#checkPassword">checkPassword(username, password, service, [defaultRealm])</a> ⇒ <code>Promise</code></dt>
135135
<dd><p>This function provides a simple way to verify that a user name and password
136136
match those normally used for Kerberos authentication.
137137
It does this by checking that the supplied user name and password can be
@@ -146,14 +146,14 @@ has the correct realms and KDCs listed.</p>
146146
only be used for testing. Do not use this in any production system - your
147147
security could be compromised if you do.</p>
148148
</dd>
149-
<dt><a href="#principalDetails">principalDetails(service, hostname, [callback])</a> ⇒ <code>Promise</code></dt>
149+
<dt><a href="#principalDetails">principalDetails(service, hostname)</a> ⇒ <code>Promise</code></dt>
150150
<dd><p>This function returns the service principal for the server given a service type and hostname.</p>
151151
<p>Details are looked up via the <code>/etc/keytab</code> file.</p>
152152
</dd>
153-
<dt><a href="#initializeClient">initializeClient(service, [options], [callback])</a> ⇒ <code>Promise</code></dt>
153+
<dt><a href="#initializeClient">initializeClient(service, [options])</a> ⇒ <code>Promise</code></dt>
154154
<dd><p>Initializes a context for client-side authentication with the given service principal.</p>
155155
</dd>
156-
<dt><a href="#initializeServer">initializeServer(service, [callback])</a> ⇒ <code>Promise</code></dt>
156+
<dt><a href="#initializeServer">initializeServer(service)</a> ⇒ <code>Promise</code></dt>
157157
<dd><p>Initializes a context for server-side authentication with the given service principal.</p>
158158
</dd>
159159
</dl>
@@ -163,107 +163,92 @@ security could be compromised if you do.</p>
163163
## KerberosClient
164164
**Properties**
165165

166-
| Name | Type | Description |
167-
| --- | --- | --- |
168-
| username | <code>string</code> | The username used for authentication |
169-
| response | <code>string</code> | The last response received during authentication steps |
170-
| responseConf | <code>string</code> | Indicates whether confidentiality was applied or not (GSSAPI only) |
171-
| contextComplete | <code>boolean</code> | Indicates that authentication has successfully completed or not |
166+
| Name | Type | Description |
167+
| --------------- | -------------------- | ------------------------------------------------------------------ |
168+
| username | <code>string</code> | The username used for authentication |
169+
| response | <code>string</code> | The last response received during authentication steps |
170+
| responseConf | <code>string</code> | Indicates whether confidentiality was applied or not (GSSAPI only) |
171+
| contextComplete | <code>boolean</code> | Indicates that authentication has successfully completed or not |
172172

173173

174174
* [KerberosClient](#KerberosClient)
175175

176-
* [.step(challenge, [callback])](#KerberosClient+step)
176+
* [.step(challenge)](#KerberosClient+step)
177177

178-
* [.wrap(challenge, [options], [callback])](#KerberosClient+wrap)
178+
* [.wrap(challenge, [options])](#KerberosClient+wrap)
179179

180-
* [.unwrap(challenge, [callback])](#KerberosClient+unwrap)
180+
* [.unwrap(challenge)](#KerberosClient+unwrap)
181181

182182

183183
<a name="KerberosClient+step"></a>
184184

185-
### *kerberosClient*.step(challenge, [callback])
185+
### *kerberosClient*.step(challenge)
186186

187-
| Param | Type | Description |
188-
| --- | --- | --- |
187+
| Param | Type | Description |
188+
| --------- | ------------------- | ------------------------------------------------------------------------------------------ |
189189
| challenge | <code>string</code> | A string containing the base64-encoded server data (which may be empty for the first step) |
190-
| [callback] | <code>function</code> | |
191190

192191
Processes a single kerberos client-side step using the supplied server challenge.
193192

194-
**Returns**: <code>Promise</code> - returns Promise if no callback passed
193+
**Returns**: <code>Promise</code> - returns Promise
195194
<a name="KerberosClient+wrap"></a>
196195

197-
### *kerberosClient*.wrap(challenge, [options], [callback])
196+
### *kerberosClient*.wrap(challenge, [options])
198197

199-
| Param | Type | Description |
200-
| --- | --- | --- |
201-
| challenge | <code>string</code> | The response returned after calling `unwrap` |
202-
| [options] | <code>object</code> | Optional settings |
203-
| [options.user] | <code>string</code> | The user to authorize |
198+
| Param | Type | Description |
199+
| ----------------- | -------------------- | ------------------------------------------------------------ |
200+
| challenge | <code>string</code> | The response returned after calling `unwrap` |
201+
| [options] | <code>object</code> | Optional settings |
202+
| [options.user] | <code>string</code> | The user to authorize |
204203
| [options.protect] | <code>boolean</code> | Indicates if the wrap should request message confidentiality |
205-
| [callback] | <code>function</code> | |
206204

207205
Perform the client side kerberos wrap step.
208206

209-
**Returns**: <code>Promise</code> - returns Promise if no callback passed
207+
**Returns**: <code>Promise</code> - returns Promise
210208
<a name="KerberosClient+unwrap"></a>
211209

212-
### *kerberosClient*.unwrap(challenge, [callback])
210+
### *kerberosClient*.unwrap(challenge)
213211

214-
| Param | Type | Description |
215-
| --- | --- | --- |
212+
| Param | Type | Description |
213+
| --------- | ------------------- | -------------------------------------------------- |
216214
| challenge | <code>string</code> | A string containing the base64-encoded server data |
217-
| [callback] | <code>function</code> | |
218215

219216
Perform the client side kerberos unwrap step
220217

221-
**Returns**: <code>Promise</code> - returns Promise if no callback passed
218+
**Returns**: <code>Promise</code> - returns Promise
222219
<a name="KerberosServer"></a>
223220

224221
## KerberosServer
225222
**Properties**
226223

227-
| Name | Type | Description |
228-
| --- | --- | --- |
229-
| username | <code>string</code> | The username used for authentication |
230-
| response | <code>string</code> | The last response received during authentication steps |
231-
| targetName | <code>string</code> | The target used for authentication |
224+
| Name | Type | Description |
225+
| --------------- | -------------------- | --------------------------------------------------------------- |
226+
| username | <code>string</code> | The username used for authentication |
227+
| response | <code>string</code> | The last response received during authentication steps |
228+
| targetName | <code>string</code> | The target used for authentication |
232229
| contextComplete | <code>boolean</code> | Indicates that authentication has successfully completed or not |
233230

234231
<a name="KerberosServer+step"></a>
235232

236-
### *kerberosServer*.step(challenge, [callback])
233+
### *kerberosServer*.step(challenge)
237234

238-
| Param | Type | Description |
239-
| --- | --- | --- |
235+
| Param | Type | Description |
236+
| --------- | ------------------- | -------------------------------------------------- |
240237
| challenge | <code>string</code> | A string containing the base64-encoded client data |
241-
| [callback] | <code>function</code> | |
242238

243239
Processes a single kerberos server-side step using the supplied client data.
244240

245-
**Returns**: <code>Promise</code> - returns Promise if no callback passed
246-
<a name="MongoAuthProcess"></a>
247-
248-
## ~~MongoAuthProcess~~
249-
***This class will be removed in an upcoming major release.***
250-
251-
A class that was used for MongoDB kerberos authentication with legacy
252-
MongoDB Node drivers (`mongodb<4.0`).
253-
254-
Not intended for direct use.
255-
241+
**Returns**: <code>Promise</code> - returns Promise
256242
<a name="checkPassword"></a>
257243

258-
## checkPassword(username, password, service, [defaultRealm], [callback])
244+
## checkPassword(username, password, service, [defaultRealm])
259245

260-
| Param | Type | Description |
261-
| --- | --- | --- |
262-
| username | <code>string</code> | The Kerberos user name. If no realm is supplied, then the `defaultRealm` will be used. |
263-
| password | <code>string</code> | The password for the user. |
264-
| service | <code>string</code> | The Kerberos service to check access for. |
265-
| [defaultRealm] | <code>string</code> | The default realm to use if one is not supplied in the user argument. |
266-
| [callback] | <code>function</code> | |
246+
| Param | Type | Description |
247+
| -------------- | ------------------- | -------------------------------------------------------------------------------------- |
248+
| username | <code>string</code> | The Kerberos user name. If no realm is supplied, then the `defaultRealm` will be used. |
249+
| password | <code>string</code> | The password for the user. |
250+
| service | <code>string</code> | The Kerberos service to check access for. |
251+
| [defaultRealm] | <code>string</code> | The default realm to use if one is not supplied in the user argument. |
267252

268253
This function provides a simple way to verify that a user name and password
269254
match those normally used for Kerberos authentication.
@@ -281,47 +266,44 @@ IMPORTANT: This method is vulnerable to KDC spoofing attacks and it should
281266
only be used for testing. Do not use this in any production system - your
282267
security could be compromised if you do.
283268

284-
**Returns**: <code>Promise</code> - returns Promise if no callback passed
269+
**Returns**: <code>Promise</code> - returns Promise
285270
<a name="principalDetails"></a>
286271

287-
## principalDetails(service, hostname, [callback])
272+
## principalDetails(service, hostname)
288273

289-
| Param | Type | Description |
290-
| --- | --- | --- |
291-
| service | <code>string</code> | The Kerberos service type for the server. |
292-
| hostname | <code>string</code> | The hostname of the server. |
293-
| [callback] | <code>function</code> | |
274+
| Param | Type | Description |
275+
| -------- | ------------------- | ----------------------------------------- |
276+
| service | <code>string</code> | The Kerberos service type for the server. |
277+
| hostname | <code>string</code> | The hostname of the server. |
294278

295279
This function returns the service principal for the server given a service type and hostname.
296280

297281
Details are looked up via the `/etc/keytab` file.
298282

299-
**Returns**: <code>Promise</code> - returns Promise if no callback passed
283+
**Returns**: <code>Promise</code> - returns Promise
300284
<a name="initializeClient"></a>
301285

302-
## initializeClient(service, [options], [callback])
286+
## initializeClient(service, [options])
303287

304-
| Param | Type | Description |
305-
| --- | --- | --- |
306-
| service | <code>string</code> | A string containing the service principal in the form 'type@fqdn' (e.g. '[email protected]'). |
307-
| [options] | <code>object</code> | Optional settings |
308-
| [options.principal] | <code>string</code> | Optional string containing the client principal in the form 'user@realm' (e.g. '[email protected]'). |
309-
| [options.flags] | <code>number</code> | Optional integer used to set GSS flags. (e.g. `GSS_C_DELEG_FLAG\|GSS_C_MUTUAL_FLAG\|GSS_C_SEQUENCE_FLAG` will allow for forwarding credentials to the remote host) |
310-
| [options.mechOID] | <code>number</code> | Optional GSS mech OID. Defaults to None (GSS_C_NO_OID). Other possible values are `GSS_MECH_OID_KRB5`, `GSS_MECH_OID_SPNEGO`. |
311-
| [callback] | <code>function</code> | |
288+
| Param | Type | Description |
289+
| ------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
290+
| service | <code>string</code> | A string containing the service principal in the form 'type@fqdn' (e.g. '[email protected]'). |
291+
| [options] | <code>object</code> | Optional settings |
292+
| [options.principal] | <code>string</code> | Optional string containing the client principal in the form 'user@realm' (e.g. '[email protected]'). |
293+
| [options.flags] | <code>number</code> | Optional integer used to set GSS flags. (e.g. `GSS_C_DELEG_FLAG\|GSS_C_MUTUAL_FLAG\|GSS_C_SEQUENCE_FLAG` will allow for forwarding credentials to the remote host) |
294+
| [options.mechOID] | <code>number</code> | Optional GSS mech OID. Defaults to None (GSS_C_NO_OID). Other possible values are `GSS_MECH_OID_KRB5`, `GSS_MECH_OID_SPNEGO`. |
312295

313296
Initializes a context for client-side authentication with the given service principal.
314297

315-
**Returns**: <code>Promise</code> - returns Promise if no callback passed
298+
**Returns**: <code>Promise</code> - returns Promise
316299
<a name="initializeServer"></a>
317300

318-
## initializeServer(service, [callback])
301+
## initializeServer(service)
319302

320-
| Param | Type | Description |
321-
| --- | --- | --- |
303+
| Param | Type | Description |
304+
| ------- | ------------------- | ----------------------------------------------------------------------------------------------- |
322305
| service | <code>string</code> | A string containing the service principal in the form 'type@fqdn' (e.g. '[email protected]'). |
323-
| [callback] | <code>function</code> | |
324306

325307
Initializes a context for server-side authentication with the given service principal.
326308

327-
**Returns**: <code>Promise</code> - returns Promise if no callback passed
309+
**Returns**: <code>Promise</code> - returns Promise

0 commit comments

Comments
 (0)