Tizen Native API
5.0
|
Fido UAF Messasges.
#include <fido_uaf_client.h>
The FIDO UAF Client APIs which process UAF meesages from fido server. More details about the FIDO specification can be found in https://fidoalliance.org/specifications/download
Functions | |
int | fido_uaf_is_supported (const char *uaf_message_json, bool *is_supported) |
Checks whether the FIDO message can be processed. | |
int | fido_uaf_get_response_message (const char *uaf_request_json, const char *channel_binding, fido_uaf_response_message_cb callback, void *user_data) |
Processes the given FIDO UAF message. | |
int | fido_uaf_set_server_result (int response_code, const char *uaf_response_json) |
Notifies the FIDO client about the server result. FIDO Server sends the result of processing a UAF message to FIDO client. | |
Typedefs | |
typedef void(* | fido_uaf_response_message_cb )(fido_error_e tizen_error_code, const char *uaf_response_json, void *user_data) |
Called when fido_uaf_get_response_message() response comes. |
typedef void(* fido_uaf_response_message_cb)(fido_error_e tizen_error_code, const char *uaf_response_json, void *user_data) |
Called when fido_uaf_get_response_message() response comes.
The following error codes can be delivered:
FIDO_ERROR_NONE Successful FIDO_ERROR_OUT_OF_MEMORY Out of Memory FIDO_ERROR_USER_ACTION_IN_PROGRESS User action is in progress. FIDO_ERROR_USER_CANCELLED User has cancelled the operation. FIDO_ERROR_PERMISSION_DENIED The application does not have permission to call this function. FIDO_ERROR_UNSUPPORTED_VERSION The UAF Message does not specify a protocol version supported by this FIDO UAF Client. FIDO_ERROR_NO_SUITABLE_AUTHENTICATOR No suitable authenticators found. FIDO_ERROR_PROTOCOL_ERROR The interaction may have timed out, or the UAF message is malformed. FIDO_ERROR_UNTRUSTED_FACET_ID The caller's id is not allowed to use this operation.
[in] | tizen_error_code | Tizen platform error code |
[in] | uaf_response_json | FIDO response message in JSON format |
[in] | user_data | The user data passed from the callback function |
int fido_uaf_get_response_message | ( | const char * | uaf_request_json, |
const char * | channel_binding, | ||
fido_uaf_response_message_cb | callback, | ||
void * | user_data | ||
) |
Processes the given FIDO UAF message.
This function is asynchronous. The response is delivered via fido_uaf_response_message_cb(). Depending on the FIDO message type, this may involve user interactions.
[in] | uaf_request_json | The FIDO UAF message in JSON format which is received from the relying party server |
[in] | channel_binding | The channel binding data in JSON format which is received from the relying party server |
[in] | callback | The callback to receive response |
[in] | user_data | The user data to be passed to the callback function |
0
on success, otherwise a negative error value FIDO_ERROR_NONE | Successful |
FIDO_ERROR_INVALID_PARAMETER | Invalid parameter |
FIDO_ERROR_NOT_SUPPORTED | FIDO is not supported |
int fido_uaf_is_supported | ( | const char * | uaf_message_json, |
bool * | is_supported | ||
) |
Checks whether the FIDO message can be processed.
[in] | uaf_message_json | The FIDO message in JSON format which is received from the relying party server |
[out] | is_supported | True if the message can be handled by the device, else false |
0
on success, otherwise a negative error value FIDO_ERROR_NONE | Successful |
FIDO_ERROR_OUT_OF_MEMORY | Out of Memory |
FIDO_ERROR_INVALID_PARAMETER | Invalid parameter |
FIDO_ERROR_NOT_SUPPORTED | FIDO is not supported |
FIDO_ERROR_PERMISSION_DENIED | The application does not have permission to call this function. |
FIDO_ERROR_UNSUPPORTED_VERSION | The UAF Message does not specify a protocol version supported by this FIDO UAF Client. |
FIDO_ERROR_NO_SUITABLE_AUTHENTICATOR | No suitable authenticators found. |
FIDO_ERROR_PROTOCOL_ERROR | The interaction may have timed out, or the UAF message is malformed. |
FIDO_ERROR_UNTRUSTED_FACET_ID | The caller's id is not allowed to use this operation. |
int fido_uaf_set_server_result | ( | int | response_code, |
const char * | uaf_response_json | ||
) |
Notifies the FIDO client about the server result. FIDO Server sends the result of processing a UAF message to FIDO client.
[in] | response_code | The status code received from Server, FIDO_SERVER_STATUS_CODE_OK implies success |
[in] | uaf_response_json | The FIDO response message sent to server in JSON format |
0
on success, otherwise a negative error value FIDO_ERROR_NONE | Successful |
FIDO_ERROR_OUT_OF_MEMORY | Out of Memory |
FIDO_ERROR_INVALID_PARAMETER | Invalid parameter |
FIDO_ERROR_NOT_SUPPORTED | FIDO is not supported |
FIDO_ERROR_PERMISSION_DENIED | The application does not have permission to call this function. |
FIDO_ERROR_UNSUPPORTED_VERSION | The UAF Message does not specify a protocol version supported by this FIDO UAF Client. |
FIDO_ERROR_NO_SUITABLE_AUTHENTICATOR | No suitable authenticators found. |
FIDO_ERROR_PROTOCOL_ERROR | The interaction may have timed out, or the UAF message is malformed. |
FIDO_ERROR_UNTRUSTED_FACET_ID | The caller's id is not allowed to use this operation. |