mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
Fix compilation and unit tests
This commit is contained in:
parent
39555179e4
commit
acd5a7a26d
|
@ -37,6 +37,7 @@ describe("test server configuration", function () {
|
|||
|
||||
it("should set cookie scope to domain set in the config", function () {
|
||||
const config: UserConfiguration = {
|
||||
port: 8081,
|
||||
session: {
|
||||
domain: "example.com",
|
||||
secret: "secret"
|
||||
|
|
|
@ -9,6 +9,7 @@ import { IMongoClient } from "../../../server/src/lib/connectors/mongo/IMongoCli
|
|||
import { TotpHandler } from "../../../server/src/lib/authentication/totp/TotpHandler";
|
||||
import Speakeasy = require("speakeasy");
|
||||
import Request = require("request-promise");
|
||||
import { TOTPSecret } from "../../../server/types/TOTPSecret";
|
||||
|
||||
setDefaultTimeout(20 * 1000);
|
||||
|
||||
|
@ -77,7 +78,7 @@ declareNeedsConfiguration("single_factor", createSingleFactorConfiguration);
|
|||
declareNeedsConfiguration("totp_issuer", createCustomTotpIssuerConfiguration);
|
||||
|
||||
function registerUser(context: any, username: string) {
|
||||
let secret: Speakeasy.Key;
|
||||
let secret: TOTPSecret;
|
||||
const mongoConnector = new MongoConnector("mongodb://localhost:27017");
|
||||
return mongoConnector.connect("authelia")
|
||||
.then(function (mongoClient: IMongoClient) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user