You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have created an application that I'm using with Management API SDK using the 'Private Key JWT' authentication method. After reading through management API and it's implementation, figured out that there's only client credentials auth method supported, and there is no way to use 'Private Key JWT'.
I thought it should be then possible to provide own http.Client as follows:
// my own http client that creates an assertion and adds it to requestshttpCl:=CreateHTTPClient(ctx, clientID, []byte(privateKey))
cl, err:=management.New(
domain,
management.WithClient(httpCl),
)
But it looks like the tokenSource in management client is overwritten, so there's no possibility to provide a custom token source.
Describe the ideal solution
Ideal solution would be to have a new option for management API client:
Currently, we are using the x/oauth2 library, which does not yet support this authentication flow. However, there is an ongoing discussion about it: GitHub Issue #57186.
I'll discuss this internally and let you know if we can implement this feature in an alternative way.
Checklist
Describe the problem you'd like to have solved
I have created an application that I'm using with Management API SDK using the 'Private Key JWT' authentication method. After reading through management API and it's implementation, figured out that there's only client credentials auth method supported, and there is no way to use 'Private Key JWT'.
I thought it should be then possible to provide own
http.Client
as follows:But it looks like the
tokenSource
in management client is overwritten, so there's no possibility to provide a custom token source.Describe the ideal solution
Ideal solution would be to have a new option for management API client:
that would configure token source and support Private Key JWT authentication flow
Alternatives and current workarounds
Alternatively, allow setting a custom token source when providing the
http.Client
or with a separate optionmanagement.WithTokenSource()
Additional context
No response
The text was updated successfully, but these errors were encountered: