Skip to content

Add trust level to attribute#52

Draft
Weasy666 wants to merge 2 commits intonjaremko:masterfrom
Weasy666:add-trust-level-to-attribute
Draft

Add trust level to attribute#52
Weasy666 wants to merge 2 commits intonjaremko:masterfrom
Weasy666:add-trust-level-to-attribute

Conversation

@Weasy666
Copy link
Copy Markdown
Contributor

Add trust_level attribute to Attribute

@njaremko
Copy link
Copy Markdown
Owner

Context? trust_level doesn't seem to be a part of the standard

@Weasy666
Copy link
Copy Markdown
Contributor Author

Please excuse my late answer.
We have a few IdPs here in Germany which add such a TrustLevel attribute to the Attribute element in their responses. And we need to be able to access those. Adn the only way, i am aware of, to access them is to add them here.

@njaremko
Copy link
Copy Markdown
Owner

Please excuse my late answer. We have a few IdPs here in Germany which add such a TrustLevel attribute to the Attribute element in their responses. And we need to be able to access those. Adn the only way, i am aware of, to access them is to add them here.

I suspect many IdPs have custom properties like this. I can't merge a change like this that pollutes the struct for everyone to support a custom field for you.

I suspect proper support here probably requires writing an attribute trait and switching uses to the methods on that trait. That'd allow people working with IdPs like this to write custom structs with this library's Attribute struct nested inside for the standard attributes, the few custom attributes, and then using the serde flatten stuff.

Thoughts?

@Weasy666
Copy link
Copy Markdown
Contributor Author

That's fair. The "nested" approach seems reasonable. I'll change the PR to draft and see if i can find the time to whip something up

@Weasy666 Weasy666 marked this pull request as draft May 29, 2024 16:06
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

Successfully merging this pull request may close these issues.

2 participants