Skip to content

Commit

Permalink
refactor: use of Buffer.from instead of a deprecated new Buffer()
Browse files Browse the repository at this point in the history
  • Loading branch information
asastre committed Jan 8, 2021
1 parent 9903060 commit f420de7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/security/BasicAuthSecurity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class BasicAuthSecurity implements ISecurity {
}

public addHeaders(headers: IHeaders): void {
headers.Authorization = 'Basic ' + new Buffer((this._username + ':' + this._password) || '').toString('base64');
headers.Authorization = 'Basic ' + Buffer.from((this._username + ':' + this._password) || '').toString('base64');
}

public toXML(): string {
Expand Down

0 comments on commit f420de7

Please sign in to comment.