-
Content Count
93 -
Joined
-
Last visited
-
Days Won
2
mjustin last won the day on February 5 2023
mjustin had the most liked content!
Community Reputation
26 ExcellentRecent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
How to know when TIdHTTPServer threads are done
mjustin replied to narag's topic in Network, Cloud and Web
HTTP is a stateless protocol. Therfore, closing the connection should not cause any client-side errors. And connections are not "transferable" between processes or machines. -
Delphi & HTTP Authentication: Basic and Digest Access Authentication
mjustin replied to msd's topic in Network, Cloud and Web
Which HTTP client / component / library is used? (Indy, ICS, ...) -
A first example is now online at https://habarisoft.com/daraja_framework.html More examples will follow. Many thanks for your suggestion!
-
The 3.0 Version contains some API improvements, all changes are listed here: https://github.com/michaelJustin/daraja-framework/milestone/9?closed=1 Noteworthy are * a simplified, parameterless Init method for WebComponents (and WebFilters). * methods which register WebComponents (and WebFilters). return an object which can be used for further configuration. * overloaded registration methods: instead of Context.AddWebComponent(...) and Context.AddWebFilter(...), Context.Add(...) can be used. The unit tests, code examples and API docs have been updated accordingly.
-
Daraja is a compact and flexible HTTP server application framework for Object Pascal, based on the HTTP server included in Internet Direct (Indy). The framework uses URL patterns to match requests to your resource handler code, and optional request filtering for pre- and post-processing. It enables developers to create well-structured HTTP server applications, written with 100% open source code. Daraja HTTP Framework is dual licensed under the GNU Affero General Public License and a commercial license. More information - GitHub: https://github.com/michaelJustin/daraja-framework - API documentation: http://michaeljustin.github.io/daraja-framework/ - Features and FAQ: https://www.habarisoft.com/daraja_framework.html
-
Habarisoft released new versions of the native STOMP client libraries for Delphi / Object Pascal for integration with popular open source message brokers: Habari STOMP Client for ActiveMQ 9.2 – tested with Apache ActiveMQ 6.1.4 Habari STOMP Client for Artemis 9.2 – tested with Apache ActiveMQ Artemis 2.38.0 Habari STOMP Client for OpenMQ 9.2 – tested with Eclipse OpenMQ 6.5.0 Habari STOMP Client for RabbitMQ 9.2 – tested with RabbitMQ 4.0.4 and 4.1.0-beta.1 Release notes: https://www.habarisoft.com/release_notes.html
-
Google OAuth 2.0 auth code flow with PKCE: refresh token example
mjustin posted a topic in Delphi Third-Party
This application launches a local web server and requests an access token and a refresh token. After authentication and authorization is done, the tokens are displayed in a web page together with a button, which allows to request a new access token. Full example code is included. Location: https://github.com/michaelJustin/daraja-framework/tree/master/demo/17_google_refresh_token Requirements Daraja HTTP Server Framework (https://github.com/michaelJustin/daraja-framework) Indy 10.6.3 (https://github.com/IndySockets) OpenSSL DLLs for Indy (https://github.com/IndySockets/OpenSSL-Binaries) Delphi 2009+ Note: the example code contains the configuration for an existing public Google Cloud App registration. You may configure it to use a different App registration, by modifying the constants in unit MainUnit. Security considerations The example code uses response_mode=form_post to receive the access token. Unlike with response_mode=fragment (or query), the browser does not receive the access_token parameter in the redirect request URI. Therefore, the access_token is not accessible within the browser’s memory. The example code uses PKCE, which stands for “Proof of Key Code Exchange”, an extension of the OAuth 2.0 protocol that helps prevent code interception attacks. The example does not require a client secret. “Don’t use the application secret in a native app or single page app because a client_secret can’t be reliably stored on devices or web pages. It’s required for web apps and web APIs, which can store the client_secret securely on the server side.” (source) -
Daraja HTTP Server Framework : Microsoft Entra ID example for OpenID Connect Refresh Token
mjustin posted a topic in Delphi Third-Party
This example application launches a local web server and requests an access token from Microsoft Entra ID (formerly known as Azure Active Directory (Azure AD)). The access token then is shown in a web page together with a button, which allows to request a new access token. Location: https://github.com/michaelJustin/daraja-framework/tree/master/demo/16_entra_refresh_token Requirements Daraja HTTP Server Framework Indy 10.6.3 (https://github.com/IndySockets) OpenSSL DLLs for Indy (https://github.com/IndySockets/OpenSSL-Binaries) Delphi 2009+ or Lazarus / FPC 3.2 Note: the example code contains the configuration for an existing Microsoft Entra App registration. You may configure it to use a different App registration, by modifying the constants in unit MainUnit. Please note that the App registration must be configured as "Mobile and desktop application". Security considerations The example code uses response_mode=form_post to receive the access token. Unlike with response_mode=fragment (or query), the browser does not receive the access_token parameter in the redirect request URI. Therefore, the access_token is not accessible within the browser's memory. ("Implicit Flow with Form Post") The example code uses PKCE, which stands for "Proof of Key Code Exchange", an extension of the OAuth 2.0 protocol that helps prevent code interception attacks. More information GitHub: https://github.com/michaelJustin/daraja-framework API documentation: http://michaeljustin.github.io/daraja-framework/ -
ScroogeXHTML for Object Pascal 9.2 - RTF to HTML and XHTML converter
mjustin posted a topic in Delphi Third-Party
ScroogeXHTML for Object Pascal converts RTF (Rich Text Format) documents to HTML5 and other markup formats. The 9.2 release is mainly a maintenance release. The 9.0 release included these changes: Extend the complimentary picture conversion code to convert embedded BMP and WMF pictures to PNG, allowing to include them as Base64 encoded data URIs. Add support for reading pictures stored as binary data from RTF documents which use the \bin token. Add a new property to control generation of margin-top and margin-bottom styles. Add a new property to set additional attributes on the <p> element. Features Exports to stand-alone documents or fragments for embedding. Minimizes documents using CSS and default font definitions. Supports hyperlink fields, bookmarks, multi-language and LTR/RTL text. Includes complimentary code for converting and embedding images as Data URIs. Conversion of pictures to a web-ready format may require third-party libraries. Includes an API for post-processing of the intermediate DOM-like document. Supports logging via slf4p (simple logging facade for Pascal). Compatible with Delphi 2009 and newer and Free Pascal 3.2.2. Includes full source code. Resources Home page: https://www.scroogexhtml.com/object_pascal.html Demo version: https://www.habarisoft.com/scroogexhtml/9.2/ScroogeXHTMLDemo.zip User guide: https://www.habarisoft.com/scroogexhtml/9.2/docs/ScroogeXHTMLGettingStarted.pdf Release notes: https://www.habarisoft.com/scroogexhtml/9.2/docs/api/version.html Other platforms ScroogeXHTML is also available for the Java platform. (different feature set) -
Habarisoft released new versions of the native STOMP client libraries for Delphi / Object Pascal for integration with popular open source message brokers: Habari STOMP Client for ActiveMQ 9.0 – tested with Apache ActiveMQ 6.1.2 Habari STOMP Client for Artemis 9.0 – tested with Apache ActiveMQ Artemis 2.35.0 Habari STOMP Client for OpenMQ 9.0 – tested with Eclipse OpenMQ 6.5.0 Habari STOMP Client for RabbitMQ 9.0 – tested with RabbitMQ 3.13.4 and 4.0.0-beta.3 Release notes: https://www.habarisoft.com/release_notes.html
-
ScroogeXHTML for Object Pascal 9.1 - RTF to HTML5 converter
mjustin posted a topic in Delphi Third-Party
ScroogeXHTML for Object Pascal converts RTF (Rich Text Format) documents to HTML5 and other markup formats. Major changes in the 9.1 release: The ConvertHyperlinks property is enabled by default. The ConvertSpaces property is enabled by default. Default replacement fonts “Courier” and “Times” are now “Courier New” and “Times New Roman”. Add support for document language detection, based on deflang RTF token. Add the lang-attribute to the HTML root element (unconditionally). The 9.0 release included these changes: Extend the complimentary picture conversion code to convert embedded BMP and WMF pictures to PNG, allowing to include them as Base64 encoded data URIs. Add support for reading pictures stored as binary data from RTF documents which use the \bin token. Add a new property to control generation of margin-top and margin-bottom styles. Add a new property to set additional attributes on the <p> element. Features Exports to stand-alone documents or fragments for embedding. Minimizes documents using CSS and default font definitions. Supports hyperlink fields, bookmarks, multi-language and LTR/RTL text. Includes complimentary code for converting and embedding images as Data URIs. Conversion of pictures to a web-ready format may require third-party libraries. Includes an API for post-processing of the intermediate DOM-like document. Supports logging via slf4p (simple logging facade for Pascal). Compatible with Delphi 2009 and newer and Free Pascal 3.2.2. Includes full source code. Resources Home page: https://www.scroogexhtml.com/object_pascal.html Demo version: https://www.habarisoft.com/scroogexhtml/9.1/ScroogeXHTMLDemo.zip User guide: https://www.habarisoft.com/scroogexhtml/9.1/docs/ScroogeXHTMLGettingStarted.pdf Release notes: https://www.habarisoft.com/scroogexhtml/9.1/docs/api/version.html Other platforms ScroogeXHTML is also available for the Java platform. (different feature set) -
The Daraja HTTP Framework is a free open source library for Object Pascal (Free Pascal 3.2.0+ / Delphi 2009+), based on the stand-alone HTTP server component in Internet Direct (Indy). The framework uses request mapping and filtering rules to connect your code with incoming requests in a flexible way. Example applications cover simple use cases such as logging and statistics, but also advanced topics such as OAuth 2.0, OpenID Connect and Entra ID / MS Graph API. More information - GitHub: https://github.com/michaelJustin/daraja-framework - API documentation: http://michaeljustin.github.io/daraja-framework/ - Features and FAQ: https://www.habarisoft.com/daraja_framework.html
-
Habarisoft released new versions of the native STOMP client libraries for Delphi / Object Pascal for integration with popular open source message brokers: Habari STOMP Client for ActiveMQ 9.0 – tested with Apache ActiveMQ 6.1.2 Habari STOMP Client for Artemis 9.0 – tested with Apache ActiveMQ Artemis 2.33.0 Habari STOMP Client for OpenMQ 9.0 – tested with Eclipse OpenMQ 6.4.0 Habari STOMP Client for RabbitMQ 9.0 – tested with RabbitMQ 3.13.3 Release notes: https://www.habarisoft.com/release_notes.html
-
Habarisoft released new versions of the native STOMP client libraries for Delphi / Object Pascal for integration with popular open source message brokers: Habari STOMP Client for ActiveMQ 8.7 – tested with Apache ActiveMQ 5.18.4 and 6.1.1 Habari STOMP Client for Artemis 8.7 – tested with Apache ActiveMQ Artemis 2.33.0 Habari STOMP Client for OpenMQ 8.7 – tested with Eclipse OpenMQ 6.4.0 Habari STOMP Client for RabbitMQ 8.7 – tested with RabbitMQ 3.13.0 Release notes: https://www.habarisoft.com/release_notes.html
-
ScroogeXHTML for Object Pascal 8.7 - RTF to HTML5 converter
mjustin posted a topic in Delphi Third-Party
ScroogeXHTML for Object Pascal converts RTF (Rich Text Format) documents to HTML5 and other markup formats. This release adds BMP picture data extraction, a new option to handle invalid RTF headers, and many minor code and documentation improvements. Features Exports to stand-alone documents or embeddable fragments. Minimizes documents using CSS and default font definitions. Supports hyperlink fields, bookmarks, multi-language, and LTR/RTL text. Includes complimentary code for converting and embedding images as Data URIs. Conversion of pictures to a web-ready format may require third-party libraries. Includes an API for post-processing of the intermediate DOM-like document. Supports logging via the open source slf4p logging facade. Compatible with Delphi 2009 and newer and Free Pascal 3.2.2. Includes full source code. Resources Home page: https://www.scroogexhtml.com/object_pascal.html Demo version: https://www.habarisoft.com/scroogexhtml/8.7/ScroogeXHTMLDemo.zip User guide: https://www.habarisoft.com/scroogexhtml/8.7/docs/ScroogeXHTMLGettingStarted.pdf Release notes: https://www.habarisoft.com/scroogexhtml/8.7/docs/api/version.html Other platforms ScroogeXHTML is also available for the Java platform. (different feature set)