Search in sources :

Example 1 with PrePostAdviceReactiveMethodInterceptor

use of org.springframework.security.access.prepost.PrePostAdviceReactiveMethodInterceptor in project spring-security by spring-projects.

the class ReactiveMethodSecurityConfiguration method securityMethodInterceptor.

@Bean
PrePostAdviceReactiveMethodInterceptor securityMethodInterceptor(AbstractMethodSecurityMetadataSource source, MethodSecurityExpressionHandler handler) {
    ExpressionBasedPostInvocationAdvice postAdvice = new ExpressionBasedPostInvocationAdvice(handler);
    ExpressionBasedPreInvocationAdvice preAdvice = new ExpressionBasedPreInvocationAdvice();
    preAdvice.setExpressionHandler(handler);
    return new PrePostAdviceReactiveMethodInterceptor(source, preAdvice, postAdvice);
}
Also used : PrePostAdviceReactiveMethodInterceptor(org.springframework.security.access.prepost.PrePostAdviceReactiveMethodInterceptor) ExpressionBasedPostInvocationAdvice(org.springframework.security.access.expression.method.ExpressionBasedPostInvocationAdvice) ExpressionBasedPreInvocationAdvice(org.springframework.security.access.expression.method.ExpressionBasedPreInvocationAdvice) Bean(org.springframework.context.annotation.Bean)

Aggregations

Bean (org.springframework.context.annotation.Bean)1 ExpressionBasedPostInvocationAdvice (org.springframework.security.access.expression.method.ExpressionBasedPostInvocationAdvice)1 ExpressionBasedPreInvocationAdvice (org.springframework.security.access.expression.method.ExpressionBasedPreInvocationAdvice)1 PrePostAdviceReactiveMethodInterceptor (org.springframework.security.access.prepost.PrePostAdviceReactiveMethodInterceptor)1