-
Notifications
You must be signed in to change notification settings - Fork 102
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
Adding MSI Login Example #241
Conversation
azblob/zt_examples_test.go
Outdated
log.Fatal(err) | ||
} | ||
|
||
// Refresh obtains a fresh token for the Service Principal. |
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.
typo: Service Principal
azblob/zt_examples_test.go
Outdated
|
||
tc := NewTokenCredential(spt.Token().AccessToken, func(tc TokenCredential) time.Duration { | ||
_ = spt.Refresh() | ||
return time.Until(spt.Token().Expires()) |
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.
Perhaps it's best to deduct a slight buffer from the expiration so that the token credential is always valid.
azblob/zt_examples_test.go
Outdated
// result := &adal.Token{} | ||
// if len(b) > 0 { | ||
// b = ByteSliceExtension{ByteSlice: b}.RemoveBOM() | ||
// if err := json.Unmarshal(b, result); err != nil { |
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.
This commented code should be removed, right?
var err error | ||
|
||
// both can be empty, systemAssignedMSI scenario | ||
if applicationID == "" && identityResourceID == "" { |
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.
code cleanliness: else ifs would be preferable here
* Adding MSI Login Example (#241) * Added MSI login example * Minor edits Co-authored-by: zezha-msft <[email protected]> * Reverting changes to GetTags/SetTags & BlobPropertiesInternal Co-authored-by: Mohit Sharma <[email protected]> Co-authored-by: zezha-msft <[email protected]>
* Provide Knob For Syslog * Reverting changes to GetTags/SetTags & BlobPropertiesInternal (#269) * Adding MSI Login Example (#241) * Added MSI login example * Minor edits Co-authored-by: zezha-msft <[email protected]> * Reverting changes to GetTags/SetTags & BlobPropertiesInternal Co-authored-by: Mohit Sharma <[email protected]> Co-authored-by: zezha-msft <[email protected]> Co-authored-by: siminsavani-msft <[email protected]> Co-authored-by: zezha-msft <[email protected]>
* Removed requestId, Timeout, versionId, snapshot from the function signature of GetTags() and SetTags() (#252) * Changed the function signature of getTags and setTags * Minor Adjustment * Review - 1 * Adding Support for PutBlobFromUrl (#251) * Regenerate SDK * Regenerate SDK with proper version * Adding support for PutBlobFromURL * Correcting regen code and handling other errors * Resolving comments on PR * Correcting SetTags method * Updating tests with GetTags and SetTags * Remove swagger/Go_BlobStorage/code-model-v1 * Checks value of metadata & reorganized tests Co-authored-by: Adele Reed <[email protected]> * Keep compatibility with Go 1.13.14. (#264) * - Keep compliance with Golang 1.13.14. http.Header has no method Values on older go versions. * Do not return error when client request id is missing * Adding MSI Login Example (#241) * Added MSI login example * Minor edits Co-authored-by: zezha-msft <[email protected]> * Offer Knob to Disable Syslog | Default logging to syslog enabled (#268) * Provide Knob For Syslog * Reverting changes to GetTags/SetTags & BlobPropertiesInternal (#269) * Adding MSI Login Example (#241) * Added MSI login example * Minor edits Co-authored-by: zezha-msft <[email protected]> * Reverting changes to GetTags/SetTags & BlobPropertiesInternal Co-authored-by: Mohit Sharma <[email protected]> Co-authored-by: zezha-msft <[email protected]> Co-authored-by: siminsavani-msft <[email protected]> Co-authored-by: zezha-msft <[email protected]> * Update go dependencies * Resolving Concurrency Issues (#275) * Resolving concurrency issues * Fixing concurrency test * Minor changes * Incremented version and added to changelog * Updated version to 0.14 Co-authored-by: Mohit Sharma <[email protected]> Co-authored-by: Adele Reed <[email protected]> Co-authored-by: Sreejith Kesavan <[email protected]> Co-authored-by: zezha-msft <[email protected]> Co-authored-by: Yang Peng <[email protected]>
No description provided.