Skip to content

ProviderManager.copyDetails Changes Authentication to new Type #18027

@rwinch

Description

@rwinch

Currently, if the Authentication.getDetails() is non-null on the input to ProviderManager, then the ProviderManager.copyDetails method will invoke Authentication.toBuilder() method to set the details. This is fine if an Authentication implements toBuilder, but it unnecessarily breaks custom Authentication types that do not implement toBuilder.

We should revert the behavior to previous versions of Spring Security which invoke AbstractAuthenticationToken.setDetails.

Possibly related to gh-18021

Related 35f41f8

Metadata

Metadata

Assignees

Labels

in: coreAn issue in spring-security-coretype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions