Skip to content

Commit fa225f3

Browse files
committed
Use schema.nullable where applicable
1 parent 909ead2 commit fa225f3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

x-pack/plugins/security/server/config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ export const ConfigSchema = schema.object(
3434
schema.maybe(schema.string({ minLength: 32 })),
3535
schema.string({ minLength: 32, defaultValue: 'a'.repeat(32) })
3636
),
37-
sessionTimeout: schema.maybe(schema.oneOf([schema.number(), schema.literal(null)])), // DEPRECATED
37+
sessionTimeout: schema.maybe(schema.nullable(schema.number())), // DEPRECATED
3838
session: schema.object({
39-
idleTimeout: schema.oneOf([schema.duration(), schema.literal(null)], { defaultValue: null }),
40-
lifespan: schema.oneOf([schema.duration(), schema.literal(null)], { defaultValue: null }),
39+
idleTimeout: schema.nullable(schema.duration()),
40+
lifespan: schema.nullable(schema.duration()),
4141
}),
4242
secureCookies: schema.boolean({ defaultValue: false }),
4343
authc: schema.object({

0 commit comments

Comments
 (0)