Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Cross-Platform-Entwicklung (https://www.delphipraxis.net/91-cross-platform-entwicklung/)
-   -   OAuth2 womit? (https://www.delphipraxis.net/200878-oauth2-womit.html)

TurboMagic 3. Jun 2019 21:49

OAuth2 womit?
 
Hallo,

welche Möglichkeiten zur Nutzung von OAuth2 gibt es für Delphi Android apps?

Grüße
TurboMagic

Rollo62 4. Jun 2019 07:09

AW: OAuth2 womit?
 
Google mit "Delphi OAuth2" zeigt mir das hier als ersten Eintrag:
https://www.youtube.com/watch?v=EuEovgmVCUs

mjustin 4. Jun 2019 10:07

AW: OAuth2 womit?
 
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.


Alle Zeitangaben in WEZ +1. Es ist jetzt 02:56 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz