Skip to content

Commit 702e499

Browse files
committed
make secret required
1 parent 5a88f49 commit 702e499

File tree

3 files changed

+153
-140
lines changed

3 files changed

+153
-140
lines changed

src/utils.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ const joi = require('joi')
1010
const scheme = joi.object({
1111
client: joi.object({
1212
realmUrl: joi.string().uri().required(),
13-
clientId: joi.string().required()
13+
clientId: joi.string().min(1).required(),
14+
secret: joi.string().min(1).required()
1415
}).unknown(true).required(),
1516
cache: joi.alternatives().try(joi.object({
1617
segment: joi.string().default('keycloakJwt')

test/_fixtures.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const token = 'abc.def.ghi'
22
const realmUrl = 'https://localhost:8080/auth/realms/testme'
33
const clientId = 'foobar'
4+
const secret = '1234-bar-4321-foo'
45

56
/**
67
* @type Object
@@ -11,7 +12,7 @@ const clientId = 'foobar'
1112
const config = {
1213
realmUrl,
1314
clientId,
14-
secret: 'barfoo'
15+
secret
1516
}
1617

1718
const content = {
@@ -126,6 +127,7 @@ module.exports = {
126127
token,
127128
realmUrl,
128129
clientId,
130+
secret,
129131
config,
130132
content,
131133
jwt,

0 commit comments

Comments
 (0)