Hi to all,
in order to connect to cloud (in my case dropbox) i set
and all works.
But if set PersistTokens.Key:='' (skip .ini file setted here) i' not able to connect anymore.
This because missing Authentication.Key that is present into the ini file.
There's a way to avoid the use of ini file and store all the information in a table (the possibility exists because is present PersistTokens.DataSource ... but i'm lost in documentation and i do not remeber the filed used)?
And more, there's a way to store the PersistTokens.Key in a user defined table (for example configuration record) with a differnt field name? (for example in a configuration table where are present userid, secret, key and callback hurl).
Thank's for reply
If you set PersistTokens.Key this will be the filename of the ini file. I suppose you are confusing with PersistTokens.Section? You can use the PersistTokens.DataSource and the PersistTokens.Location := plDataBase, to connect to a DataSource. Then, add the required fields:
The Optional fields are:
And can be saved by using PersistTokens.SaveClientID, SaveKey, SaveSecret, SaveCallBack and SaveExtra.
When calling SaveTokens, the tokens will be saved to the database, but this all happens automatically once you properly configure the database, credentials and when you succesfully connect to the service.
thank you for reply, one more question..
The data field to be use coulb be store in any table or in a "special" one ?
What exactly do you mean with the data field? Note that the PersistTokens.DataSource points to a single DataSource for all fields, including the tokens. So it's not possible to persist this data inside separate tables unless you manually persist the data. As long as PersistTokens.Section is an empty string, the data will not be persisted in the database. Then you can manually control loading and saving of tokens to any kind of format you wish, including the data separation in different tables.
i supposed that the filelds are all string type and my last question was in order to understan if those fileds must store in a separate table (called CloudDataTable) or if can be stored in a configuration table (ConfigurationTable) with all others program configuration value.
After read you last reply, i decided to keep all cloud information in a dedicated table.
Now i'll go on with other test ..... you'll excuse me for further question ....
Thank's for all
Thanks for the feedback! Indeed all values are strings.
about TTMSFNCCloudDropBox.Connect ....
After setting clientid, client secret and callback hurl is possible call TTMSFNCCloudDropBox.Connect.
If something wrong a browser page will open with some information.
There any register or something else that store the connect status?
I try to explin better ....
After call connect i need to know if all is ok (and a green led is showed) or some error happend (reg led is showed).
Is there this possibility ?? and if yes where i can check it ?
Thank you for attention...
When everything is succesful, the OnConnected event is triggered. When the access is denied, you can use the OnAccessDenied event.
Thank you Pieter ...
For today is all ....
Tomorrow is another day !! ehehehehe
Thanks for the feedback. If anything comes up, please let me know.