-
Notifications
You must be signed in to change notification settings - Fork 259
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
grant_types should follow response_types in a client registration req… #493
Conversation
CHANGELOG.md
Outdated
@@ -8,6 +8,7 @@ The format is based on the [KeepAChangeLog] project. | |||
## 0.13.0 [Unreleased] | |||
|
|||
### Added | |||
- [#493] grant_types specification should follow the response_types sprecification in a client registration request. |
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.
specification, not sprecification
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.
Right
Codecov Report
@@ Coverage Diff @@
## master #493 +/- ##
==========================================
+ Coverage 59% 59.04% +0.04%
==========================================
Files 62 62
Lines 11200 11214 +14
Branches 1957 1959 +2
==========================================
+ Hits 6608 6621 +13
Misses 4036 4036
- Partials 556 557 +1
Continue to review full report at Codecov.
|
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.
Also we should wrap lines to 120 characters and not split them unnecessarily.
} | ||
|
||
|
||
def response_types_to_grant_types(response_types): |
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.
This should be covered by tests.
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.
Especially the part that response_types may be in random order (so no one removes the 'sort' from the code by accident).
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.
One last thing then this is good to go.
The test with an unknown response_type
should also be present.
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.
Added
src/oic/oic/__init__.py
Outdated
@@ -1319,6 +1345,12 @@ def create_registration_request(self, **kwargs): | |||
except KeyError: | |||
pass | |||
|
|||
try: |
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 think it is better to change try .. except
to a condition if response_types in req
.
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'm OK with either or so we'll go for your proposal.
CZ-NIC#493) * grant_types should follow response_types in a client registration request.
grant_types should follow response_types in a client registration request
CHANGELOG.md
.