-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Update of open id recipes #7646
Conversation
- not using viewmode - recipe can be run multiple times Update of openID scope Step - not using viewmode - recipe can be run multiple times ScopeController Update of openID scope page - Give user feedback when spaces are added in the name
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.
Thanks for your PR!
src/OrchardCore.Modules/OrchardCore.OpenId/Controllers/ScopeController.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.OpenId/Recipes/OpenIdApplicationStep.cs
Show resolved
Hide resolved
@kevinchalet Can you please review this PR? |
|
||
var descriptor = new OpenIdApplicationDescriptor | ||
var descriptor = new OpenIdApplicationDescriptor(); | ||
if (application!=null) |
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.
nit: spaces.
|
||
descriptor.Permissions.Remove(OpenIddictConstants.Permissions.GrantTypes.ClientCredentials); |
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 would have been better to use the same if
/else
logic as the one used in the controllers to make things more consistent and avoid discrepancies between recipes and controllers, but it shouldn't be blocking to merge this PR,
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.
Is it better to create an OpenIdApplicationService with an Create and Edit function with an ApplicationModel?
Then use this service in the recipe and the controller?
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 an option, but the problem is that the step and view models are 2 different CLR classes, so we'd to either merge the classes or introduce some interfaces. Dunno if it's worth it or not.
If anything, it would be better to put that in IOpenIdApplicationManager
.
if (model.AllowAuthorizationCodeFlow) | ||
{ | ||
descriptor.Permissions.Add(OpenIddictConstants.Permissions.GrantTypes.AuthorizationCode); | ||
} | ||
if (model.AllowClientCredentialsFlow) | ||
{ | ||
descriptor.Permissions.Add(OpenIddictConstants.Permissions.GrantTypes.ClientCredentials); | ||
|
||
if (model.Roles!= null && model.Roles.Any()) |
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.
nit: formatting
- not using viewmode - recipe can be run multiple times Update of openID scope Step - not using viewmode - recipe can be run multiple times ScopeController Update of openID scope page - Give user feedback when spaces are added in the name
…no/OrchardCore into feature/6364_openIdRecepes
I think you had a bad merge here as there are over 1200 file changes. Can you reset the pr please? |
The #6364 issue has since been fixed by other PRs. Thank you for your contribution, but I'm now closing this. |
Update of openID application Step
Update of openID scope Step
Update of openID scope page
Fixes #6364