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
|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.
1051
1051
|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.
1053
1053
|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.
1054
1055
|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.
1055
1056
|mp.jwt.verify.audiences|none|Comma separated list of the audiences that a token `aud` claim may contain.
1056
1057
|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
1066
1067
[cols="<m,<m,<2",options="header"]
1067
1068
|===
1068
1069
|Property Name|Default|Description
1070
+
|smallrye.jwt.verify.secretkey|none|Secret key supplied as a string.
1069
1071
|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.
1070
1072
|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.
1071
1073
|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.
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.
Copy file name to clipboardExpand all lines: _versions/main/guides/writing-extensions.adoc
+1-11Lines changed: 1 addition & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -1090,13 +1090,6 @@ configuration, and when they are available to applications. The phases defined b
1090
1090
| ✗
1091
1091
| Appropriate for things which affect build and must be visible for run time code. Not read from config at run time.
1092
1092
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
-
1100
1093
| RUN_TIME
1101
1094
| ✗
1102
1095
| ✓
@@ -1108,8 +1101,6 @@ configuration, and when they are available to applications. The phases defined b
1108
1101
1109
1102
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.
1110
1103
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
-
1113
1104
==== Configuration Example
1114
1105
1115
1106
[source%nowrap,java]
@@ -1203,8 +1194,7 @@ Since `format` is not defined in these properties, the default value from `@With
1203
1194
A configuration mapping name can contain an extra suffix segment for the case where there are configuration
1204
1195
mappings for multiple <<config-phases>>. Classes which correspond to the `BUILD_TIME` and `BUILD_AND_RUN_TIME_FIXED`
1205
1196
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`.
0 commit comments