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
summary: Use a unified configuration model to define data sources for Java Database Connectivity (JDBC) and Reactive drivers.
33
-
categories: "getting-started, data"
33
+
categories: "data, getting-started"
34
34
id: datasources
35
35
type: reference
36
36
url: /guides/datasource
@@ -55,7 +55,7 @@ types:
55
55
- title: Logging configuration
56
56
filename: logging.adoc
57
57
summary: "Read about the use of logging API in Quarkus, configuring logging output, and using logging adapters to unify the output from other logging APIs."
summary: Secure HTTP access to Jakarta REST (formerly known as JAX-RS) endpoints in your application with Bearer token authentication by using the Quarkus OpenID Connect (OIDC) extension.
summary: "To protect your web applications, you can use the industry-standard OpenID Connect (OIDC) Authorization Code Flow mechanism provided by the Quarkus OIDC extension."
summary: "With the Quarkus OpenID Connect (OIDC) extension, you can protect application HTTP endpoints by using the OIDC Authorization Code Flow mechanism."
a| https://github.com/quarkusio/quarkus/blob/main/core/deployment/src/main/java/io/quarkus/deployment/builditem/HotDeploymentWatchedFileBuildItem.java[`io.quarkus.deployment.builditem.HotDeploymentWatchedFileBuildItem`, window="_blank"] :: +++Identifies a file from a that, if modified, may result in a hot redeployment when in the dev mode. <p> A file may be identified with an exact location or a matching predicate. See and . <p> If multiple build items match the same file then the final value of is computed as a logical OR of all the values.+++
You must update the application registered with the xref:google[Google] provider to list `http://localhost:8080/calendar/event` as one of the authorized redirect URIs if you would like to test this endpoint on the local host, for example:
You might also have to register one or more test users:
600
+
601
+
image::oidc-google-test-users.png[role="thumb"]
602
+
603
+
Follow the same approach if the endpoint must access other Google services.
604
+
605
+
The pattern of authenticating with a given provider, where the endpoint uses either an ID token or UserInfo (especially if an OAuth2-only provider such as `GitHub` is used) to get some information about the currently authenticated user and using an access token to access some downstream services (provider or application specific ones) on behalf of this user can be universally applied, irrespectively of which provider is used to secure the application.
606
+
549
607
== HTTPS Redirect URL
550
608
551
609
Some providers will only accept HTTPS-based redirect URLs. Tools such as https://ngrok.com/[ngrok] https://linuxhint.com/set-up-use-ngrok/[can be set up] to help testing such providers with Quarkus endpoints running on localhost in devmode.
When you run your test (remember to use Java 21+), Quarkus detects pinned carrier threads.
496
+
When it happens, the test fails.
497
+
498
+
The `@ShouldNotPin` can also be used on methods directly.
499
+
500
+
The _junit5-virtual-threads_ also provides a `@ShouldPin` annotation for cases where pinning is unavoidable.
501
+
The following snippet demonstrates the `@ShouldPin` annotation usage and the possibility to inject a `ThreadPinnedEvents` instance in your test to verify when the carrier thread was pinned manually.
502
+
503
+
[source, java]
504
+
----
505
+
@VirtualThreadUnit // Use the extension
506
+
public class LoomUnitExampleTest {
507
+
508
+
CodeUnderTest codeUnderTest = new CodeUnderTest();
509
+
510
+
@Test
511
+
@ShouldNotPin
512
+
public void testThatShouldNotPin() {
513
+
// ...
514
+
}
515
+
516
+
@Test
517
+
@ShouldPin(atMost = 1)
518
+
public void testThatShouldPinAtMostOnce() {
519
+
codeUnderTest.pin();
520
+
}
521
+
522
+
@Test
523
+
public void testThatShouldNotPin(ThreadPinnedEvents events) { // Inject an object to check the pin events
0 commit comments