Authorisation Service

Actions

Actions Overview

Endpoint

Brief Description

Macro

LoginAdmin

Processes the login of an administrator.

OT_ACTION_LOGIN_ADMIN

Login

Processes the login of a user.

OT_ACTION_LOGIN

Register

Registers a user.

OT_ACTION_REGISTER

RefreshSession

Refreshes a user session.

OT_ACTION_REFRESH_SESSION

Logger.SetGlobal

Sets the global logging mode.

OT_ACTION_CMD_SetGlobalLogFlags

GetUserData

Gets the user data from the database.

OT_ACTION_GET_USER_DATA

GetAllUsers

Gets all users from the database.

OT_ACTION_GET_ALL_USERS

GetAllUserCount

Counts all users in the database.

OT_ACTION_GET_ALL_USER_COUNT

GetProjectData

Gets the project data.

OT_ACTION_GET_PROJECT_DATA


LoginAdmin

Brief description

Processes the login of an administrator. Compares admin credentials with the database.

Message Type

One way TLS

Parameters

Name

Type

Description

Macro

Username

String

User name

OT_PARAM_AUTH_USERNAME

Password

String

User password

OT_PARAM_AUTH_PASSWORD

EncryptedPassword

Boolean

Is the password encrypted

OT_PARAM_AUTH_ENCRYPTED_PASSWORD

Response

Name

Type

Description

Macro

successful

Boolean

Are the credentials correct

OT_ACTION_AUTH_SUCCESS

EncryptedPassword

String

Encrypted password (if successful)

OT_PARAM_AUTH_ENCRYPTED_PASSWORD


Login

Brief description

Processes the login of a user. Authenticates the user and, if successful, creates a new session including a temporary user.

Message Type

One way TLS

Parameters

Name

Type

Description

Macro

Username

String

User name

OT_PARAM_AUTH_USERNAME

Password

String

User password

OT_PARAM_AUTH_PASSWORD

EncryptedPassword

Boolean

Is the password encrypted

OT_PARAM_AUTH_ENCRYPTED_PASSWORD

Response

Name

Type

Description

Macro

successful

Boolean

Are the credentials correct

OT_ACTION_AUTH_SUCCESS

Password

String

Unencrypted password (if successful)

OT_PARAM_AUTH_PASSWORD

EncryptedPassword

String

Encrypted password (if successful)

OT_PARAM_AUTH_ENCRYPTED_PASSWORD


Register

Brief description

Registers a user. Throws a std::runtime_error if the user name already exists as an admin user name in the database.

Message Type

One way TLS

Parameters

Name

Type

Description

Macro

Username

String

User name

OT_PARAM_AUTH_USERNAME

Password

String

User password

OT_PARAM_AUTH_PASSWORD

Response

Name

Type

Description

Macro

successful

Boolean

Is the registration successfull

OT_ACTION_AUTH_SUCCESS


RefreshSession

Brief description

Refreshes a user session.

Message Type

One way TLS

Parameters

Name

Type

Description

Macro

DB.Username

String

User name

OT_PARAM_DB_USERNAME

Response

An empty String.


Logger.SetGlobal

Brief description

Sets the global logging mode based on the flags provided.

Message Type

One way TLS

Parameters

Name

Type

Description

Macro

Flags

Array

Log flags

OT_ACTION_PARAM_Flags

Response

Name

Type

Description

Macro

OK

String

Return value OK

OT_ACTION_RETURN_VALUE_OK


GetUserData

Brief description

Gets the user data from the database.

Message Type

One way TLS

Parameters

Name

Type

Description

Macro

Username

String

User name

OT_PARAM_AUTH_USERNAME

Response

A String containing the user data.


GetAllUsers

Brief description

Gets all users from the database.

Message Type

One way TLS

Parameters

No parameters are required.

Response

A String containing a list of all user data.


GetAllUserCount

Brief description

Counts all users in the database.

Message Type

One way TLS

Parameters

No parameters are required.

Response

A String containing the count of all users.


GetProjectData

Brief description

Gets the project data.

Message Type

One way TLS

Parameters

Name

Type

Description

Macro

ProjectName

String

Project name

OT_PARAM_AUTH_PROJECT_NAME

Response

A String containing an ot::ReturnMessage.

In case of success it will contain the project data.