We have a requirement to use callback url's which are https. These will not be localhost they will be the externally accessible url of the server. ie. https://sub.domain.co.uk:8888 The port is accessible from outside the machine.
How can this be done with the CloudStorageServices component?
Hi Bart
This app is a VCL app. We use OpenSSL dlls (libeay and ssleay) with Indy to create secure connections. Is there a way we can use those to enable this functionality?
Thanks
Hi, we'll investigate this as soon as possible.
Hi,
We have investigated this here. In the unit TMSFNCCloudOAuth we have added an event OnConfigureHTTPServer, which will allow you to customize the HTTPServer and configure an OpenSSL handler. (Check you private messages for an incremental source update). You can configure https://sub.domain.co.uk:8888 as a callback URL however, the HTTPServer will listen to port 8888 on the local host. This means that your domain will have to redirect the call to the local host. You can configure local host with a certificate as well.
Hi Pieter, that's great! Thank you!
I have located and replaced the files in \AppData\Local\tmssoftware\registered
I'm unclear on how we call and use the event? we are using a TTMSFNCCloudStorageServices component currently. Would it be possible to paste a snippet here?
Many thanks
Hi,
You can access the storage component via this code. You need to configure which storage service you want via the Service property, and then afterwards use the programmatic assignment for the OnConfigureHTTPServer. When connecting, the event should be triggered. In this event, you can configure SSL IOHandler to handle HTTPS redirects.
unit Unit28;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs,
FMX.TMSFNCCustomComponent, FMX.TMSFNCCloudStorageServices, FMX.TMSFNCCloudOAuth;
type
TForm28 = class(TForm)
TMSFNCCloudStorageServices1: TTMSFNCCloudStorageServices;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
procedure DoConfigureHTTPServer(Sender: TObject; const AHTTPServer: THTTPServer);
end;
var
Form28: TForm28;
implementation
{$R *.fmx}
procedure TForm28.DoConfigureHTTPServer(Sender: TObject;
const AHTTPServer: THTTPServer);
begin
//
end;
procedure TForm28.FormCreate(Sender: TObject);
begin
TMSFNCCloudStorageServices1.Storage.OnConfigureHTTPServer := DoConfigureHTTPServer;
end;
end.