Skip to content

Authentication

There are two different use cases for the Authentication.

  1. To verify if a user and password is valid and the user could login
  2. To check if a SECURITY-ID is valid

Operationcode: AUTHENTICATE

AUTHENTICATE

Direction

SIHOT.PMS ← SIHOT.WEB

Message

<?xml version="1.0" encoding="ISO-8859-1"?>
<SIHOT-DOCUMENT>
        <OC>AUTHENTICATE</OC>
        <ID>1</ID>
        <TN>1</TN>
        <AUTHENTICATION-INFOS>
                <USER>YOUR NAME</USER>
                <PASSWORD>YOUR PWD</PASSWORD>
        <SECURITY-ID></SECURITY-ID>
        </AUTHENTICATION-INFOS>
</SIHOT-DOCUMENT>

Attributes Message

Attribute Description Data type
OC AUTHENTICATE String
ID Hotel ID Long

Mandatory for: User-validation

Attribute Description Data type
USER Username String
PASSWORD Password String

Mandatory for: Security ID Check

Attribute Description Data type
SECURITY-ID Provide an existing SECURITY-ID to verify that the ID is still valid String

Response

<?xml version="1.0" encoding="ISO-8859-1"?>
<SIHOT-Document>
        <SIHOT-Version>
                <Version>11.0.0.0</Version>
                <EXE>SINETRES.EXE</EXE>
        </SIHOT-Version>
        <OC>AUTHENTICATE-REQUEST-ANSWER</OC>
        <ID>1</ID>
        <RC>0</RC>
        <TN>1</TN>
        <MSG/>
        <SECURITY-ID>fUX5tL8jGSgqP+KmWzdthh9xkZQ8s3QMTDZmzEiqOkIK36U806WMEK490QP+rM8XoELL7aiRwMz6gIXBZOdIPTwjVouZXDA/y68sdM+PXDEWPV+BmMPlX9VwCYhklm/Gx9g&\#61;</SECURITY-ID>
        <USER-CLASS>8</USER-CLASS>
        <USER-CLASS-DESC>Admin</USER-CLASS-DESC>
</SIHOT-Document>

Attributes Response

Attribute Description Data type
ID Hotel ID Long
RC return code for this request:

0 .. Authentication successful

>0 .. an error occurred, see <MSG>

Long
MSG If <RC> is not 0, this element contains the error message String
SECURITY-ID SecurityID if authentication was successful String
USER-CLASS The class of user in SIHOT.PMS:

1 (Novice)

2 (Regular)

4 (Experienced)

8 (Admin)

short
USER-CLASS-DESC Description of user class, possible values:

Novice, Regular, Experienced, Admin

String

Examples

Example 1 - Login with user and password

<?xml version="1.0" encoding="ISO-8859-1"?>
<SIHOT-DOCUMENT>
        <OC>AUTHENTICATE</OC>
        <ID>1</ID>
        <TN>1</TN>
        <AUTHENTICATION-INFOS>
                <USER>USERNAME</USER>
                <PASSWORD>PASSWORD</PASSWORD>
        </AUTHENTICATION-INFOS>
</SIHOT-DOCUMENT>

Example 2 - Validate Security ID

<?xml version="1.0" encoding="ISO-8859-1"?>
<SIHOT-DOCUMENT>
        <OC>AUTHENTICATE</OC>
        <ID>1</ID>
        <TN>1</TN>
        <AUTHENTICATION-INFOS>
                <SECURITY-ID>YOUR SECURITY-ID</SECURITY-ID>
        </AUTHENTICATION-INFOS>
</SIHOT-DOCUMENT>