Skip to content

Add interface IterableRelyingPartyRegistrationRepository or similar #15027

Closed
@OrangeDog

Description

@OrangeDog

Expected Behavior

public class InMemoryRelyingPartyRegistrationRepository
        implements IterableRelyingPartyRegistrationRepository {

Current Behavior

public class InMemoryRelyingPartyRegistrationRepository
        implements RelyingPartyRegistrationRepository, Iterable<RelyingPartyRegistration> {

Context
A mess develops when you start adding custom implementations that are also iterable, and/or writing e.g. custom login pages that need to iterate through all registrations. Especially if you're trying to compose multiple repositories because they need different behaviour,

You either have to resort to unchecked casts, or unpleasant generics like <T extends RelyingPartyRegistrationRepository & Iterable<RelyingPartyRegistration>>.

I assume it's too late to make RelyingPartyRegistrationRepository extend Iterable<RelyingPartyRegistration> or to add a method that returns a Collection<RelyingPartyRegistration>?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions