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

[Identity] fixing lint step for azidentity #15109

Merged
merged 1 commit into from
Jul 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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/azidentity/interactive_browser_credential.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func interactiveBrowserLogin(ctx context.Context, authorityHost string, opts *In
cv := ""
// the code verifier is a random 32-byte sequence that's been base-64 encoded without padding.
// it's used to prevent MitM attacks during auth code flow, see https://tools.ietf.org/html/rfc7636
b := make([]byte, 32, 32)
b := make([]byte, 32, 32) // nolint:gosimple
if _, err := rand.Read(b); err != nil {
return nil, err
}
Expand Down
6 changes: 3 additions & 3 deletions sdk/azidentity/interactive_browser_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (s *server) Start(reqState string, port int) string {
if s.err != nil {
page = failPage
}
w.Write([]byte(page))
w.Write([]byte(page)) // nolint:errcheck
}()

qp := r.URL.Query()
Expand All @@ -94,14 +94,14 @@ func (s *server) Start(reqState string, port int) string {
}
s.code = code
})
go s.s.ListenAndServe()
go s.s.ListenAndServe() // nolint:errcheck
return fmt.Sprintf("http://localhost:%d", port)
}

// Stop will shut down the local HTTP server.
func (s *server) Stop() {
close(s.done)
s.s.Shutdown(context.Background())
s.s.Shutdown(context.Background()) // nolint:errcheck
}

// WaitForCallback will wait until Azure interactive login has called us back with an authorization code or error.
Expand Down