-
Notifications
You must be signed in to change notification settings - Fork 217
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
Create a mix of ScopesRequiredHttpContextExtensions and RolesRequired… #1814
base: master
Are you sure you want to change the base?
Conversation
…HttpContextExtensions
using Bludata.Blu.Web.Security.Entities; | ||
using Bludata.Blu.Web.Security.Interface; | ||
|
||
namespace Bludata.Blu.Web.Security.Utils; |
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.
namespace needs to be updated and using removed.
please add license info like we have on other classes
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 did it, thanks for letting me know. Hope it will be useful.
thanks for this @BluMichele. We have something similar on the attributes and will need to test once you have updated the file. It will take us sometime to circle back on this, just an FYI. |
lock (context) | ||
{ | ||
context.Response.StatusCode = (int)HttpStatusCode.Forbidden; | ||
context.Response.WriteAsync(message); |
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.
We should rather set that in an ErrorDescription header or www-Authenticate header, maybe (and not WriteAsync / CompleteAsync())
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.
You might be right, I quite much copied the code style of https://github.com/AzureAD/microsoft-identity-web/blob/master/src/Microsoft.Identity.Web/Resource/ScopesRequiredHttpContextExtensions.cs
…HttpContextExtensions