Protocol: Difference between revisions
No edit summary |
mNo edit summary |
||
Line 30: | Line 30: | ||
[ Minimal Required Fields] | [ Minimal Required Fields] | ||
[ Optional Arguments ] | [ Optional Arguments ] | ||
[ Returns ] | [ Returns ] | ||
Line 61: | Line 57: | ||
>> USER=<str> - USER name | >> USER=<str> - USER name | ||
>> PASS=<str> - PASSWORD | >> PASS=<str> - PASSWORD | ||
[ Optional Arguments ] | [ Optional Arguments ] | ||
[ Returns ] | [ Returns ] | ||
Line 71: | Line 65: | ||
>> CODE=<int> - Failure code. | >> CODE=<int> - Failure code. | ||
>> MSG=<str> - Human readable string message. | >> MSG=<str> - Human readable string message. | ||
[ Example ] | [ Example ] |
Revision as of 07:23, 21 October 2005
Following is a list of API commands.
Connecting
WELCOME
When you connect to the FXP.One server, you should receive a greeting string, similar to:
>> WELCOME|name=FXP.Oned|version=0.1|build=18|SSL=optional
Pay special attention to the SSL flag here, since if it is enforced, and you attempt plain text authentication (which will fail) you are exposing the user and password.
The "version" is the server version and build The "protocol" is the protocol version, which you can check to be of the same Major type as your application knows.
The "SSL" field can be "disabled", "optional", and "forced".
SSL
Initiate SSL challenge. This is sent by clients requesting the remainder of the session to be in SSL. This requires that FXP.One engine's WELCOME message is either "forced" or "optional".
[ Minimal Required Fields]
[ Optional Arguments ]
[ Returns ] >> CODE=<int> - Command return status CODE. >> OK - Initiation request accepted, start SSL phase. >> MSG - Human-readable message string
[ Example ] << SSL >> SSL|CODE=232|OK|Msg=Attempting SSL negotiations.
AUTH
Send USER and PASS for authentication. This requires a valid user and password pair already registered on FXP.One. If FXP.One was started with no user database files, it will create one with the account user "admin" and password "admin".
[ Minimal Required Fields] >> USER=<str> - USER name >> PASS=<str> - PASSWORD
[ Optional Arguments ]
[ Returns ] >> OK - Authentication was successful. >> CODE=<int> - Failure code. >> MSG=<str> - Human readable string message.
[ Example ] << AUTH|USER=admin|PASS=admin >> AUTH|OK|MSG=Successful >> AUTH|CODE=502|MSG=Login incorrect >> AUTH|CODE=503|MSG=Secure channel enforced.