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.
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
Add ADFS support for ClientSecretCredential #1947
Add ADFS support for ClientSecretCredential #1947
Changes from 8 commits
424a033
b80639d
a5b6bf7
daa8456
f252c90
5bf72b6
42bfcd7
fc473a8
ebc9b4b
33f6028
e003344
b9e6682
6405c09
303770b
0724222
0f2a875
f3476ea
18fbf0b
a29e1c3
cf281a3
537549d
d194d8f
fb7a27a
9bf4acd
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
What does
asResource
mean?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 is internal function. You can only have single scope as resource, and when you want to build resource, you don't add scope suffix.
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.
Why are we doing
-1
. Add a comment.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 don't think this necessarily requires a comment, this is the part of the language - when an array is initialized from a literal,
\0
is added to the array - https://en.cppreference.com/w/c/language/array_initialization.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.
Source comments are rarely necessary. It's just meant for helpful hints for future maintainability when code changes, moves around. What happens if I change line 19 tomorrow to
std::string
, now line 20 is broken, if I don't update-1
, correct?It's up to your discretion, as the PR author, what's clear/obvious by just reading the code.
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 can add it, but if we change it to
std::string
,suffixLen
should be removed entirely, it is no longer necessary. So, the only context in which it makes sense, is whensuffix
is a C-string, so it is 0-terminated, so that "- 1" is needed.But even without the "-1",
sizeof(std::string())
is broken. It will be the size of thestd::string
class, not the length of the string.length()
should be used.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: re-add the comment here, that we assume
scopes.size() > 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.
How can I see the test coverage for this change and azure-identity overall?
It's not visible here: https://dev.azure.com/azure-sdk/public/_build/results?buildId=808213&view=results
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 don't know how the code coverage integration works, but if you don't see it, it most likely was not enable for identity. We need a work item to enable it.