microsoft / microsoft/kiota-java
Oidc Access Token Provider
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 38
- Forks
- 34
- Avg merge
- 15h 9m
- Merged PRs (30d)
- 20
Description
I have now implemented quite a few times `OidcTokenAccessProvider`, for example [here](https://github.com/redhat-developer/kiota-java-extra/blob/main/rh-auth/src/main/java/com/redhat/cloud/kiota/auth/RHAccessTokenProvider.java).
Despite it being almost trivial in the end user codebase it turns out that is difficult to refactor the mechanism up to this repository.
More specifically the challenges are:
- Access to an `HttpClient` (or `RequestAdapter` but I think there are a few gaps later on) - possibly we should be able to decide to use the same or a different one from the "normal" API calls
- encode a form body is pretty straightforward with a bare HTTP client, not sure how that looks like with bare Kiota without the generated classes
- decode a Json response
- etc...
I'm here looking for guidance on how we can approach the problem.
I have attempted at first to add an `initialize` method to `AccessTokenProvider` and to `AuthenticationProvider` so that it can be eventually triggered by the `RequestAdapter` implementation.
I started having too many things to pull in and thought that it was not a great design ...
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the AccessTokenProvider, AuthenticationProvider, and RequestAdapter interfaces, then compare the referenced RHAccessTokenProvider implementation. Clarify how HTTP access, form encoding, and JSON decoding should be exposed without generated classes; the issue is ready only after the API design and expected integration path are agreed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- authentication
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100