microsoft / microsoft/kiota-java

Oidc Access Token Provider

Offen
#771 7 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

java
Vorherrschende Sprache
Java
Sterne
38
Forks
34
Ø Merge
15 Std. 9 Min.
Gemergte PRs (30 T.)
20

Beschreibung

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 ...

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit dem Lesen der Schnittstellen AccessTokenProvider, AuthenticationProvider und RequestAdapter und vergleiche anschließend die referenzierte Implementierung RHAccessTokenProvider. Kläre, wie HTTP-Zugriff, Formular-Encoding und JSON-Dekodierung ohne generierte Klassen bereitgestellt werden sollen; das Issue ist erst bereit, wenn das API-Design und der erwartete Integrationspfad vereinbart sind.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java
Bereich
authentication
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.