mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
78f6028c1b
Previously, logs were not very friendly and it was hard to track a request because of the lack of request ID. Now every log message comes with a header containing: method, path request ID, session ID, IP of the user, date. Moreover, the configurations displayed in the logs have their secrets hidden from this commit.
25 lines
854 B
TypeScript
25 lines
854 B
TypeScript
import { IMailSenderBuilder } from "../../../src/lib/notifiers/IMailSenderBuilder";
|
|
import BluebirdPromise = require("bluebird");
|
|
import Nodemailer = require("nodemailer");
|
|
import Sinon = require("sinon");
|
|
import { IMailSender } from "../../../src/lib/notifiers/IMailSender";
|
|
import { SmtpNotifierConfiguration, GmailNotifierConfiguration } from "../../../src/lib/configuration/Configuration";
|
|
|
|
export class MailSenderBuilderStub implements IMailSenderBuilder {
|
|
buildGmailStub: Sinon.SinonStub;
|
|
buildSmtpStub: Sinon.SinonStub;
|
|
|
|
constructor() {
|
|
this.buildGmailStub = Sinon.stub();
|
|
this.buildSmtpStub = Sinon.stub();
|
|
}
|
|
|
|
buildGmail(options: GmailNotifierConfiguration): IMailSender {
|
|
return this.buildGmailStub(options);
|
|
}
|
|
|
|
buildSmtp(options: SmtpNotifierConfiguration): IMailSender {
|
|
return this.buildSmtpStub(options);
|
|
}
|
|
|
|
} |