Skip to content

Commit 4e3691f

Browse files
committed
add userInfo option to docs
1 parent acd5e91 commit 4e3691f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ server.register({
6565
clientId: 'foobar',
6666
secret: '1234-bar-4321-foo'
6767
},
68-
cache: {}
68+
cache: {},
69+
userInfo: ['name', 'email']
6970
}
7071
}, function(err) {
7172
if (err) {
@@ -112,7 +113,10 @@ Required.
112113

113114
- `cache {Object|false}`: The configuration of the [hapi.js cache](https://hapijs.com/api#servercacheoptions) powered by [catbox][catbox].<br/>
114115
If `false` the cache is disabled. Use an empty object to use the built-in default cache.<br/>
115-
Optional. Default: `false`.<br/>
116+
Optional. Default: `false`.
117+
118+
- `userInfo {Array.<?string>}`: List of properties which should be included in the `request.auth.credentials` object besides `scope` and `sub`.<br/>
119+
Optional. Default: `[]`.<br/>
116120

117121
#### `server.kjwt.validate(field {string}, done {Function})`
118122
Uses internally [`GrantManager.prototype.validateAccessToken()`][keycloak-auth-utils-gm-validate].
@@ -166,7 +170,8 @@ server.register({
166170
clientId: 'foobar',
167171
secret: '1234-bar-4321-foo'
168172
},
169-
cache: {}
173+
cache: {},
174+
userInfo: ['name', 'email']
170175
}
171176
}).then(() => {
172177
server.auth.strategy('keycloak-jwt', 'keycloak-jwt');

0 commit comments

Comments
 (0)