Skip to content

Saml2AuthenticationToken should take a RelyingPartyRegistration #8845

@jzheaux

Description

@jzheaux

Saml2AuthenticationToken's constructor takes several separate pieces of metadata from the RelyingPartyRegistration. Each time OpenSamlAuthenticationProvider needs something new from the RelyingPartyRegistration, a new constructor will need to be added to Saml2AuthenticationToken and the old one potentially deprecated.

Instead of doing this, Saml2AuthenticationToken should be changed to take a RelyingPartyRegistration in its constructor. This simplifies the constructor to (RelyingPartyRegistration, String). Also, it allows the authentication provider to change over time what relying party metadata it relies upon without needing to add a new constructor.

Additionally, this aligns better with OAuth2LoginAuthenticationToken, which takes a ClientRegistration in its constructor.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions