Validating the key

Top  Previous  Next

After you have generated the one-time key and password on the server side and have written them on the HTML file, you should call the IsOnTimeKeyValid method from the client-side. This method checks whether this authentication credentials are valid and opens a new Web client session, using Ajax.

 

After invoking this method, you will be able to call the Connect method, responsible to create and place the FireMonkey application on the HTML container.

 

JavaScript example:

 

function ValidateOneTimeKey(key, pass) {

   webfmx.isOneTimeKeyValid(

       key,

       pass,

      function () {

           connect();

       },

      function () {

           alert('error');

       }

   );

}

 

Parameters:

 

Parameter

Description

Type

key

one-time generated key

String

pass

one-time generated password.

String

success

function to be executed in case the authentication info is validated.

function

error

function to be executed in case the authentication info is not valid.

function

 

Read also:

Read also the connect method, called in case of the validation success.