forked from spring-projects/spring-security
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes spring-projectsgh-14597
- Loading branch information
Showing
8 changed files
with
407 additions
and
2 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
.../org/springframework/security/authorization/method/aspectj/AuthorizeReturnObjectAspect.aj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* Copyright 2002-2024 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.springframework.security.authorization.method.aspectj; | ||
|
||
import org.aopalliance.intercept.MethodInterceptor; | ||
import org.aopalliance.intercept.MethodInvocation; | ||
|
||
import org.springframework.beans.factory.InitializingBean; | ||
import org.springframework.security.authorization.method.AuthorizeReturnObject; | ||
|
||
/** | ||
* Concrete AspectJ aspect using Spring Security @AuthorizeReturnObject annotation. | ||
* | ||
* <p> | ||
* When using this aspect, you <i>must</i> annotate the implementation class | ||
* (and/or methods within that class), <i>not</i> the interface (if any) that | ||
* the class implements. AspectJ follows Java's rule that annotations on | ||
* interfaces are <i>not</i> inherited. This will vary from Spring AOP. | ||
* | ||
* @author Josh Cummings | ||
* @since 6.3 | ||
*/ | ||
public aspect AuthorizeReturnObjectAspect extends AbstractMethodInterceptorAspect { | ||
|
||
/** | ||
* Matches the execution of any method with a AuthorizeReturnObject annotation. | ||
*/ | ||
protected pointcut executionOfAnnotatedMethod() : execution(* *(..)) && @annotation(AuthorizeReturnObject); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.