SupportBundles: Add OAuth bundle collectors (#64810)

* wip

* add oauth support bundles

* add specific configs for generic oauth and azureAD

* add doc entry

* optimize struct packing

* Update pkg/login/social/azuread_oauth.go

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>

* nit update

---------

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
This commit is contained in:
Jo
2023-03-16 07:46:25 +00:00
committed by GitHub
parent 6d5688ed94
commit ccbf200c4a
8 changed files with 177 additions and 28 deletions
@@ -1,6 +1,7 @@
package oauthtoken
import (
"bytes"
"context"
"errors"
"net/http"
@@ -303,6 +304,10 @@ func (m *MockSocialConnector) TokenSource(ctx context.Context, t *oauth2.Token)
return args.Get(0).(oauth2.TokenSource)
}
func (m *MockSocialConnector) SupportBundleContent(bf *bytes.Buffer) error {
return nil
}
type FakeAuthInfoStore struct {
login.Store
ExpectedError error