From e4eb20c7b7fe3d84deed61f54a3f2ad75561d37a Mon Sep 17 00:00:00 2001 From: Rolfe Dlugy-Hegwer Date: Tue, 7 Jan 2025 15:55:38 -0500 Subject: [PATCH] Conditionalize references to OAuth2 --- .../asciidoc/security-authentication-mechanisms.adoc | 10 ++++++++++ .../src/main/asciidoc/security-identity-providers.adoc | 7 ++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/src/main/asciidoc/security-authentication-mechanisms.adoc b/docs/src/main/asciidoc/security-authentication-mechanisms.adoc index f5cc1a250b9e02..1bae920df2cee5 100644 --- a/docs/src/main/asciidoc/security-authentication-mechanisms.adoc +++ b/docs/src/main/asciidoc/security-authentication-mechanisms.adoc @@ -402,7 +402,12 @@ For more information about managing the individual tenant configurations in mult ==== OpenID Connect client and filters +ifndef::no-quarkus-elytron-security-oauth2[] The `quarkus-oidc-client` extension provides `OidcClient` for acquiring and refreshing access tokens from OpenID Connect and OAuth2 providers that support the following token grants: +endif::no-quarkus-elytron-security-oauth2[] +ifdef::no-quarkus-elytron-security-oauth2[] +The `quarkus-oidc-client` extension provides `OidcClient` for acquiring and refreshing access tokens from OpenID Connect providers that support the following token grants: +endif::no-quarkus-elytron-security-oauth2[] * `client-credentials` * `password` @@ -448,7 +453,12 @@ For more information, see the Quarkus xref:security-oauth2.adoc[Using OAuth2] gu endif::no-quarkus-elytron-security-oauth2[] [[oidc-jwt-oauth2-comparison]] +ifndef::no-quarkus-elytron-security-oauth2[] == Choosing between OpenID Connect, SmallRye JWT, and OAuth2 authentication mechanisms +endif::no-quarkus-elytron-security-oauth2[] +ifdef::no-quarkus-elytron-security-oauth2[] +== Choosing between OpenID Connect and SmallRye JWT authentication mechanisms +endif::no-quarkus-elytron-security-oauth2[] Use the following information to select the appropriate token authentication mechanism to secure your Quarkus applications. diff --git a/docs/src/main/asciidoc/security-identity-providers.adoc b/docs/src/main/asciidoc/security-identity-providers.adoc index aee512286f909d..c5c6cda5fb014c 100644 --- a/docs/src/main/asciidoc/security-identity-providers.adoc +++ b/docs/src/main/asciidoc/security-identity-providers.adoc @@ -17,7 +17,12 @@ In the Quarkus Security framework, identity providers play a crucial role in aut [[identity-providers]] `IdentityProvider` converts the authentication credentials provided by `HttpAuthenticationMechanism` to a `SecurityIdentity` instance. -Some extensions, for example, `OIDC`, `OAuth2`, and `SmallRye JWT`, have inline `IdentityProvider` implementations specific to the supported authentication flow. +ifndef::no-quarkus-elytron-security-oauth2[] +Some extensions, such as `OIDC`, `OAuth2`, and `SmallRye JWT`, include inline `IdentityProvider` implementations specific to their supported authentication flows. +endif::no-quarkus-elytron-security-oauth2[] +ifdef::no-quarkus-elytron-security-oauth2[] +Some extensions, such as `OIDC` and `SmallRye JWT`, include inline `IdentityProvider` implementations specific to their supported authentication flows. +endif::no-quarkus-elytron-security-oauth2[] For example, `quarkus-oidc` uses its own `IdentityProvider` to convert a token to a `SecurityIdentity` instance. If you use Basic or form-based authentication, you must add an `IdentityProvider` instance to convert a username and password to a `SecurityIdentity` instance.