@@ -126,7 +126,7 @@ NOTE: The test suite requires an active kerberos deployment.
126126## Functions
127127
128128<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 >
130130<dd ><p >This function provides a simple way to verify that a user name and password
131131match those normally used for Kerberos authentication.
132132It 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>
141141only be used for testing. Do not use this in any production system - your
142142security could be compromised if you do.</p >
143143</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 >
145145<dd ><p >This function returns the service principal for the server given a service type and hostname.</p >
146146<p >Details are looked up via the <code >/etc/keytab</code > file.</p >
147147</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 >
149149<dd ><p >Initializes a context for client-side authentication with the given service principal.</p >
150150</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 >
152152<dd ><p >Initializes a context for server-side authentication with the given service principal.</p >
153153</dd >
154154</dl >
@@ -168,52 +168,46 @@ security could be compromised if you do.</p>
168168
169169* [ KerberosClient] ( #KerberosClient )
170170
171- * [ .step(challenge, [ callback ] )] ( #KerberosClient+step )
171+ * [ .step(challenge)] ( #KerberosClient+step )
172172
173- * [ .wrap(challenge, [ options] , [ callback ] )] ( #KerberosClient+wrap )
173+ * [ .wrap(challenge, [ options] )] ( #KerberosClient+wrap )
174174
175- * [ .unwrap(challenge, [ callback ] )] ( #KerberosClient+unwrap )
175+ * [ .unwrap(challenge)] ( #KerberosClient+unwrap )
176176
177177
178178<a name =" KerberosClient+step " ></a >
179179
180- ### * kerberosClient* .step(challenge, [ callback ] )
180+ ### * kerberosClient* .step(challenge)
181181
182182| Param | Type | Description |
183183| --- | --- | --- |
184184| 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 > | |
186185
187186Processes a single kerberos client-side step using the supplied server challenge.
188187
189- ** Returns** : <code >Promise</code > - returns Promise if no callback passed
190188<a name =" KerberosClient+wrap " ></a >
191189
192- ### * kerberosClient* .wrap(challenge, [ options] , [ callback ] )
190+ ### * kerberosClient* .wrap(challenge, [ options] )
193191
194192| Param | Type | Description |
195193| --- | --- | --- |
196194| challenge | <code >string</code > | The response returned after calling ` unwrap ` |
197- | [ options] | <code >object</code > | Optional settings |
195+ | [ options] | <code >object</code > | Options |
198196| [ options.user] | <code >string</code > | The user to authorize |
199197| [ options.protect] | <code >boolean</code > | Indicates if the wrap should request message confidentiality |
200- | [ callback] | <code >function</code > | |
201198
202199Perform the client side kerberos wrap step.
203200
204- ** Returns** : <code >Promise</code > - returns Promise if no callback passed
205201<a name =" KerberosClient+unwrap " ></a >
206202
207- ### * kerberosClient* .unwrap(challenge, [ callback ] )
203+ ### * kerberosClient* .unwrap(challenge)
208204
209205| Param | Type | Description |
210206| --- | --- | --- |
211207| challenge | <code >string</code > | A string containing the base64-encoded server data |
212- | [ callback] | <code >function</code > | |
213208
214209Perform the client side kerberos unwrap step
215210
216- ** Returns** : <code >Promise</code > - returns Promise if no callback passed
217211<a name =" KerberosServer " ></a >
218212
219213## KerberosServer
@@ -228,27 +222,24 @@ Perform the client side kerberos unwrap step
228222
229223<a name =" KerberosServer+step " ></a >
230224
231- ### * kerberosServer* .step(challenge, [ callback ] )
225+ ### * kerberosServer* .step(challenge)
232226
233227| Param | Type | Description |
234228| --- | --- | --- |
235229| challenge | <code >string</code > | A string containing the base64-encoded client data |
236- | [ callback] | <code >function</code > | |
237230
238231Processes a single kerberos server-side step using the supplied client data.
239232
240- ** Returns** : <code >Promise</code > - returns Promise if no callback passed
241233<a name =" checkPassword " ></a >
242234
243- ## checkPassword(username, password, service, [ defaultRealm] , [ callback ] )
235+ ## checkPassword(username, password, service, [ defaultRealm] )
244236
245237| Param | Type | Description |
246238| --- | --- | --- |
247239| username | <code >string</code > | The Kerberos user name. If no realm is supplied, then the ` defaultRealm ` will be used. |
248240| password | <code >string</code > | The password for the user. |
249241| service | <code >string</code > | The Kerberos service to check access for. |
250242| [ defaultRealm] | <code >string</code > | The default realm to use if one is not supplied in the user argument. |
251- | [ callback] | <code >function</code > | |
252243
253244This function provides a simple way to verify that a user name and password
254245match those normally used for Kerberos authentication.
@@ -266,25 +257,24 @@ IMPORTANT: This method is vulnerable to KDC spoofing attacks and it should
266257only be used for testing. Do not use this in any production system - your
267258security could be compromised if you do.
268259
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
270261<a name =" principalDetails " ></a >
271262
272- ## principalDetails(service, hostname, [ callback ] )
263+ ## principalDetails(service, hostname)
273264
274265| Param | Type | Description |
275266| --- | --- | --- |
276267| service | <code >string</code > | The Kerberos service type for the server. |
277268| hostname | <code >string</code > | The hostname of the server. |
278- | [ callback] | <code >function</code > | |
279269
280270This function returns the service principal for the server given a service type and hostname.
281271
282272Details are looked up via the ` /etc/keytab ` file.
283273
284- ** Returns** : <code >Promise</code > - returns Promise if no callback passed
274+ ** Returns** : <code >Promise</code > - returns Promise
285275<a name =" initializeClient " ></a >
286276
287- ## initializeClient(service, [ options] , [ callback ] )
277+ ## initializeClient(service, [ options] )
288278
289279| Param | Type | Description |
290280| --- | --- | --- |
@@ -293,20 +283,18 @@ Details are looked up via the `/etc/keytab` file.
293283| [ options.principal] | <code >string</code > | Optional string containing the client principal in the form 'user@realm' (e.g. 'jdoe@example.com '). |
294284| [ 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) |
295285| [ 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 > | |
297286
298287Initializes a context for client-side authentication with the given service principal.
299288
300- ** Returns** : <code >Promise</code > - returns Promise if no callback passed
289+ ** Returns** : [ <code >Promise. & lt ; KerberosClient & gt ; </code >] ( #KerberosClient ) - returns Promise
301290<a name =" initializeServer " ></a >
302291
303- ## initializeServer(service, [ callback ] )
292+ ## initializeServer(service)
304293
305294| Param | Type | Description |
306295| --- | --- | --- |
307296| service | <code >string</code > | A string containing the service principal in the form 'type@fqdn' (e.g. 'imap@mail.apple.com '). |
308- | [ callback] | <code >function</code > | |
309297
310298Initializes a context for server-side authentication with the given service principal.
311299
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