Tizen Native API  6.5
FIDO UAF MESSAGES

Fido UAF Messages.

Required Header

#include <fido_uaf_client.h>

Overview

The FIDO UAF Client APIs which process UAF messages 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 Documentation

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.
 
Since :
3.0
Parameters:
[in]tizen_error_codeTizen platform error code
[in]uaf_response_jsonFIDO response message in JSON format
[in]user_dataThe user data passed from the callback function
Precondition:
fido_uaf_get_response_message() must be called to get this callback invoked.
See also:
fido_uaf_get_response_message()

Function Documentation

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.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/fido.client
Parameters:
[in]uaf_request_jsonThe FIDO UAF message in JSON format which is received from the relying party server
[in]channel_bindingThe channel binding data in JSON format which is received from the relying party server
[in]callbackThe callback to receive response
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
FIDO_ERROR_NONESuccessful
FIDO_ERROR_INVALID_PARAMETERInvalid parameter
FIDO_ERROR_NOT_SUPPORTEDFIDO is not supported
See also:
fido_uaf_response_message_cb()
int fido_uaf_is_supported ( const char *  uaf_message_json,
bool *  is_supported 
)

Checks whether the FIDO message can be processed.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/fido.client
Parameters:
[in]uaf_message_jsonThe FIDO message in JSON format which is received from the relying party server
[out]is_supportedTrue if the message can be handled by the device, else false
Returns:
0 on success, otherwise a negative error value
Return values:
FIDO_ERROR_NONESuccessful
FIDO_ERROR_OUT_OF_MEMORYOut of Memory
FIDO_ERROR_INVALID_PARAMETERInvalid parameter
FIDO_ERROR_NOT_SUPPORTEDFIDO is not supported
FIDO_ERROR_PERMISSION_DENIEDThe application does not have permission to call this function.
FIDO_ERROR_UNSUPPORTED_VERSIONThe UAF Message does not specify a protocol version supported by this FIDO UAF Client.
FIDO_ERROR_NO_SUITABLE_AUTHENTICATORNo suitable authenticators found.
FIDO_ERROR_PROTOCOL_ERRORThe interaction may have timed out, or the UAF message is malformed.
FIDO_ERROR_UNTRUSTED_FACET_IDThe 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.

Remarks:
This is especially important for cases when a new registration may be considered by the client to be in a pending state until it is communicated that the server accepted it.
Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/fido.client
Parameters:
[in]response_codeThe status code received from Server, FIDO_SERVER_STATUS_CODE_OK implies success
[in]uaf_response_jsonThe FIDO response message sent to server in JSON format
Returns:
0 on success, otherwise a negative error value
Return values:
FIDO_ERROR_NONESuccessful
FIDO_ERROR_OUT_OF_MEMORYOut of Memory
FIDO_ERROR_INVALID_PARAMETERInvalid parameter
FIDO_ERROR_NOT_SUPPORTEDFIDO is not supported
FIDO_ERROR_PERMISSION_DENIEDThe application does not have permission to call this function.
FIDO_ERROR_UNSUPPORTED_VERSIONThe UAF Message does not specify a protocol version supported by this FIDO UAF Client.
FIDO_ERROR_NO_SUITABLE_AUTHENTICATORNo suitable authenticators found.
FIDO_ERROR_PROTOCOL_ERRORThe interaction may have timed out, or the UAF message is malformed.
FIDO_ERROR_UNTRUSTED_FACET_IDThe caller's id is not allowed to use this operation.
See also:
fido_uaf_response_message_cb()