-
Notifications
You must be signed in to change notification settings - Fork 166
Ignore unknown authncontext #11362
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
Ignore unknown authncontext #11362
Changes from all commits
a9f39b5
834154b
9b9a7e8
96e58ca
36ca7b9
1bd35d8
e9874f0
50e7eff
66187e6
52a697b
4f1136e
07f8e59
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,8 +4,6 @@ module Vot | |
| class Parser | ||
| class ParseException < StandardError; end | ||
|
|
||
| class UnsupportedComponentsException < ParseException; end | ||
|
|
||
| class DuplicateComponentsException < ParseException; end | ||
|
|
||
| Result = Data.define( | ||
|
|
@@ -87,8 +85,7 @@ def initial_components | |
| @initial_components ||= component_string.split(component_separator).map do |component_name| | ||
| component_map.fetch(component_name) | ||
| rescue KeyError | ||
| raise_unsupported_component_exception(component_name) | ||
| end | ||
| end.compact | ||
| end | ||
|
|
||
| def component_separator | ||
|
|
@@ -113,16 +110,6 @@ def validate_component_uniqueness!(component_values) | |
| end | ||
| end | ||
|
|
||
| def raise_unsupported_component_exception(component_value_name) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll remark here that this may be a deviation from the spec since we are accepting vectors we do not recognize that are not described by our trustmark. However, that may not be a huge deal since this API should be going away soon.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks for that note! i could probably update it to only raise when vectors of trust are passed in, if you have any feelings about it! (although i think we are deviating from the spec in some ways anyways, like having implied vectors, and as you said, it's hopefully not long for our code base.) |
||
| if vector_of_trust.present? | ||
| raise UnsupportedComponentsException, | ||
| "'#{vector_of_trust}' contains unknown component '#{component_value_name}'" | ||
| else | ||
| raise UnsupportedComponentsException, | ||
| "'#{acr_values}' contains unknown acr value '#{component_value_name}'" | ||
| end | ||
| end | ||
|
|
||
| def raise_duplicate_component_exception | ||
| if vector_of_trust.present? | ||
| raise DuplicateComponentsException, "'#{vector_of_trust}' contains duplicate components" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙌