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

Adding MSI Login Example #241

Merged
merged 2 commits into from
Mar 23, 2021
Merged

Adding MSI Login Example #241

merged 2 commits into from
Mar 23, 2021

Conversation

mohsha-msft
Copy link
Contributor

No description provided.

log.Fatal(err)
}

// Refresh obtains a fresh token for the Service Principal.
Copy link
Contributor

Choose a reason for hiding this comment

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

typo: Service Principal


tc := NewTokenCredential(spt.Token().AccessToken, func(tc TokenCredential) time.Duration {
_ = spt.Refresh()
return time.Until(spt.Token().Expires())
Copy link
Contributor

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.

// result := &adal.Token{}
// if len(b) > 0 {
// b = ByteSliceExtension{ByteSlice: b}.RemoveBOM()
// if err := json.Unmarshal(b, result); err != nil {
Copy link
Contributor

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 == "" {
Copy link
Member

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

@mohsha-msft mohsha-msft merged commit e80b0e0 into dev Mar 23, 2021
mohsha-msft added a commit that referenced this pull request Mar 25, 2021
* 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]>
mohsha-msft added a commit that referenced this pull request Apr 7, 2021
* 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]>
@mohsha-msft mohsha-msft deleted the example/added-msi-login-example branch April 13, 2021 07:57
siminsavani-msft added a commit that referenced this pull request Jul 2, 2021
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants