Add role=primary/secondary example

Issue gh-7801
This commit is contained in:
Rob Winch 2020-01-08 22:00:17 -06:00
parent b85b4b8643
commit 3fb87d10e9

View File

@ -7,11 +7,12 @@ This section provides details on how Spring Security provides support for https:
Spring Security's HTTP Basic Authentication support in is enabled by default. Spring Security's HTTP Basic Authentication support in is enabled by default.
However, as soon as any servlet based configuration is provided, HTTP Basic must be explicitly provided. However, as soon as any servlet based configuration is provided, HTTP Basic must be explicitly provided.
A minimal, explicit Java configuration can be found below: A minimal, explicit configuration can be found below:
.HTTP Basic Java Configuration .Explicit HTTP Basic Configuration
==== ====
[source,java] [source,java,role="primary"]
.Java
---- ----
protected void configure(HttpSecurity http) { protected void configure(HttpSecurity http) {
http http
@ -19,13 +20,9 @@ protected void configure(HttpSecurity http) {
.httpBasic(withDefaults()); .httpBasic(withDefaults());
} }
---- ----
====
A minimal XML configuration can be found below: [source,xml,role="secondary"]
.XML
.HTTP Basic XML Configuration
====
[source,xml]
---- ----
<http> <http>
<!-- ... --> <!-- ... -->