-
Notifications
You must be signed in to change notification settings - Fork 325
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
Scim users get distorted between construct, post, get. #1754
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
84808a9
More entropy in integration tests.
fisx 6b5e9cd
Remove bogus name.
fisx 8d8f44e
Normalize scim data before responding to `POST /scim/v2/Users`.
fisx e482855
Unit tests.
fisx c1c09d6
Smart constructors for RichInfoMapAndList, RichInfoAssocList.
fisx 6fa007a
The FIX!!
fisx 625b0f4
...
fisx 55a4a3a
Not The REAL FIX!!! either
fisx dac9e3a
The third fix at least makes one test pass...
fisx 5bbc0cb
...
fisx a31a22d
typo
fisx 873f242
revert wrong change caused by braindead pattern matching.
fisx da41aa1
changelog
fisx a2f98b1
Fix outdated test case.
fisx 300f6e4
Don't brutally and point-lessly lower-case case-insensitive json.
fisx cea2456
hi ci
fisx 2e19959
Haddocks.
fisx f368bde
Drop redundant lower-casing.
fisx 314ed0b
Revert "Drop redundant lower-casing."
fisx 05789b9
hi ci
fisx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Handle upper/lower case more consistently in scim and rich-info data. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,26 @@ data Schema | |
| CustomSchema Text | ||
deriving (Show, Eq) | ||
|
||
-- | 'Schema' is *almost* a straight-forward enum type, except for 'CustomSchema'. | ||
-- Enumerations are nice because they let you write quickcheck generators as @elements | ||
-- [minBound..]@. 'fakeEnumSchema' is a work-around. | ||
fakeEnumSchema :: [Schema] | ||
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. Maybe adding a comment that this is just for testing is a good idea. |
||
fakeEnumSchema = | ||
[ User20, | ||
ServiceProviderConfig20, | ||
Group20, | ||
Schema20, | ||
ResourceType20, | ||
ListResponse20, | ||
Error20, | ||
PatchOp20, | ||
CustomSchema "", | ||
CustomSchema "asdf", | ||
CustomSchema "123", | ||
CustomSchema "aos8wejv09837", | ||
CustomSchema "aos8wejv09837wfeu09wuee0976t0213!!'#@" | ||
] | ||
|
||
instance FromJSON Schema where | ||
parseJSON = withText "schema" $ \t -> pure (fromSchemaUri t) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
It's probably not ideal to use case-folded strings as JSON keys (Unicode recommends to use case-folding only for comparison). Why is this JSON normalisation still needed? I would guess that once all the case comparisons on the haskell side are done correctly, JSON could be generated just using the "original" strings. Am I thinking about this wrong?
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.
The original idea of
jsonLower
was to run it in json parsers initially, so that the actual parser could rely on everything being lower-case. This was an easy way of working around the fact that json and therefore aeson is strictly case-sensitive.So morally, this is just lower-casing
Value
s that are about to be deconstructed. But I will double-check and add this to the haddocks.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.
I double-checked, and I was right:
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.
... aaand the haddocks already pretty much say this much. @pcapriotti if you can think of anything to add, please let me know (i can also do it in a separate PR).