amqplib: add missing authentication method definitions PLAIN, EXTERNAL (#22509)

This commit is contained in:
Diwakar
2018-01-02 15:49:31 -08:00
committed by Mohamed Hegazy
parent cda1707117
commit b6ba23b5df
2 changed files with 26 additions and 0 deletions
+13
View File
@@ -54,6 +54,19 @@ export interface ConfirmChannel extends Channel {
waitForConfirms(callback?: (err: any) => void): void;
}
export const credentials: {
external(): {
mechanism: string;
response(): Buffer;
};
plain(username: string, password: string): {
mechanism: string;
response(): Buffer;
username: string;
password: string;
};
};
export function connect(callback: (err: any, connection: Connection) => void): void;
export function connect(url: string, callback: (err: any, connection: Connection) => void): void;
export function connect(url: string, socketOptions: any, callback: (err: any, connection: Connection) => void): void;
+13
View File
@@ -63,4 +63,17 @@ export interface ConfirmChannel extends Channel {
waitForConfirms(): Promise<void>;
}
export const credentials: {
external(): {
mechanism: string;
response(): Buffer;
};
plain(username: string, password: string): {
mechanism: string;
response(): Buffer;
username: string;
password: string;
};
};
export function connect(url: string | Options.Connect, socketOptions?: any): Promise<Connection>;