Skip to content

Commit

Permalink
Separate OAuth 2.0 Client Servlet Docs
Browse files Browse the repository at this point in the history
Issue gh-10367
  • Loading branch information
jzheaux committed Nov 5, 2021
1 parent e350c8a commit 8269691
Show file tree
Hide file tree
Showing 12 changed files with 1,724 additions and 1,802 deletions.
6 changes: 5 additions & 1 deletion docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@
*** xref:servlet/authorization/acls.adoc[Domain Object Security ACLs]
** xref:servlet/oauth2/index.adoc[OAuth2]
*** xref:servlet/oauth2/oauth2-login.adoc[OAuth2 Log In]
*** xref:servlet/oauth2/oauth2-client.adoc[OAuth2 Client]
*** xref:servlet/oauth2/client/index.adoc[OAuth2 Client]
**** xref:servlet/oauth2/client/core.adoc[Core Interfaces and Classes]
**** xref:servlet/oauth2/client/authorization-grants.adoc[OAuth2 Authorization Grants]
**** xref:servlet/oauth2/client/client-authentication.adoc[OAuth2 Client Authentication]
**** xref:servlet/oauth2/client/authorized-clients.adoc[OAuth2 Authorized Clients]
*** xref:servlet/oauth2/resource-server/index.adoc[OAuth2 Resource Server]
**** xref:servlet/oauth2/resource-server/jwt.adoc[JWT]
**** xref:servlet/oauth2/resource-server/opaque-token.adoc[Opaque Token]
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/features/integrations/jackson.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ The following Spring Security modules provide Jackson support:
- spring-security-core (`CoreJackson2Module`)
- spring-security-web (`WebJackson2Module`, `WebServletJackson2Module`, `WebServerJackson2Module`)
- xref:servlet/oauth2/oauth2-client.adoc#oauth2client[ spring-security-oauth2-client] (`OAuth2ClientJackson2Module`)
- xref:servlet/oauth2/client/index.adoc#oauth2client[ spring-security-oauth2-client] (`OAuth2ClientJackson2Module`)
- spring-security-cas (`CasJackson2Module`)
====
6 changes: 3 additions & 3 deletions docs/modules/ROOT/pages/reactive/oauth2/login.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ The redirect URI is the path in the application that the end-user's user-agent i
In the "Set a redirect URI" sub-section, ensure that the *Authorized redirect URIs* field is set to `http://localhost:8080/login/oauth2/code/google`.

TIP: The default redirect URI template is `+{baseUrl}/login/oauth2/code/{registrationId}+`.
The *_registrationId_* is a unique identifier for the xref:servlet/oauth2/oauth2-client.adoc#oauth2Client-client-registration[ClientRegistration].
The *_registrationId_* is a unique identifier for the xref:servlet/oauth2/client/core.adoc#oauth2Client-client-registration[ClientRegistration].
For our example, the `registrationId` is `google`.

IMPORTANT: If the OAuth Client is running behind a proxy server, it is recommended to check xref:features/exploits/http.adoc#http-proxy-server[Proxy Server Configuration] to ensure the application is correctly configured.
Also, see the supported xref:servlet/oauth2/oauth2-client.adoc#oauth2Client-auth-code-redirect-uri[ `URI` template variables] for `redirect-uri`.
Also, see the supported xref:servlet/oauth2/client/authorization-grants.adoc#oauth2Client-auth-code-redirect-uri[ `URI` template variables] for `redirect-uri`.

[[webflux-oauth2-login-sample-config]]
=== Configure `application.yml`
Expand All @@ -68,7 +68,7 @@ spring:
.OAuth Client properties
====
<1> `spring.security.oauth2.client.registration` is the base property prefix for OAuth Client properties.
<2> Following the base property prefix is the ID for the xref:servlet/oauth2/oauth2-client.adoc#oauth2Client-client-registration[ClientRegistration], such as google.
<2> Following the base property prefix is the ID for the xref:servlet/oauth2/client/index.adoc#oauth2Client-client-registration[`ClientRegistration`], such as google.
====

. Replace the values in the `client-id` and `client-secret` property with the OAuth 2.0 credentials you created earlier.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ END;

[[dbschema-oauth2-client]]
== OAuth 2.0 Client Schema
The JDBC implementation of xref:servlet/oauth2/oauth2-client.adoc#oauth2Client-authorized-repo-service[ OAuth2AuthorizedClientService] (`JdbcOAuth2AuthorizedClientService`) requires a table for persisting `OAuth2AuthorizedClient`(s).
The JDBC implementation of xref:servlet/oauth2/client/core.adoc#oauth2Client-authorized-repo-service[ OAuth2AuthorizedClientService] (`JdbcOAuth2AuthorizedClientService`) requires a table for persisting `OAuth2AuthorizedClient`(s).
You will need to adjust this schema to match the database dialect you are using.

[source,ddl]
Expand Down
6 changes: 3 additions & 3 deletions docs/modules/ROOT/pages/servlet/appendix/namespace/http.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ Reference to the `JwtDecoderFactory` used by `OidcAuthorizationCodeAuthenticatio

[[nsa-oauth2-client]]
== <oauth2-client>
Configures xref:servlet/oauth2/oauth2-client.adoc#oauth2client[OAuth 2.0 Client] support.
Configures xref:servlet/oauth2/client/index.adoc#oauth2client[OAuth 2.0 Client] support.


[[nsa-oauth2-client-parents]]
Expand Down Expand Up @@ -982,7 +982,7 @@ Reference to the `OAuth2AuthorizedClientService`.

[[nsa-authorization-code-grant]]
== <authorization-code-grant>
Configures xref:servlet/oauth2/oauth2-client.adoc#oauth2Client-auth-grant-support[OAuth 2.0 Authorization Code Grant].
Configures xref:servlet/oauth2/client/authorization-grants.adoc#oauth2Client-auth-grant-support[OAuth 2.0 Authorization Code Grant].


[[nsa-authorization-code-grant-parents]]
Expand Down Expand Up @@ -1012,7 +1012,7 @@ Reference to the `OAuth2AccessTokenResponseClient`.

[[nsa-client-registrations]]
== <client-registrations>
A container element for client(s) registered (xref:servlet/oauth2/oauth2-client.adoc#oauth2Client-client-registration[ClientRegistration]) with an OAuth 2.0 or OpenID Connect 1.0 Provider.
A container element for client(s) registered (xref:servlet/oauth2/client/index.adoc#oauth2Client-client-registration[ClientRegistration]) with an OAuth 2.0 or OpenID Connect 1.0 Provider.


[[nsa-client-registrations-children]]
Expand Down
Loading

0 comments on commit 8269691

Please sign in to comment.