Skip to content
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

Typo in KeyVaultClient causes invalid authorization request #74

Merged
merged 2 commits into from
Nov 16, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/key_vault/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ impl<'a, T: TokenCredential> KeyVaultClient<'a, T> {
// Token is valid, return it.
return Ok(());
}
let resource = format!("https://{}", &self.endpoint_suffix);
let resource = format!("https://{}/", &self.endpoint_suffix);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should check the endpoint_suffix for an existing beginning / and only add an / if one is not already present.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point. I guess a nice way might be to make get_token accept Url but I don't know enough about OAUTH2 or this sdk to know if that makes sense.

As a short stop I've done as you've suggested 👍

let token = self
.token_credential
.get_token(&resource)
Expand Down