-
Notifications
You must be signed in to change notification settings - Fork 218
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
second round of suggested changes #1098
Conversation
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've 2 questions.
@@ -113,11 +110,7 @@ public class DownstreamWebApi : IDownstreamWebApi | |||
user, | |||
new StringContent(JsonSerializer.Serialize(input), Encoding.UTF8, "application/json")).ConfigureAwait(false); | |||
|
|||
try | |||
{ | |||
response.EnsureSuccessStatusCode(); |
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.
Can't response.EnsureSuccessStatusCode throw?
it seems it does:
https://stackoverflow.com/questions/21097730/usage-of-ensuresuccessstatuscode-and-handling-of-httprequestexception-it-throws
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 reverted back to what we have for now. will take a more indepth look at this later
@@ -50,7 +50,7 @@ public void OnAuthorization(AuthorizationFilterContext context) | |||
|
|||
private void ValidateEffectiveScopes(AuthorizationFilterContext context) | |||
{ | |||
if (_effectiveAcceptedScopes == null || !_effectiveAcceptedScopes.Any()) | |||
if (_effectiveAcceptedScopes == null || _effectiveAcceptedScopes.Length < 0) |
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.
probably == 0
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.
LGTM
Thanks @jennyf19
SonarCloud Quality Gate failed. |
No description provided.