Commit 28a11727 authored by Ray Bellis's avatar Ray Bellis

minor fixes

parent 25644900
......@@ -142,6 +142,8 @@ class RadiusClient {
/**
* Adds a new server to the list of those that will be used by the client
*
* @name RadiusClient#addServer
* @function
* @param {string} server - the server to connect to
* @param {string} secret - the shared secret
* @param {number} [auth = 1812] - the UDP port for authorization
......@@ -182,6 +184,17 @@ class RadiusClient {
state.servers.push({ server, secret, auth, acct, id });
}
/**
* Creates a RADIUS request with the specified code and list of attributes,
* sending it to the configured servers, and returning a Promise that will
* be "resolved" for successful Access-Request or Accounting-Request packets
* or "rejected" for unsuccessful Access-Requests.
*
* @name RadiusClient#request
* @function
* @param {(Code|number|string)} code - the request type
* @param {(AttributeList|Array<Attribute>)} attrs - the attributes to send
*/
function request(code, attrs) {
return _request(state, code, attrs);
}
......
......@@ -37,6 +37,8 @@ class ParseError extends Error { };
/**
* The representation of the meta-data and specification of an
* individual RADIUS Attribute
*
* @hideconstructor
*/
class DictionaryEntry {
......
......@@ -2,7 +2,7 @@ const assert = require('assert').strict;
const Code = require('../lib/code.js');
describe('Vendor', () => {
describe('Code', () => {
describe('#constructor()', () => {
it('should throw', () => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment