Make sure session.domain is provided in config.yml

This commit is contained in:
Clement Michaud 2018-05-17 00:40:18 +02:00
parent 4e0b2881c3
commit df9cb51a89
3 changed files with 14 additions and 7 deletions

View File

@ -63,7 +63,7 @@ interface SessionCookieConfiguration {
secret: string;
expiration?: number;
inactivity?: number;
domain?: string;
domain: string;
redis?: SessionRedisOptions;
}

View File

@ -26,6 +26,7 @@ describe("test validator", function () {
"data.regulation should have required property 'ban_time'",
"data.regulation should have required property 'find_time'",
"data.regulation should have required property 'max_retries'",
"data.session should have required property 'domain'",
"data.session should have required property 'secret'",
"Storage must be either 'local' or 'mongo'",
"A notifier needs to be declared when server is used with two-factor"
@ -47,7 +48,8 @@ describe("test validator", function () {
max_retries: 3
},
session: {
secret: "unsecure_secret"
secret: "unsecure_secret",
domain: "mydomain"
},
storage: {
abc: {}
@ -80,7 +82,8 @@ describe("test validator", function () {
max_retries: 3
},
session: {
secret: "unsecure_secret"
secret: "unsecure_secret",
domain: "mydomain"
},
storage: {
local: {
@ -109,7 +112,8 @@ one second factor enabled sub-domain", function () {
max_retries: 3
},
session: {
secret: "unsecure_secret"
secret: "unsecure_secret",
domain: "mydomain"
},
storage: {
local: {
@ -141,7 +145,8 @@ one second factor enabled sub-domain", function () {
max_retries: 3
},
session: {
secret: "unsecure_secret"
secret: "unsecure_secret",
domain: "mydomain"
},
storage: {
local: {
@ -166,7 +171,8 @@ one second factor enabled sub-domain", function () {
max_retries: 3
},
session: {
secret: "unsecure_secret"
secret: "unsecure_secret",
domain: "mydomain"
},
storage: {
local: {

View File

@ -58,7 +58,8 @@ export class ServerVariablesMockBuilder {
max_retries: 3
},
session: {
secret: "my_secret"
secret: "my_secret",
domain: "mydomain"
},
storage: {}
},