Skip to content

AuthorizationDenied and Granted EventListeners Should Support Generics #16700

Closed
@jzheaux

Description

@jzheaux

It would be nice if users could listen for authorization events specific to the type of source:

@EventListener
public void onEvent(AuthorizationDeniedEvent<MethodInvocation> event) {
    // ...
}

One way this can be done is by having AuthorizationDeniedEvent and AuthorizationGrantedEvent implement ResolvableTypeProvider:

ResolvableType type = ResolvableType.forClassWithGenerics(getClass(), ResolvableType.forInstance(getObject()));

Metadata

Metadata

Labels

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

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions