@@ -126,7 +126,7 @@ NOTE: The test suite requires an active kerberos deployment.
126
126
## Functions
127
127
128
128
<dl >
129
- <dt ><a href =" #checkPassword " >checkPassword(username, password, service, [defaultRealm], [callback] )</a > ⇒ <code >Promise</code ></dt >
129
+ <dt ><a href =" #checkPassword " >checkPassword(username, password, service, [defaultRealm])</a > ⇒ <code >Promise. & lt ; null & gt ; </code ></dt >
130
130
<dd ><p >This function provides a simple way to verify that a user name and password
131
131
match those normally used for Kerberos authentication.
132
132
It does this by checking that the supplied user name and password can be
@@ -141,14 +141,14 @@ has the correct realms and KDCs listed.</p>
141
141
only be used for testing. Do not use this in any production system - your
142
142
security could be compromised if you do.</p >
143
143
</dd >
144
- <dt ><a href =" #principalDetails " >principalDetails(service, hostname, [callback] )</a > ⇒ <code >Promise</code ></dt >
144
+ <dt ><a href =" #principalDetails " >principalDetails(service, hostname)</a > ⇒ <code >Promise</code ></dt >
145
145
<dd ><p >This function returns the service principal for the server given a service type and hostname.</p >
146
146
<p >Details are looked up via the <code >/etc/keytab</code > file.</p >
147
147
</dd >
148
- <dt ><a href =" #initializeClient " >initializeClient(service, [options], [callback] )</a > ⇒ <code >Promise</code ></dt >
148
+ <dt ><a href =" #initializeClient " >initializeClient(service, [options])</a > ⇒ <code >< a href = " #KerberosClient " > Promise. & lt ; KerberosClient & gt ; </ a > </code ></dt >
149
149
<dd ><p >Initializes a context for client-side authentication with the given service principal.</p >
150
150
</dd >
151
- <dt ><a href =" #initializeServer " >initializeServer(service, [callback] )</a > ⇒ <code >Promise</code ></dt >
151
+ <dt ><a href =" #initializeServer " >initializeServer(service)</a > ⇒ <code >< a href = " #KerberosServer " > Promise. & lt ; KerberosServer & gt ; </ a > </code ></dt >
152
152
<dd ><p >Initializes a context for server-side authentication with the given service principal.</p >
153
153
</dd >
154
154
</dl >
@@ -168,52 +168,46 @@ security could be compromised if you do.</p>
168
168
169
169
* [ KerberosClient] ( #KerberosClient )
170
170
171
- * [ .step(challenge, [ callback ] )] ( #KerberosClient+step )
171
+ * [ .step(challenge)] ( #KerberosClient+step )
172
172
173
- * [ .wrap(challenge, [ options] , [ callback ] )] ( #KerberosClient+wrap )
173
+ * [ .wrap(challenge, [ options] )] ( #KerberosClient+wrap )
174
174
175
- * [ .unwrap(challenge, [ callback ] )] ( #KerberosClient+unwrap )
175
+ * [ .unwrap(challenge)] ( #KerberosClient+unwrap )
176
176
177
177
178
178
<a name =" KerberosClient+step " ></a >
179
179
180
- ### * kerberosClient* .step(challenge, [ callback ] )
180
+ ### * kerberosClient* .step(challenge)
181
181
182
182
| Param | Type | Description |
183
183
| --- | --- | --- |
184
184
| challenge | <code >string</code > | A string containing the base64-encoded server data (which may be empty for the first step) |
185
- | [ callback] | <code >function</code > | |
186
185
187
186
Processes a single kerberos client-side step using the supplied server challenge.
188
187
189
- ** Returns** : <code >Promise</code > - returns Promise if no callback passed
190
188
<a name =" KerberosClient+wrap " ></a >
191
189
192
- ### * kerberosClient* .wrap(challenge, [ options] , [ callback ] )
190
+ ### * kerberosClient* .wrap(challenge, [ options] )
193
191
194
192
| Param | Type | Description |
195
193
| --- | --- | --- |
196
194
| challenge | <code >string</code > | The response returned after calling ` unwrap ` |
197
- | [ options] | <code >object</code > | Optional settings |
195
+ | [ options] | <code >object</code > | Options |
198
196
| [ options.user] | <code >string</code > | The user to authorize |
199
197
| [ options.protect] | <code >boolean</code > | Indicates if the wrap should request message confidentiality |
200
- | [ callback] | <code >function</code > | |
201
198
202
199
Perform the client side kerberos wrap step.
203
200
204
- ** Returns** : <code >Promise</code > - returns Promise if no callback passed
205
201
<a name =" KerberosClient+unwrap " ></a >
206
202
207
- ### * kerberosClient* .unwrap(challenge, [ callback ] )
203
+ ### * kerberosClient* .unwrap(challenge)
208
204
209
205
| Param | Type | Description |
210
206
| --- | --- | --- |
211
207
| challenge | <code >string</code > | A string containing the base64-encoded server data |
212
- | [ callback] | <code >function</code > | |
213
208
214
209
Perform the client side kerberos unwrap step
215
210
216
- ** Returns** : <code >Promise</code > - returns Promise if no callback passed
217
211
<a name =" KerberosServer " ></a >
218
212
219
213
## KerberosServer
@@ -228,27 +222,24 @@ Perform the client side kerberos unwrap step
228
222
229
223
<a name =" KerberosServer+step " ></a >
230
224
231
- ### * kerberosServer* .step(challenge, [ callback ] )
225
+ ### * kerberosServer* .step(challenge)
232
226
233
227
| Param | Type | Description |
234
228
| --- | --- | --- |
235
229
| challenge | <code >string</code > | A string containing the base64-encoded client data |
236
- | [ callback] | <code >function</code > | |
237
230
238
231
Processes a single kerberos server-side step using the supplied client data.
239
232
240
- ** Returns** : <code >Promise</code > - returns Promise if no callback passed
241
233
<a name =" checkPassword " ></a >
242
234
243
- ## checkPassword(username, password, service, [ defaultRealm] , [ callback ] )
235
+ ## checkPassword(username, password, service, [ defaultRealm] )
244
236
245
237
| Param | Type | Description |
246
238
| --- | --- | --- |
247
239
| username | <code >string</code > | The Kerberos user name. If no realm is supplied, then the ` defaultRealm ` will be used. |
248
240
| password | <code >string</code > | The password for the user. |
249
241
| service | <code >string</code > | The Kerberos service to check access for. |
250
242
| [ defaultRealm] | <code >string</code > | The default realm to use if one is not supplied in the user argument. |
251
- | [ callback] | <code >function</code > | |
252
243
253
244
This function provides a simple way to verify that a user name and password
254
245
match those normally used for Kerberos authentication.
@@ -266,25 +257,24 @@ IMPORTANT: This method is vulnerable to KDC spoofing attacks and it should
266
257
only be used for testing. Do not use this in any production system - your
267
258
security could be compromised if you do.
268
259
269
- ** Returns** : <code >Promise</code > - returns Promise if no callback passed
260
+ ** Returns** : <code >Promise. & lt ; null & gt ; </code > - returns Promise that rejects if the password is invalid
270
261
<a name =" principalDetails " ></a >
271
262
272
- ## principalDetails(service, hostname, [ callback ] )
263
+ ## principalDetails(service, hostname)
273
264
274
265
| Param | Type | Description |
275
266
| --- | --- | --- |
276
267
| service | <code >string</code > | The Kerberos service type for the server. |
277
268
| hostname | <code >string</code > | The hostname of the server. |
278
- | [ callback] | <code >function</code > | |
279
269
280
270
This function returns the service principal for the server given a service type and hostname.
281
271
282
272
Details are looked up via the ` /etc/keytab ` file.
283
273
284
- ** Returns** : <code >Promise</code > - returns Promise if no callback passed
274
+ ** Returns** : <code >Promise</code > - returns Promise
285
275
<a name =" initializeClient " ></a >
286
276
287
- ## initializeClient(service, [ options] , [ callback ] )
277
+ ## initializeClient(service, [ options] )
288
278
289
279
| Param | Type | Description |
290
280
| --- | --- | --- |
@@ -293,20 +283,18 @@ Details are looked up via the `/etc/keytab` file.
293
283
| [ options.principal
] | <
code >string</
code >
| Optional string containing the client principal in the form 'user@realm' (e.g. '
[email protected] ').
|
294
284
| [ 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) |
295
285
| [ 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 ` . |
296
- | [ callback] | <code >function</code > | |
297
286
298
287
Initializes a context for client-side authentication with the given service principal.
299
288
300
- ** Returns** : <code >Promise</code > - returns Promise if no callback passed
289
+ ** Returns** : [ <code >Promise. & lt ; KerberosClient & gt ; </code >] ( #KerberosClient ) - returns Promise
301
290
<a name =" initializeServer " ></a >
302
291
303
- ## initializeServer(service, [ callback ] )
292
+ ## initializeServer(service)
304
293
305
294
| Param | Type | Description |
306
295
| --- | --- | --- |
307
296
| service
| <
code >string</
code >
| A string containing the service principal in the form 'type@fqdn' (e.g. '
[email protected] ').
|
308
- | [ callback] | <code >function</code > | |
309
297
310
298
Initializes a context for server-side authentication with the given service principal.
311
299
312
- ** Returns** : <code >Promise</code > - returns Promise if no callback passed
300
+ ** Returns** : [ <code >Promise. & lt ; KerberosServer & gt ; </code >] ( #KerberosServer ) - returns Promise
0 commit comments