comparison xml/en/docs/http/ngx_http_auth_jwt_module.xml @ 2866:8bd6f772005f

Updated docs for the upcoming NGINX Plus release.
author Yaroslav Zhuravlev <yar@nginx.com>
date Sat, 25 Jun 2022 18:55:17 +0100
parents b64410025027
children
comparison
equal deleted inserted replaced
2865:0d355d154181 2866:8bd6f772005f
369 369
370 </directive> 370 </directive>
371 371
372 372
373 <directive name="auth_jwt_require"> 373 <directive name="auth_jwt_require">
374 <syntax><value>value</value> ...</syntax> 374 <syntax>
375 <value>$value</value> ...
376 [<literal>error</literal>=<literal>401</literal> |
377 <literal>403</literal>]
378 </syntax>
375 <default/> 379 <default/>
376 <context>http</context> 380 <context>http</context>
377 <context>server</context> 381 <context>server</context>
378 <context>location</context> 382 <context>location</context>
379 <context>limit_except</context> 383 <context>limit_except</context>
380 <appeared-in>1.21.2</appeared-in> 384 <appeared-in>1.21.2</appeared-in>
381 385
382 <para> 386 <para>
383 Defines additional conditions for JWT validation. 387 Specifies additional checks for JWT validation.
384 The value can contain text, variables, and their combination. 388 The value can contain text, variables, and their combination,
389 and must start with a variable (1.21.7).
385 The authentication will succeed only 390 The authentication will succeed only
386 if all the values are not empty and are not equal to “0”. 391 if all the values are not empty and are not equal to “0”.
387 <example> 392 <example>
388 map $jwt_claim_iss $valid_jwt_iss { 393 map $jwt_claim_iss $valid_jwt_iss {
389 "good" 1; 394 "good" 1;
390 } 395 }
391 ... 396 ...
392 397
393 auth_jwt_require $valid_jwt_iss; 398 auth_jwt_require $valid_jwt_iss;
394 </example> 399 </example>
400 </para>
401
402 <para>
403 If any of the checks fails,
404 the <literal>401</literal> error code is returned.
405 The optional <literal>error</literal> parameter (1.21.7)
406 allows redefining the error code to <literal>403</literal>.
395 </para> 407 </para>
396 408
397 </directive> 409 </directive>
398 410
399 </section> 411 </section>