Skip to content

Add Adapter to Translate Jwt to BearerTokenAuthentication #7346

Closed
@jzheaux

Description

@jzheaux

JwtAuthenticationProvider by default produces a JwtAuthenticationToken by default upon successful authentication.

In order to assist with using jwt(), but also the more generic authentication result BearerTokenAuthentication, an adapter would be handy.

This can be realized in the form of a Converter<Jwt, AbstractAuthenticationToken> which can then be installed via

http
    .oauth2ResourceServer()
        .jwt()
            .jwtAuthenticationConverter(new JwtBearerTokenAuthenticationConverter())

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions