Bug: OpenAPI client configuration does not set bearer token for authentication #40
Open
4 tasks done
Labels
bug
Something isn't working
Prerequisites
Describe the issue
The
kinde-management
project uses an OpenAPI client to access the Kinde Management API. The classkinde-management/src/main/java/com/kinde/admin/KindeAdminSessionImpl.java
is intended to generate an OpenAPI client configured with appropriate settings to access the Kinde Management API.When attempting to use this client, I receive this error response:
Inspection of the code in
KindeAdminSessionImpl.java
suggests that it does not properly configure the OpenAPI client with an access token. This is the existing code:While this code generates an access token which is then used to configure an
HTTPBearerAuth
object, I don't see any mechanism by which this is transferred to theapiClient
instance. I don't know enough about theApiClient
to know how this code was intended to work - perhaps it was meant to be added to the (currently empty)authMap
...In any case, the following simpler code achieves the intended result and fixes the error:
For anyone using the existing code and wanting a temporary workaround, it is possible to add the token manually after the apiClient is generated, e.g.:
Library URL
https://github.com/kinde-oss/kinde-java-sdk
Library version
2.0.1
Operating system(s)
Other Linux
Operating system version(s)
Fedora 41
Further environment details
No response
Reproducible test case URL
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: