Lazarus

Announcements => Third party => Topic started by: mjustin on March 07, 2019, 01:11:08 pm

Title: Google OpenID Connect for authentication - with full source code
Post by: mjustin on March 07, 2019, 01:11:08 pm
The new release 1.2.8 of the Daraja HTTP Framework includes a new tutorial (https://github.com/michaelJustin/daraja-framework/tree/master/demo/tutorial9) with the full source code for a web server application which allows to use Google OpenID Connect for authentication.

Requirements:
* Google account with access to the developer console
* OpenSSL DLLs - 32 or 64 bit depending on your target
* Lazarus 2.0 or Delphi 2009+
* SuperObject (for Delphi)

Also included is a OAuth 2.0 authorization example, explained in more detail here (https://mikejustin.wordpress.com/2019/03/04/google-api-access-with-oauth-2-0-authorization-for-daraja-http-server-applications-full-source-code/).

Examples on GitHub:
- authentication with OpenID Connect: https://github.com/michaelJustin/daraja-framework/tree/master/demo/tutorial9
- Google API access using OAuth 2.0 authorization: https://github.com/michaelJustin/daraja-framework/tree/master/demo/tutorial8

About Daraja HTTP Framework:
* GitHub: https://github.com/michaelJustin/daraja-framework
* Wiki: https://github.com/michaelJustin/daraja-framework/wiki
* API Docs: http://michaeljustin.github.io/daraja-framework/

Happy coding,
Michael Justin
Title: Re: Google OpenID Connect for authentication - with full source code
Post by: Leledumbo on March 07, 2019, 08:19:33 pm
I see this is more of a project than a library, you should really turn it into a library instead. Well, fpc already has google API support as library, if you need some inspiration. They're generated rather than handcoded, though.
Title: Re: Google OpenID Connect for authentication - with full source code
Post by: mjustin on March 13, 2019, 05:04:26 pm
I see this is more of a project than a library, you should really turn it into a library instead. Well, fpc already has google API support as library, if you need some inspiration. They're generated rather than handcoded, though.

Thanks for the feedback!

Yes, a general OAuth library for Delphi/Free Pascal would quite nice. I am currently researching some OAuth 2.0 integrations (Twitter, PayPal, ...), maybe I am ready to write a library around May.