Closed craigcooper11 closed 1 year ago
Hi @craigcooper11,
I think (haven't tested it) the following should work if using golang.org/x/oauth2:
httpClient := oauth2.NewClient(ctx, oauth2.StaticTokenSource(&oauth2.Token{
AccessToken: "<your token>",
TokenType: "Bearer",
}))
backstageClient, err := backstage.NewClient(baseURL, "default", httpClient)
Hello @tdabasinskas ! Do you currently have a way to add a bearer token? I see that you can pass in an instance of HTTP client but this doesn't support setting a bearer token. There might be some use cases where peoples backstage instance has server to server auth turned on. https://backstage.io/docs/auth/service-to-service-auth