Skip to content

Commit a9cdaf3

Browse files
Introduce AuthorizationResult
1 parent f8fde0d commit a9cdaf3

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

core/src/main/java/org/springframework/security/authorization/AuthorizationDecision.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2021 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,14 +20,15 @@
2020
* @author Rob Winch
2121
* @since 5.0
2222
*/
23-
public class AuthorizationDecision {
23+
public class AuthorizationDecision implements AuthorizationResult {
2424

2525
private final boolean granted;
2626

2727
public AuthorizationDecision(boolean granted) {
2828
this.granted = granted;
2929
}
3030

31+
@Override
3132
public boolean isGranted() {
3233
return this.granted;
3334
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* Copyright 2002-2024 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package org.springframework.security.authorization;
18+
19+
public interface AuthorizationResult {
20+
21+
boolean isGranted();
22+
23+
}

0 commit comments

Comments
 (0)