Skip to content

Make EnableReactiveMethodSecurity compatible with Kotlin Coroutines #8143

Closed
@TonCherAmi

Description

@TonCherAmi

Current implementation of PrePostAdviceReactiveMethodInterceptor makes it impossible to use @Pre/PostAuthorize with suspending functions:

// PrePostAdviceReactiveMethodInterceptor::invoke
if (!Publisher.class.isAssignableFrom(returnType)) {
    throw new IllegalStateException("The returnType " + returnType + " on " + method + " must return an instance of org.reactivestreams.Publisher (i.e. Mono / Flux) in order to support Reactor Context");
}

This may be related to spring-projects/spring-framework#22462

Spring boot version: 2.2.1.RELEASE

Metadata

Metadata

Assignees

Labels

in: coreAn issue in spring-security-coretype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions