File tree Expand file tree Collapse file tree 2 files changed +41
-0
lines changed
java/org/springframework/security/config/http
resources/org/springframework/security/config/http Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -548,6 +548,14 @@ public void configureWhenProtectingLoginPageThenWarningLogged() {
548
548
assertThat (baos .toString ()).contains ("[WARN]" );
549
549
}
550
550
551
+ @ Test
552
+ public void configureWhenProtectingLoginPageAuthorizationManagerThenWarningLogged () {
553
+ ByteArrayOutputStream baos = new ByteArrayOutputStream ();
554
+ redirectLogsTo (baos , DefaultFilterChainValidator .class );
555
+ this .spring .configLocations (xml ("ProtectedLoginPageAuthorizationManager" )).autowire ();
556
+ assertThat (baos .toString ()).contains ("[WARN]" );
557
+ }
558
+
551
559
@ Test
552
560
public void configureWhenUsingDisableUrlRewritingThenRedirectIsNotEncodedByResponse ()
553
561
throws IOException , ServletException {
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <!--
3
+ ~ Copyright 2002-2018 the original author or authors.
4
+ ~
5
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
6
+ ~ you may not use this file except in compliance with the License.
7
+ ~ You may obtain a copy of the License at
8
+ ~
9
+ ~ https://www.apache.org/licenses/LICENSE-2.0
10
+ ~
11
+ ~ Unless required by applicable law or agreed to in writing, software
12
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
13
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ ~ See the License for the specific language governing permissions and
15
+ ~ limitations under the License.
16
+ -->
17
+
18
+ <b : beans xmlns : b =" http://www.springframework.org/schema/beans"
19
+ xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"
20
+ xmlns=" http://www.springframework.org/schema/security"
21
+ xsi:schemaLocation="
22
+ http://www.springframework.org/schema/security
23
+ https://www.springframework.org/schema/security/spring-security.xsd
24
+ http://www.springframework.org/schema/beans
25
+ https://www.springframework.org/schema/beans/spring-beans.xsd" >
26
+
27
+ <http use-authorization-manager =" true" >
28
+ <form-login login-page =" /login" />
29
+ <intercept-url pattern =" /login*" access =" hasRole('ROLE_A')" />
30
+ </http >
31
+
32
+ <b : import resource =" userservice.xml" />
33
+ </b : beans >
You can’t perform that action at this time.
0 commit comments