Skip to content

Commit 8e41139

Browse files
committed
Sync documentation of main branch
1 parent 6e90165 commit 8e41139

File tree

3 files changed

+40
-12
lines changed

3 files changed

+40
-12
lines changed

_versions/main/guides/security-jwt.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1049,8 +1049,9 @@ include::{generated-dir}/config/quarkus-smallrye-jwt.adoc[opts=optional, levelof
10491049
|Property Name|Default|Description
10501050
|mp.jwt.verify.publickey|none|The `mp.jwt.verify.publickey` config property allows the Public Key text itself to be supplied as a string. The Public Key will be parsed from the supplied string in the order defined in the <<supported-public-key-formats>> section.
10511051
|mp.jwt.verify.publickey.location|none|Config property allows for an external or internal location of Public Key to be specified. The value may be a relative path or a URL. If the value points to an HTTPS based JWK set then, for it to work in native mode, the `quarkus.ssl.native` property must also be set to `true`, see xref:native-and-ssl.adoc[Using SSL With Native Executables] for more details.
1052-
|mp.jwt.verify.publickey.algorithm|`RS256`|Signature algorithm. Set it to `ES256` to support the Elliptic Curve signature algorithm.
1052+
|mp.jwt.verify.publickey.algorithm|`RS256`|List of signature algorithms. Set it to `ES256` to support the Elliptic Curve signature algorithm.
10531053
|mp.jwt.decrypt.key.location|none|Config property allows for an external or internal location of Private Decryption Key to be specified.
1054+
|mp.jwt.decrypt.key.algorithm|`RSA-OAEP`,`RSA-OAEP-256`|List of decryption algorithms. Set it to `RSA-OAEP-256` to support RSA-OAEP with SHA-256 only.
10541055
|mp.jwt.verify.issuer|none|Config property specifies the value of the `iss` (issuer) claim of the JWT that the server will accept as valid.
10551056
|mp.jwt.verify.audiences|none|Comma separated list of the audiences that a token `aud` claim may contain.
10561057
|mp.jwt.verify.clock.skew|`60`|Clock skew in seconds used during the token expiration and age verification. An expired token is accepted if the current time is within the number of seconds specified by this property after the token expiration time. The default value is 60 seconds.
@@ -1066,6 +1067,7 @@ SmallRye JWT provides more properties which can be used to customize the token p
10661067
[cols="<m,<m,<2",options="header"]
10671068
|===
10681069
|Property Name|Default|Description
1070+
|smallrye.jwt.verify.secretkey|none|Secret key supplied as a string.
10691071
|smallrye.jwt.verify.key.location|NONE|Location of the verification key which can point to both public and secret keys. Secret keys can only be in the JWK format. Note that 'mp.jwt.verify.publickey.location' will be ignored if this property is set.
10701072
|smallrye.jwt.verify.algorithm||Signature algorithm. This property should only be used for setting a required symmetric algorithm such as `HS256`. It is deprecated for setting asymmetric algorithms such as `ES256` - use 'mp.jwt.verify.publickey.algorithm' instead.
10711073
|smallrye.jwt.verify.key-format|`ANY`|Set this property to a specific key format such as `PEM_KEY`, `PEM_CERTIFICATE`, `JWK` or `JWK_BASE64URL` to optimize the way the verification key is loaded.

_versions/main/guides/security-openid-connect-client-reference.adoc

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -934,6 +934,42 @@ quarkus.oidc-client.tls.trust-store-password=${trust-store-password}
934934
#quarkus.oidc-client.tls.trust-store-alias=certAlias
935935
----
936936

937+
=== OIDC Client SPI
938+
939+
When your custom extension must acquire OIDC tokens using one of the OIDC token grants supported by OIDC client, this extension can depend on the OIDC Client SPI only and let OIDC client itself acquire and refresh access tokens as necessary.
940+
941+
Add the following dependency:
942+
943+
[source,xml]
944+
----
945+
<dependency>
946+
<groupId>io.quarkus</groupId>
947+
<artifactId>quarkus-oidc-client-spi</artifactId>
948+
</dependency>
949+
----
950+
951+
Next update your extension to use `io.quarkus.oidc.client.spi.TokenProvider` CDI bean as required, for example:
952+
953+
[source,java]
954+
----
955+
package org.acme.extension;
956+
957+
import jakarta.inject.Inject;
958+
import io.quarkus.oidc.client.spi.TokenProvider;
959+
960+
public class ExtensionOAuth2Support {
961+
962+
@Inject
963+
TokenProvider tokenProvider;
964+
965+
public Uni<String> getAccessToken() {
966+
return tokenProvider.getAccessToken();
967+
}
968+
}
969+
----
970+
971+
Currently, `io.quarkus.oidc.client.spi.TokenProvider` is only available for default OIDC clients, since custom extensions are unlikely to be aware of multiple named OIDC clients.
972+
937973
[[integration-testing-oidc-client]]
938974
=== Testing
939975

_versions/main/guides/writing-extensions.adoc

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,13 +1090,6 @@ configuration, and when they are available to applications. The phases defined b
10901090
| ✗
10911091
| Appropriate for things which affect build and must be visible for run time code. Not read from config at run time.
10921092

1093-
| BOOTSTRAP
1094-
| ✗
1095-
| ✓
1096-
| ✗
1097-
| ✓
1098-
| Used when runtime configuration needs to be obtained from an external system (like `Consul`), but details of that system need to be configurable (for example Consul's URL). The high level way this works is by using the standard Quarkus config sources (such as properties files, system properties, etc.) and producing `ConfigSourceProvider` objects which are subsequently taken into account by Quarkus when creating the final runtime `Config` object.
1099-
11001093
| RUN_TIME
11011094
| ✗
11021095
| ✓
@@ -1108,8 +1101,6 @@ configuration, and when they are available to applications. The phases defined b
11081101

11091102
For all cases other than the `BUILD_TIME` case, the configuration mapping interface and all the configuration groups and types contained therein must be located in, or reachable from, the extension's run time artifact. Configuration mappings of phase `BUILD_TIME` may be located in or reachable from either of the extension's run time or deployment artifacts.
11101103

1111-
IMPORTANT: _Bootstrap_ configuration steps are executed during runtime-init *before* any of other runtime steps. This means that code executed as part of this step cannot access anything that gets initialized in runtime init steps (runtime synthetic CDI beans being one such example).
1112-
11131104
==== Configuration Example
11141105

11151106
[source%nowrap,java]
@@ -1203,8 +1194,7 @@ Since `format` is not defined in these properties, the default value from `@With
12031194
A configuration mapping name can contain an extra suffix segment for the case where there are configuration
12041195
mappings for multiple <<config-phases>>. Classes which correspond to the `BUILD_TIME` and `BUILD_AND_RUN_TIME_FIXED`
12051196
may end with `BuildTimeConfig` or `BuildTimeConfiguration`, classes which correspond to the `RUN_TIME` phase
1206-
may end with `RuntimeConfig`, `RunTimeConfig`, `RuntimeConfiguration` or `RunTimeConfiguration` while classes which
1207-
correspond to the `BOOTSTRAP` configuration may end with `BootstrapConfig` or `BootstrapConfiguration`.
1197+
may end with `RuntimeConfig`, `RunTimeConfig`, `RuntimeConfiguration` or `RunTimeConfiguration`.
12081198

12091199
==== Configuration Reference Documentation
12101200

0 commit comments

Comments
 (0)