Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The ClaimSetInterface API is unclear #61

Open
stof opened this issue Sep 25, 2024 · 1 comment
Open

The ClaimSetInterface API is unclear #61

stof opened this issue Sep 25, 2024 · 1 comment

Comments

@stof
Copy link
Contributor

stof commented Sep 25, 2024

The interface ClaimSetInterface defines a getClaims(): array method without defining the expected type for the array.

This interface is used in 2 places:

  • the ClaimSetEntity class implements it (alongside a confusing ScopeInterface which is not about representing a scope but a class with a getScope method) and seems to expect list<string> as the type of the array based on the usages in ClaimExtractor
  • the IdentityProviderInterface is expected to return a UserEntityInterface implementing it. The IdTokenResponse then expects getClaims to return array<string, string> based on the usage in the second argument of ClaimExtractorInterface

I think we should have 2 different interfaces there, one representing the claims available as a user (being a map from claim names to claim values) and another one representing a set of claim names associated with a scope.

@stof
Copy link
Contributor Author

stof commented Sep 30, 2024

@steverhoades do you have any insight on this ? Is my analysis of the expected types correct ? And what should be done about that ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant