Skip to content

Introduce ReactiveJwtAuthenticationConverter #6273

Closed
@jzheaux

Description

@jzheaux

Users often need to consult external resources in a non-blocking way to collect granted authorities in Resource Server.

This is currently possible by implementing a Converter<Jwt, ? extends Mono<? extends AbstractAuthenticationToken>>.

On the Servlet stack, this task can be accomplished more easily by extending JwtAuthenticationConverter:

public class MyAuthenticationConverter
        extends JwtAuthenticationConverter {

    @Override
    public Collection<GrantedAuthority> extractAuthorities(Jwt jwt) {
        // ... extract
    }
}

It would be nice to have the same simplicity on the reactive side:

public class MyReactiveAuthenticationConverter 
        extends ReactiveJwtAuthenticationConverter {

    @Override
    public Flux<GrantedAuthority> extractAuthorities(Jwt jwt) {
        // ... extract in a non-blocking way
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions