mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
16 lines
524 B
TypeScript
16 lines
524 B
TypeScript
|
import BluebirdPromise = require("bluebird");
|
||
|
import { IAuthenticator } from "../../../src/lib/ldap/IAuthenticator";
|
||
|
import { GroupsAndEmails } from "../../../src/lib/ldap/IClient";
|
||
|
import Sinon = require("sinon");
|
||
|
|
||
|
export class AuthenticatorStub implements IAuthenticator {
|
||
|
authenticateStub: Sinon.SinonStub;
|
||
|
|
||
|
constructor() {
|
||
|
this.authenticateStub = Sinon.stub();
|
||
|
}
|
||
|
|
||
|
authenticate(username: string, password: string): BluebirdPromise<GroupsAndEmails> {
|
||
|
return this.authenticateStub(username, password);
|
||
|
}
|
||
|
}
|