gobj_authenticate()
#
The gobj_authenticate()
function authenticates a user based on the provided JSON parameters. If no authentication parser is set, it defaults to the system user.
Prototype
json_t *gobj_authenticate(
hgobj gobj,
json_t *kw,
hgobj src
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
The GObj instance performing the authentication. |
|
|
A JSON object containing authentication parameters. Ownership is transferred. |
|
|
The source GObj requesting authentication. |
Return Value
Returns a JSON object containing the authentication result. The object includes result
(0 for success, -1 for failure), comment
(a message), and username
(the authenticated username).
Notes
If a local authentication method (mt_authenticate
) is defined, it takes precedence. Otherwise, a global authentication parser is used. If neither is available, the function defaults to the system user.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples