The ABRA Flexi accounting system allows contacts stored in the database to be used for authentication.
First, you need to set a username and password for the contact via the API. There are two ways to do this:
The password can be sent in plain-text form:
The password can be sent as the result of a hash function call. In this case, the salt and hash function type are required parameters:
You can then authenticate a contact via the API by calling:
POST /c/firma/kontakty/1/authenticate Accept: application/xml Content-Type: application/x-www-form-urlencoded username=jan&password=heslo
Authentication also works on the general contacts URL:
POST /c/firma/kontakt/authenticate Accept: application/xml Content-Type: application/x-www-form-urlencoded username=jan&password=heslo
The response always returns an HTTP status code 200; the result is included in the response body:
Successful authentication:
<?xml version="1.0"?><winstrom version="1.0"> <success>true</success> <message/></winstrom>
Failed authentication:
<?xml version="1.0"?><winstrom version="1.0"> <success>false</success> <message>Bylo zadáno chybné uživatelské jméno či heslo.</message></winstrom>
