diff --git a/docs/manual/src/docs/asciidoc/_includes/servlet/oauth2/oauth2-login.adoc b/docs/manual/src/docs/asciidoc/_includes/servlet/oauth2/oauth2-login.adoc index 45902711b8..6badf5a796 100644 --- a/docs/manual/src/docs/asciidoc/_includes/servlet/oauth2/oauth2-login.adoc +++ b/docs/manual/src/docs/asciidoc/_includes/servlet/oauth2/oauth2-login.adoc @@ -421,7 +421,10 @@ class OAuth2LoginConfig { If you are not able to use Spring Boot 2.x and would like to configure one of the pre-defined providers in `CommonOAuth2Provider` (for example, Google), apply the following configuration: -[source,java] +.OAuth2 Login Configuration +==== +.Java +[source,java,role="primary"] ---- @Configuration public class OAuth2LoginConfig { @@ -465,6 +468,33 @@ public class OAuth2LoginConfig { } ---- +.Xml +[source,xml,role="secondary"] +---- + + + + + + + + + + + + + + +---- +==== + + [[oauth2login-advanced]] === Advanced Configuration @@ -628,6 +658,33 @@ class OAuth2LoginSecurityConfig : WebSecurityConfigurerAdapter() { ---- ==== +In addition to the `oauth2Login()` DSL, XML configuration is also supported. + +The following code shows the complete configuration options available in the <>: + +.OAuth2 Login XML Configuration Options +==== +[source,xml] +---- + + + +---- +==== + The following sections go into more detail on each of the configuration options available: * <> @@ -701,6 +758,16 @@ class OAuth2LoginSecurityConfig : WebSecurityConfigurerAdapter() { } } ---- + +.Xml +[source,xml,role="secondary"] +---- + + + +---- ==== [IMPORTANT] @@ -771,6 +838,16 @@ class OAuth2LoginSecurityConfig : WebSecurityConfigurerAdapter() { } } ---- + +.Xml +[source,xml,role="secondary"] +---- + + + +---- ==== [IMPORTANT] @@ -906,6 +983,16 @@ class OAuth2LoginSecurityConfig : WebSecurityConfigurerAdapter() { } } ---- + +.Xml +[source,xml,role="secondary"] +---- + + + +---- ==== Alternatively, you may register a `GrantedAuthoritiesMapper` `@Bean` to have it automatically applied to the configuration, as shown in the following example: @@ -1040,6 +1127,16 @@ class OAuth2LoginSecurityConfig : WebSecurityConfigurerAdapter() { } } ---- + +.Xml +[source,xml,role="secondary"] +---- + + + +---- ====