Thema: OAuth2 womit?

Einzelnen Beitrag anzeigen

mjustin

Registriert seit: 14. Apr 2008
3.004 Beiträge
 
Delphi 2009 Professional
 
#3

AW: OAuth2 womit?

  Alt 4. Jun 2019, 10:07
Diese Stackoverflow Antwort beschreibt fünf Möglichkeiten, die in der OAuth 2.0 Spezifikation genannt werden: https://stackoverflow.com/a/40382385/80901

Zitat:
External user-agent - the native application can capture the response from the authorization server using a (1) redirection URI with a scheme registered with the operating system to invoke the client as the handler, (2) manual copy-and-paste of the credentials, (3) running a local web server, (4) installing a user-agent extension, or by (5) providing a redirection URI identifying a server-hosted resource under the client's control, which in turn makes the response available to the native application.
Wenn man einen eigenen Webserver im Internet hat, ist Option 2 (Redirekt und Copy&Paste des OAuth Access Tokens) vermutlich am einfachsten, auch Option 5 klingt machbar (ebenfalls mit eigenem Webserver im Internet, mit dem die App kommunizieren kann)

Mäßig anspruchsvoll ist es, einen lokalen Webserver auf dem Gerät laufen zu lassen. D.h. z.B. mit Indy TIdHTTPServer (Option 3)

Die anderen Alternativen wären dann "custom schemes" und "user-agent extensions", zu ersterem gibt es Java-Beispiele und Bibliotheken u.a. AppAuth auf GitHub). Das wäre in Delphi nachzuprogrammieren und die entsprechenen Anbindungen an das Betriebssystem zu verdrahten.
Michael Justin
habarisoft.com

Geändert von mjustin ( 4. Jun 2019 um 10:18 Uhr) Grund: Link zu AppAuth
  Mit Zitat antworten Zitat