Skip to content

Commit 4291e61

Browse files
committed
Sync documentation of main branch
1 parent 8bc5f43 commit 4291e61

File tree

2 files changed

+54
-14
lines changed

2 files changed

+54
-14
lines changed

_generated-doc/main/infra/quarkus-maven-plugin-goals.adoc

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,6 +1222,18 @@ Additional compiler arguments
12221222
|`List`
12231223
|
12241224

1225+
a| [[quarkus-maven-plugin-goal-dev-copySurefireVariables]] copySurefireVariables
1226+
1227+
[.description]
1228+
--
1229+
When enabled, the <environmentVariables> and <systemPropertyVariables> elements of the Maven Surefire plugin are copied to environment variables and system properties defined by this plugin. Note that no other Surefire configuration is used (notably <systemProperties>), only the 2 elements mentioned above.
1230+
This plugin's <environmentVariables> and <systemProperties> have priority, so duplicate keys are not copied.
1231+
1232+
Since environment variables and system properties are global to the entire process, this also affects dev mode (when executed as quarkus:dev). Because of that, this copying action is disabled by default and requires opt-in.
1233+
--
1234+
|`boolean`
1235+
|`false`
1236+
12251237
a| [[quarkus-maven-plugin-goal-dev-debug]] debug
12261238

12271239
[.description]
@@ -2933,6 +2945,18 @@ Additional compiler arguments
29332945
|`List`
29342946
|
29352947

2948+
a| [[quarkus-maven-plugin-goal-remote-dev-copySurefireVariables]] copySurefireVariables
2949+
2950+
[.description]
2951+
--
2952+
When enabled, the <environmentVariables> and <systemPropertyVariables> elements of the Maven Surefire plugin are copied to environment variables and system properties defined by this plugin. Note that no other Surefire configuration is used (notably <systemProperties>), only the 2 elements mentioned above.
2953+
This plugin's <environmentVariables> and <systemProperties> have priority, so duplicate keys are not copied.
2954+
2955+
Since environment variables and system properties are global to the entire process, this also affects dev mode (when executed as quarkus:dev). Because of that, this copying action is disabled by default and requires opt-in.
2956+
--
2957+
|`boolean`
2958+
|`false`
2959+
29362960
a| [[quarkus-maven-plugin-goal-remote-dev-debug]] debug
29372961

29382962
[.description]
@@ -3419,6 +3443,18 @@ Additional compiler arguments
34193443
|`List`
34203444
|
34213445

3446+
a| [[quarkus-maven-plugin-goal-test-copySurefireVariables]] copySurefireVariables
3447+
3448+
[.description]
3449+
--
3450+
When enabled, the <environmentVariables> and <systemPropertyVariables> elements of the Maven Surefire plugin are copied to environment variables and system properties defined by this plugin. Note that no other Surefire configuration is used (notably <systemProperties>), only the 2 elements mentioned above.
3451+
This plugin's <environmentVariables> and <systemProperties> have priority, so duplicate keys are not copied.
3452+
3453+
Since environment variables and system properties are global to the entire process, this also affects dev mode (when executed as quarkus:dev). Because of that, this copying action is disabled by default and requires opt-in.
3454+
--
3455+
|`boolean`
3456+
|`false`
3457+
34223458
a| [[quarkus-maven-plugin-goal-test-debug]] debug
34233459

34243460
[.description]

_versions/main/guides/security-jwt.adoc

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -359,31 +359,35 @@ import java.util.Arrays;
359359
import java.util.HashSet;
360360
361361
import org.eclipse.microprofile.jwt.Claims;
362-
363362
import io.smallrye.jwt.build.Jwt;
364363
364+
/**
365+
* A utility class to generate and print a JWT token string to stdout.
366+
*/
365367
public class GenerateToken {
368+
366369
/**
367-
* Generate JWT token
370+
* Generates and prints a JWT token.
368371
*/
369372
public static void main(String[] args) {
370-
String token =
371-
Jwt.issuer("https://example.com/issuer") // <1>
372-
.upn("[email protected]") // <2>
373-
.groups(new HashSet<>(Arrays.asList("User", "Admin"))) // <3>
374-
.claim(Claims.birthdate.name(), "2001-07-13") // <4>
375-
.sign();
373+
String token = Jwt.issuer("https://example.com/issuer") // <1>
374+
.upn("[email protected]") // <2>
375+
.groups(new HashSet<>(Arrays.asList("User", "Admin"))) // <3>
376+
.claim(Claims.birthdate.name(), "2001-07-13") // <4>
377+
.sign();
378+
376379
System.out.println(token);
380+
System.exit(0);
377381
}
378382
}
379383
----
380384

381-
<1> Set JWT issuer as an `iss` claim value.
382-
This must match the server side `mp.jwt.verify.issuer` for the token to be accepted as valid.
383-
<2> The `upn` claim is defined by the {mp-jwt} spec as the preferred claim to use for the `Principal` seen by the container security APIs.
384-
<3> The `group` claim provides the groups and top-level roles associated with the JWT bearer.
385-
<4> The `birthday` claim.
386-
It can be considered a sensitive claim, so consider encrypting the claims, as described in xref:security-jwt-build.adoc[Generate JWT tokens with SmallRye JWT].
385+
<1> Sets the `iss` (issuer) claim in the JWT.
386+
This value must match the server-side `mp.jwt.verify.issuer` configuration for the token to be considered valid.
387+
<2> Specifies the `upn` (User Principal Name) claim, which the {mp-jwt} specification defines as the preferred claim for identifying the `Principal` in container security APIs.
388+
<3> Defines the `groups` claim, which provides the group memberships and top-level roles assigned to the JWT bearer.
389+
<4> Adds a `birthdate` claim.
390+
Because this can be considered sensitive information, consider encrypting claims as described in xref:security-jwt-build.adoc[Generate JWT tokens with SmallRye JWT].
387391

388392
Note that for this code to work, you need the content of the RSA private key corresponding to the public key you have in the `TokenSecuredResource` application.
389393
Take the following PEM content and place it into `security-jwt-quickstart/src/test/resources/privateKey.pem`:

0 commit comments

Comments
 (0)