- 05 Dec 2024
- 2 Minutes à lire
- SombreLumière
- PDF
Custom authentication engine API specification
- Mis à jour le 05 Dec 2024
- 2 Minutes à lire
- SombreLumière
- PDF
Custom authentication engines must adhere to the following rules:
Each custom authentication engine can have its own configuration settings. These settings should be specified in the Plugincfg sub element of the EngineXX element in the OneSpan Authentication Server configuration file. Sub elements are not supported in the Plugincfg element.
This means that all engine properties should be specified and organized on the same single hierarchical level in the Plugincfg section.
Only properties of type string are supported in Plugincfg elements for the different engines.
- For Linux installations, a custom back-end engine must have root:root ownership and permissions set to 0755 to allow OneSpan Authentication Server to load it.
The custom back-end authentication engine should have an API that features the following functions:
- ikey_initialise()
- ikey_authenticate()
- ikey_terminate()
ikey_initialise (Function)
The ikey_initialise() function should initialize the custom authentication engine. The implementation will retrieve custom engine configuration settings by using the getProperty function pointer. All property values will be returned as string values. The application developer must convert the property string values to the correct data type when they are returned.
Syntax
int ikey_initialise(char* (*getProperty) (char* szKey), char* szErrorString, int nErrorStrLen);
Parameters
Parameter name | Data type | Input/Output | Description |
---|---|---|---|
getProperty | Function pointer | I | This function pointer parameter allows retrieval of custom authentication engine property values. This function only supports the retrieval of custom engine properties specified in the OneSpan Authentication Server configuration file. |
szErrorString | char* | O | This parameter can be used to return error messages to OneSpan Authentication Server if the initialization fails. The maximum available string length is indicated by the nErrorStrLen parameter. |
nErrorStrLen | int | I | This parameter specifies themaximum string length of the szErrorString parameter. |
Return value
Return value | Description |
---|---|
0 | Initialization succeeded. |
–1 | Initialization failed. |
ikey_authenticate (Function)
The ikey_authenticate() function verifies the password for a specified user.
Syntax
int ikey_authenticate(const char* szUserId, const char* szDomain, const char* swPassword, int* bAutheticated, char* szErrorString, int* nErrorStrLen);
Parameters
Parameter name | Data type | Input/Output | Description |
---|---|---|---|
szUserID | const char* | I | The user ID of the user to be authenticated. By default, this parameter is null-terminated. |
szDomain | const char* | I | The domain that the user belongs to. |
szPassword | const char* | I | The password to be verified by the custom engine. By default, this parameter is null-terminated. |
bAuthenticated | int* | O | The authentication result:
|
szErrorString | char* | O | This parameter can be used to return error messages to OneSpan Authentication Server if the authentication fails. The maximum available string length is indicated by the nErrorStrLen parameter. This parameter needs to be null-terminated. |
nErrorStrLen | int | I | This parameter specifies the maximum available string length of the szErrorString parameter. |
Return value
Return value | Description |
---|---|
0 | Authentication succeeded. |
–1 | Authentiation failed. |
ikey_terminate (Function)
The ikey_terminate() function is called when the library is about to be unloaded by OneSpan Authentication Server.
Syntax
int ikey_terminate(char* szErrorString, int* nErrorStrLen);
Parameters
Parameter name | Data type | Input/Output | Description |
---|---|---|---|
szErrorString | char* | O | This parameter can be used to return error messages to OneSpan Authentication Server if the termination fails. The maximum available string length is indicated by the nErrorStrLen parameter. The returned error string should be null-terminated |
nErrorStrLen | int | I | This parameter specifies the maximum available string length of the szErrorString parameter. |