You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`apiKey {Object}` — The options object enabling an api key service as middleware<br/>
103
+
Optional. Default: `undefined`.
104
+
105
+
-`url {string}` — The absolute url to be requested. It's possible to use a [`pupa` template][pupa] with placeholders called `realm` and `clientId` getting rendered based on the passed plugin-related options.<br/>
106
+
Example: `http://barfoo.com/foo/{clientId}`<br/>
107
+
Required.
108
+
109
+
-`in {string}` — Whether the api key is placed in the headers or query.<br/>
110
+
Allowed values: `headers` & `query`<br/>
111
+
Optional. Default: `headers`.
112
+
113
+
-`name {string}` — The name of the related headers field or query key.<br/>
114
+
Optional. Default: `authorization`.
115
+
116
+
-`prefix {string}` — An optional prefix of the related api key value. Mind a trailing space if necessary.<br/>
117
+
Optional. Default: `Api-Key `.
104
118
119
+
-`tokenPath {string}` — The path to the access token in the response its body as dot notation.<br/>
120
+
Optional. Default: `access_token`.
121
+
122
+
-`request {Object}` – The detailed request options for [`got`][got].<br/>
123
+
Optional. Default: `{}`
124
+
125
+
#### Plugin + Strategy Options
105
126
> By default, the Keycloak server has built-in [two ways to authenticate][client-auth] the client: client ID and client secret **(1)**, or with a signed JWT **(2)**. This plugin supports both. If a non-live strategy is used, ensure that the identifier of the related realm key is included in their header as `kid`. Check the description of `secret`/`publicKey`/`entitlement` and the [terminology][rpt-terms] for further information.
> Please mind that the accurate strategy is 4-5x faster than the fine-grained one.<br/>
118
139
> **Hint:** If you define neither `secret` nor `public` nor `entitlement`, the plugin retrieves the public key itself from `{realmUrl}/protocol/openid-connect/certs`.
119
140
120
-
-`schemeName {string}` — The name used for the authentication scheme of the hapi server. Optional. Default: `keycloak-jwt`.
121
-
122
-
-`decoratorName {string}` — The name used for the server decorator to validate the token, [see below](#await-serverdecoratorname--kjwtvalidatefield-string). Optional. Default: `kjwt`.
141
+
-`name {string}` – The unique name of the strategy<br/>
142
+
Required. Example `BizApps`<br/>
123
143
124
144
-`realmUrl {string}` – The absolute uri of the Keycloak realm.<br/>
@@ -151,33 +171,13 @@ Please mind that an enabled cache leads to disabled live validation after the re
151
171
If `false` the cache is disabled. Use `true` or an empty object (`{}`) to use the built-in default cache. Otherwise just drop in your own cache configuration.<br/>
152
172
Optional. Default: `false`.
153
173
154
-
-`apiKey {Object}` — The options object enabling an api key service as middleware<br/>
155
-
Optional. Default: `undefined`.
156
-
157
-
-`url {string}` — The absolute url to be requested. It's possible to use a [`pupa` template][pupa] with placeholders called `realm` and `clientId` getting rendered based on the passed options.<br/>
158
-
Example: `http://barfoo.com/foo/{clientId}`<br/>
159
-
Required.
160
-
161
-
-`in {string}` — Whether the api key is placed in the headers or query.<br/>
162
-
Allowed values: `headers` & `query`<br/>
163
-
Optional. Default: `headers`.
164
-
165
-
-`name {string}` — The name of the related headers field or query key.<br/>
166
-
Optional. Default: `authorization`.
167
-
168
-
-`prefix {string}` — An optional prefix of the related api key value. Mind a trailing space if necessary.<br/>
169
-
Optional. Default: `Api-Key `.
170
-
171
-
-`tokenPath {string}` — The path to the access token in the response its body as dot notation.<br/>
172
-
Optional. Default: `access_token`.
173
-
174
-
-`request {Object}` – The detailed request options for [`got`][got].<br/>
0 commit comments