Skip to content

Commit

Permalink
UA: Allow to change authorization_user (versatica#652)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jose Lopes authored Jul 24, 2020
1 parent f4c417c commit 58ce1f6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/UA.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,9 @@ module.exports = class UA extends EventEmitter
{
switch (parameter)
{
case 'authorization_user':
return this._configuration.authorization_user;

case 'realm':
return this._configuration.realm;

Expand All @@ -376,6 +379,11 @@ module.exports = class UA extends EventEmitter
{
switch (parameter)
{
case 'authorization_user': {
this._configuration.authorization_user = String(value);
break;
}

case 'password': {
this._configuration.password = String(value);
break;
Expand Down Expand Up @@ -887,7 +895,7 @@ module.exports = class UA extends EventEmitter

// Seal the configuration.
const writable_parameters = [
'password', 'realm', 'ha1', 'display_name', 'register'
'authorization_user', 'password', 'realm', 'ha1', 'display_name', 'register'
];

for (const parameter in this._configuration)
Expand Down

0 comments on commit 58ce1f6

Please sign in to comment.