Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For browser-based OpenID Connect login in Undertow, use the undertow-pac4j integration: configure pac4j’s indirect OidcClient, protect the routes that require authentication with a SecurityHandler, and register a CallbackHandler to finish login after the identity provider redirects back. Add a LogoutHandler if users need to sign out. Select compatible released versions first; the project’s master-branch dependency declarations are snapshot build values, not a release bill of materials.

How the Undertow and pac4j login flow fits together

In a web application, an unauthenticated request to a protected route starts an indirect login. The browser is redirected to the identity provider, then returns to the application, where the callback completes the login. Subsequent protected requests can use the authenticated profile maintained through the application’s pac4j integration.

The maintainers describe undertow-pac4j as a security library for Undertow web applications, based on Java 17, Undertow 2, and pac4j 6. It supports authentication, authorization, application logout, and features including CSRF protection. Its README distinguishes indirect clients for web application authentication from direct clients for web services authentication. For browser login, use the indirect OIDC client.

Check release compatibility before adding dependencies

Choose the released undertow-pac4j artifact first, then follow that release’s Java requirements and dependency metadata. The project README describes a Java 17, Undertow 2, pac4j 6 baseline. By contrast, the inspected master-branch pom declares module version 6.0.2-SNAPSHOT, Undertow 2.4.2.Final, and pac4j 6.5.5. Those are branch-specific build declarations, not proof of the latest release or a compatible set for every release.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Add the integration and OIDC dependencies using the selected release’s published artifact metadata or dependency documentation. The project’s setup guide identifies dependencies as the first step, but exact Maven coordinates and versions should not be inferred from the snapshot pom or copied across release lines.

Configure OIDC and pac4j security

Create an OIDC client for the identity provider and place it in pac4j’s security configuration (Config). Set the provider-specific issuer, client credentials, redirect URI, scopes, and logout behavior according to that provider and the documentation for the chosen pac4j release. These values vary; there is no safe provider-neutral configuration to copy without knowing the provider and release.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

pac4j’s OidcClient is an OpenID Connect 1.0 client. Its source documents code as the default response type. Confirm any flow or provider-specific settings against the version actually used by the application.

Protect routes and complete the callback

Apply security to the routes that need it

Attach an Undertow SecurityHandler to protected application paths and configure the client and any required authorizers. The handler checks authentication and authorization; an unauthenticated request starts indirect login when the configured client is appropriate. Keep public pages, health checks, and other operational endpoints outside the protected scope unless they genuinely require a logged-in user.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

Register the callback endpoint

Configure a CallbackHandler for the indirect login return. After the identity provider redirects the browser back, this handler finishes the login process. Register the same externally visible callback URL with the identity provider and in the application configuration, accounting for the application’s public scheme, host, and path. The exact default callback path is not established by the project overview, so use the selected release’s callback documentation rather than assuming one.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Choose logout behavior and retrieve the profile

Configure a LogoutHandler if the application needs logout. Decide whether logout should end only the application session or also trigger logout at the identity provider; provider support and exact settings vary. The project describes its handler as logging the user out of the application and triggering identity-provider logout.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

After security is applied, use the pac4j context and session integration to retrieve the authenticated user profile where needed. The project setup guide includes profile retrieval, but the exact Undertow API and method signatures should be checked in the documentation for the selected release.

Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

Implementation checklist

  1. Choose a released version set. Check the selected undertow-pac4j release’s Java and dependency requirements; do not treat master’s snapshot pom as stable release guidance.
  2. Add dependencies. Use artifact coordinates and versions from that release’s published metadata or dependency documentation.
  3. Configure the indirect OIDC client. Set the identity-provider details and add the client to pac4j’s security configuration.
  4. Scope protected routes. Apply SecurityHandler where authentication or authorization is required; leave intended public routes accessible.
  5. Wire the callback. Register CallbackHandler and ensure the provider’s redirect URI matches the application’s externally visible callback URL.
  6. Set logout and profile handling. Decide whether provider logout is needed and verify profile access against the release-specific Undertow API.
  7. Validate with the target provider. The project README points to a demo application with OpenID Connect among its authentication examples. Use a version-matched example and verify redirects, callback handling, protected and public routes, authorization, profile access, and logout in the target environment.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.