Skip to content

AuthorizationDenied and Granted EventListeners Should Support Generics #16700

Closed
@jzheaux

Description

@jzheaux
Contributor

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()));

Activity

self-assigned this
on Mar 6, 2025
franticticktick

franticticktick commented on Mar 6, 2025

@franticticktick
Contributor

Hi @jzheaux, i would like to work on this ticket, could you assign it to me please?

added 2 commits that reference this issue on Mar 18, 2025
85ec32d
41e1f39
added 2 commits that reference this issue on Mar 20, 2025
a297709
de034f7
added a commit that references this issue on Mar 20, 2025
added a commit that references this issue on Mar 20, 2025
added a commit that references this issue on Mar 20, 2025
ed79efc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

    Participants

    @jzheaux@franticticktick

    Issue actions

      AuthorizationDenied and Granted EventListeners Should Support Generics · Issue #16700 · spring-projects/spring-security