Tizen Native API
9.0
|
The Web Authentication module provides a native API enabling the creation and use of strong, attested, scoped, public key-based credentials by web applications, for the purpose of strongly authenticating users.
Required Header
#include <webauthn.h>
Overview
It provides functions for creating public key-based credentials (wauthn_make_credential()) and using them (wauthn_get_assertion()). Both these operation are being performed asynchronously. Callbacks passed as arguments are used to notify about the progress or when user's interaction is necessary. Due to significant amount of time required to complete both requests, cancellation is also possible using wauthn_cancel(). The module also provides a variety of data types based on W3C Web Authentication API (https://www.w3.org/TR/webauthn-3/) used to control the credential creation and assertion process.
Related Features
This module is related with the following features:
- http://tizen.org/feature/security.webauthn
- http://tizen.org/feature/network.bluetooth.le
- and at least one of the below features:
- http://tizen.org/feature/network.wifi
- http://tizen.org/feature/network.ethernet
- http://tizen.org/feature/network.telephony
- http://tizen.org/feature/network.wifi
It is recommended to use features in your application for reliability.
You can check if the device supports the related features for this API by using System Information, and control your application's actions accordingly.
To ensure your application is running only on devices with specific features, please define the features in your manifest file using the manifest editor in the SDK.
More details on using features in your application can be found in the feature element description.
Functions | |
int | wauthn_set_api_version (int api_version_number) |
Sets API version that the caller uses. | |
int | wauthn_supported_authenticators (unsigned int *supported) |
Gets information on authenticator types that the client platform supports. | |
int | wauthn_make_credential (const wauthn_client_data_s *client_data, const wauthn_pubkey_cred_creation_options_s *options, wauthn_mc_callbacks_s *callbacks) |
Makes a new web authentication credential and store it to authenticator. | |
int | wauthn_get_assertion (const wauthn_client_data_s *client_data, const wauthn_pubkey_cred_request_options_s *options, wauthn_ga_callbacks_s *callbacks) |
Gets assertion from authenticator. | |
int | wauthn_cancel (void) |
Stops operation of the previous wauthn_make_credential() or wauthn_get_assertion() call. | |
Typedefs | |
typedef enum __wauthn_authenticator_transport | wauthn_authenticator_transport_e |
WebAuthn authenticator transports. | |
typedef enum __wauthn_hash_algorithm | wauthn_hash_algorithm_e |
WebAuthn hash algorithms. Currently one hash algorithm is used, namely "SHA-256". | |
typedef enum __wauthn_cose_algorithm | wauthn_cose_algorithm_e |
WebAuthn COSE (CBOR Object Signing and Encryption) algorithms. | |
typedef enum __wauthn_attestation_pref | wauthn_attestation_pref_e |
WebAuthn attestation preference. | |
typedef enum __wauthn_pubkey_cred_hint | wauthn_pubkey_cred_hint_e |
WebAuthn public key credential hint value. | |
typedef enum __wauthn_user_verification_requirement | wauthn_user_verification_requirement_e |
WebAuthn user verification requirement value. | |
typedef enum __wauthn_resident_key_requirement | wauthn_resident_key_requirement_e |
WebAuthn resident key requirement value. | |
typedef enum __wauthn_authenticator_attachment | wauthn_authenticator_attachment_e |
WebAuthn authentication attachment value. | |
typedef enum __wauthn_pubkey_cred_type | wauthn_pubkey_cred_type_e |
WebAuthn credential type. Currently one credential type is defined, namely "public-key". | |
typedef struct __wauthn_const_buffer | wauthn_const_buffer_s |
The structure for const binary buffer used in this Native API. | |
typedef struct __wauthn_authenticator_attestation_response | wauthn_authenticator_attestation_response_s |
The structure for response of wauthn_make_credential(). | |
typedef struct __wauthn_authenticator_assertion_response | wauthn_authenticator_assertion_response_s |
The structure for response of wauthn_get_assertion(). | |
typedef struct __wauthn_rp_entity | wauthn_rp_entity_s |
The structure for a RP entity. | |
typedef struct __wauthn_user_entity | wauthn_user_entity_s |
The structure for a user entity. | |
typedef struct __wauthn_pubkey_cred_param | wauthn_pubkey_cred_param_s |
The structure for a parameter for credential generation. | |
typedef struct __wauthn_pubkey_cred_params | wauthn_pubkey_cred_params_s |
The list structure for parameters for credential generation. | |
typedef struct __wauthn_pubkey_cred_descriptor | wauthn_pubkey_cred_descriptor_s |
The structure for a public key credential descriptor. | |
typedef struct __wauthn_pubkey_cred_descriptors | wauthn_pubkey_cred_descriptors_s |
The list structure for public key credential descriptors. | |
typedef struct __wauthn_authentication_ext | wauthn_authentication_ext_s |
The structure for an authentication extension. | |
typedef struct __wauthn_authentication_exts | wauthn_authentication_exts_s |
The list structure for authentication extensions. | |
typedef struct __wauthn_authenticator_sel_cri | wauthn_authenticator_sel_cri_s |
The structure for an authenticator selection criteria. | |
typedef struct __wauthn_pubkey_cred_hints | wauthn_pubkey_cred_hints_s |
The list structure for public key credential hints. | |
typedef struct __wauthn_hybrid_linked_data | wauthn_hybrid_linked_data_s |
The structure for a linked device data. | |
typedef struct __wauthn_attestation_formats | wauthn_attestation_formats_s |
The list structure for attestation formats. | |
typedef struct __wauthn_pubkey_cred_creation_options | wauthn_pubkey_cred_creation_options_s |
The structure for a make credential option. | |
typedef struct __wauthn_pubkey_cred_request_options | wauthn_pubkey_cred_request_options_s |
The structure for a get assertion option. | |
typedef struct __wauthn_pubkey_credential_attestation | wauthn_pubkey_credential_attestation_s |
The structure for a publickey_credential response for wauthn_make_credential(). | |
typedef struct __wauthn_pubkey_credential_assertion | wauthn_pubkey_credential_assertion_s |
The structure for a publickey_credential response for wauthn_get_assertion(). | |
typedef struct __wauthn_client_data | wauthn_client_data_s |
The structure for a client data JSON. | |
typedef void(* | wauthn_display_qrcode_cb )(const char *qr_contents, void *user_data) |
Invoked when a QR Code need to be displayed. | |
typedef void(* | wauthn_mc_on_response_cb )(const wauthn_pubkey_credential_attestation_s *pubkey_cred, wauthn_error_e result, void *user_data) |
Invoked when the response for the make credential request need to be returned. | |
typedef void(* | wauthn_ga_on_response_cb )(const wauthn_pubkey_credential_assertion_s *pubkey_cred, wauthn_error_e result, void *user_data) |
Invoked when the response for the get assertion request need to be returned. | |
typedef void(* | wauthn_update_linked_data_cb )(const wauthn_hybrid_linked_data_s *linked_data, wauthn_error_e result, void *user_data) |
Invoked when the authenticator updates its linked device data or the authenticator disconnects. | |
typedef struct __wauthn_mc_callbacks | wauthn_mc_callbacks_s |
The structure for callback function list used to make credential. | |
typedef struct __wauthn_ga_callbacks | wauthn_ga_callbacks_s |
The structure for callback function list used to get assertion. | |
Defines | |
#define | WAUTHN_API_VERSION_NUMBER 0x00000001 |
Current API version. |
Define Documentation
#define WAUTHN_API_VERSION_NUMBER 0x00000001 |
Current API version.
- Since :
- 7.0
Typedef Documentation
typedef struct __wauthn_attestation_formats wauthn_attestation_formats_s |
The list structure for attestation formats.
- Since :
- 7.0
- Remarks:
- The attestation formats are a sequence of strings that expresses the Relying Party's preference for attestation statement formats, from most to least preferable.
- Each wauthn_const_buffer_s has a string of an attestation format such as packed, android-key, fido-u2f, apple, none, and so on.
- Refer to the following W3C specification for more information. https://www.w3.org/TR/webauthn-3/#attestation-statement-format-identifier
typedef enum __wauthn_attestation_pref wauthn_attestation_pref_e |
WebAuthn attestation preference.
- Since :
- 7.0
- Remarks:
- Refer to the following W3C specification for more information. https://www.w3.org/TR/webauthn-3/#enumdef-attestationconveyancepreference
typedef struct __wauthn_authentication_ext wauthn_authentication_ext_s |
typedef struct __wauthn_authentication_exts wauthn_authentication_exts_s |
The list structure for authentication extensions.
- Since :
- 7.0
- Remarks:
- Refer to the following W3C specification for more information. https://www.w3.org/TR/webauthn-3/#client-extension-input
- See also:
- wauthn_authentication_ext_s
The structure for response of wauthn_get_assertion().
- Since :
- 7.0
- Remarks:
- Refer to the following W3C specification for more information. https://www.w3.org/TR/webauthn-3/#authenticatorassertionresponse
WebAuthn authentication attachment value.
- Since :
- 7.0
- Remarks:
- Refer to the following W3C specification for more information. https://www.w3.org/TR/webauthn-3/#enumdef-authenticatorattachment
typedef struct __wauthn_authenticator_attestation_response wauthn_authenticator_attestation_response_s |
The structure for response of wauthn_make_credential().
- Since :
- 7.0
- Remarks:
- Refer to the following W3C specification for more information. https://www.w3.org/TR/webauthn-3/#authenticatorattestationresponse
typedef struct __wauthn_authenticator_sel_cri wauthn_authenticator_sel_cri_s |
The structure for an authenticator selection criteria.
- Since :
- 7.0
- Remarks:
- Refer to the following W3C specification for more information. https://www.w3.org/TR/webauthn-3/#dictdef-authenticatorselectioncriteria
WebAuthn authenticator transports.
- Since :
- 7.0
- Remarks:
- Refer to the following W3C specification for more information. https://www.w3.org/TR/webauthn-3/#enum-transport
- Multiple transport values can be combined using bit-wise operation.
typedef struct __wauthn_client_data wauthn_client_data_s |
The structure for a client data JSON.
- Since :
- 7.0
- Remarks:
- Refer to the following W3C specification about how to encode the client_data_json. https://www.w3.org/TR/webauthn-3/#collectedclientdata-json-compatible-serialization-of-client-data
- See also:
- wauthn_hash_algorithm_e
typedef struct __wauthn_const_buffer wauthn_const_buffer_s |
The structure for const binary buffer used in this Native API.
- Since :
- 7.0
typedef enum __wauthn_cose_algorithm wauthn_cose_algorithm_e |
WebAuthn COSE (CBOR Object Signing and Encryption) algorithms.
- Since :
- 7.0
- Remarks:
- Refer to the following W3C specification for more information. https://www.w3.org/TR/webauthn-3/#sctn-alg-identifier
typedef void(* wauthn_display_qrcode_cb)(const char *qr_contents, void *user_data) |
Invoked when a QR Code need to be displayed.
- Since :
- 7.0
- Remarks:
- The qr_contents are encoded as you can see in the encodeQRContents() function of the FIDO specification: https://fidoalliance.org/specs/fido-v2.2-rd-20230321/fido-client-to-authenticator-protocol-v2.2-rd-20230321.html#hybrid-qr-initiated. The qr_contents is encoded like "FIDO:/0254318383..........7406596245".
- The image to be displayed shall be created from qr_contents with media vision API(mv_barcode_generate_image()).
- If the request does not need to display a QR code then this callback function won't be invoked.
- The qr_contents can be used only in the callback. To use outside, make a copy.
- Parameters:
-
[in] qr_contents The contents of the QR code to be displayed. [in] user_data The user data passed from the callback structure, wauthn_mc_callbacks_s or wauthn_ga_callbacks_s.
#include <mv_barcode.h> int ret; mv_engine_config_h engine_cfg = NULL; mv_barcode_type_e type = MV_BARCODE_QR; mv_barcode_qr_mode_e qr_enc_mode = MV_BARCODE_QR_MODE_UTF8; mv_barcode_qr_ecc_e qr_ecc = MV_BARCODE_QR_ECC_LOW; int qr_version = 5; const char* image_path = TMP_QR_FILE_PRX; mv_barcode_image_format_e image_format = MV_BARCODE_IMAGE_FORMAT_PNG; size_t image_width = 200; size_t image_height = 200; // the file, TMP_QR_FILE_PRX + ".png", will be created. ret = mv_barcode_generate_image(engine_cfg, qr_contents, image_width, image_height, type, qr_enc_mode, qr_ecc, qr_version, image_path, image_format); if (ret != MEDIA_VISION_ERROR_NONE) { std::cout << "mv_barcode_generate_image failed. ret=" << ret << std::endl; return -1; }
typedef struct __wauthn_ga_callbacks wauthn_ga_callbacks_s |
The structure for callback function list used to get assertion.
- Since :
- 7.0
typedef void(* wauthn_ga_on_response_cb)(const wauthn_pubkey_credential_assertion_s *pubkey_cred, wauthn_error_e result, void *user_data) |
Invoked when the response for the get assertion request need to be returned.
- Since :
- 7.0
- Remarks:
- The pubkey_cred can be used only in the callback. To use outside, make a copy.
- Parameters:
-
[in] pubkey_cred The public key credential contains response data. [in] result The result of the request. WAUTHN_ERROR_NONE if the request is completed well, WAUTHN_ERROR_CANCELED if the request is cancelled by wauthn_cancel() request. WAUTHN_ERROR_INVALID_STATE if the server entered invalid state. Known causes: - proxy issues,
- reached the limit of credentials stored by the authenticator. WAUTHN_ERROR_TIMED_OUT if the request times out. Know causes:
- authenticator does not respond during state assisted transactions due to lack of push notifications support (e.g. missing Google Account).
[in] user_data The user data passed from the callback structure, wauthn_ga_callbacks_s.
typedef enum __wauthn_hash_algorithm wauthn_hash_algorithm_e |
WebAuthn hash algorithms. Currently one hash algorithm is used, namely "SHA-256".
- Since :
- 7.0
- Remarks:
- Refer to the following W3C specification for more information. https://www.w3.org/TR/webauthn-3/#collectedclientdata-hash-of-the-serialized-client-data
typedef struct __wauthn_hybrid_linked_data wauthn_hybrid_linked_data_s |
The structure for a linked device data.
- Since :
- 7.0
- Remarks:
- The linked device data is used for state assisted transaction. From the successful QR initiated transaction, the linked device data might be returned from an authenticator to a webauthn client via wauthn_pubkey_credential_attestation_s or wauthn_pubkey_credential_assertion_s. Then the client can store the linked device data and use it in the next call for wauthn_pubkey_cred_creation_options_s or wauthn_pubkey_cred_request_options_s. Then the stated assisted transaction will start instead of QR initiated transaction.
- For more information, find a section with the keyword, "linking map", from the following specification. https://fidoalliance.org/specs/fido-v2.2-rd-20230321/fido-client-to-authenticator-protocol-v2.2-rd-20230321.html
- For more information about state assisted transaction, refer to the following. https://fidoalliance.org/specs/fido-v2.2-rd-20230321/fido-client-to-authenticator-protocol-v2.2-rd-20230321.html#hybrid-state-assisted
typedef struct __wauthn_mc_callbacks wauthn_mc_callbacks_s |
The structure for callback function list used to make credential.
- Since :
- 7.0
typedef void(* wauthn_mc_on_response_cb)(const wauthn_pubkey_credential_attestation_s *pubkey_cred, wauthn_error_e result, void *user_data) |
Invoked when the response for the make credential request need to be returned.
- Since :
- 7.0
- Remarks:
- The pubkey_cred can be used only in the callback. To use outside, make a copy.
- Parameters:
-
[in] pubkey_cred The public key credential contains response data. [in] result The result of the wauthn_make_credential() request. WAUTHN_ERROR_NONE if the request is completed well, WAUTHN_ERROR_CANCELED if the request is cancelled by wauthn_cancel() request. WAUTHN_ERROR_INVALID_STATE if the server entered invalid state. Known causes: - proxy issues,
- reached the limit of credentials stored by the authenticator. WAUTHN_ERROR_TIMED_OUT if the request times out. Know causes:
- authenticator does not respond during state assisted transactions due to lack of push notifications support (e.g. missing Google Account).
[in] user_data The user data passed from the callback structure, wauthn_mc_callbacks_s.
The structure for a make credential option.
- Since :
- 7.0
- Remarks:
- Refer to the following W3C specification for more information. https://www.w3.org/TR/webauthn-3/#dictdef-publickeycredentialcreationoptions
- See also:
- wauthn_make_credential()
- wauthn_rp_entity_s
- wauthn_user_entity_s
- wauthn_pubkey_cred_params_s
- wauthn_pubkey_cred_descriptors_s
- wauthn_authenticator_sel_cri_s
- wauthn_pubkey_cred_hints_s
- wauthn_attestation_pref_e
- wauthn_attestation_formats_s
- wauthn_authentication_exts_s
- wauthn_hybrid_linked_data_s
typedef struct __wauthn_pubkey_cred_descriptor wauthn_pubkey_cred_descriptor_s |
The structure for a public key credential descriptor.
- Since :
- 7.0
- Remarks:
- Refer to the following W3C specification for more information. https://www.w3.org/TR/webauthn-3/#dictdef-publickeycredentialdescriptor
typedef struct __wauthn_pubkey_cred_descriptors wauthn_pubkey_cred_descriptors_s |
The list structure for public key credential descriptors.
- Since :
- 7.0
- See also:
- wauthn_pubkey_cred_descriptor_s
typedef enum __wauthn_pubkey_cred_hint wauthn_pubkey_cred_hint_e |
WebAuthn public key credential hint value.
- Since :
- 7.0
- Remarks:
- Refer to the following W3C specification for more information. https://www.w3.org/TR/webauthn-3/#enumdef-publickeycredentialhints
typedef struct __wauthn_pubkey_cred_hints wauthn_pubkey_cred_hints_s |
typedef struct __wauthn_pubkey_cred_param wauthn_pubkey_cred_param_s |
The structure for a parameter for credential generation.
- Since :
- 7.0
- Remarks:
- Refer to the following W3C specification for more information. https://www.w3.org/TR/webauthn-3/#dictdef-publickeycredentialparameters
typedef struct __wauthn_pubkey_cred_params wauthn_pubkey_cred_params_s |
The list structure for parameters for credential generation.
- Since :
- 7.0
- See also:
- wauthn_pubkey_cred_param_s
The structure for a get assertion option.
- Since :
- 7.0
- Remarks:
- Refer to the following W3C specification for more information. https://www.w3.org/TR/webauthn-3/#dictionary-assertion-options
typedef enum __wauthn_pubkey_cred_type wauthn_pubkey_cred_type_e |
WebAuthn credential type. Currently one credential type is defined, namely "public-key".
- Since :
- 7.0
- Remarks:
- Refer to the following W3C specification for more information. https://www.w3.org/TR/webauthn-3/#enumdef-publickeycredentialtype
The structure for a publickey_credential response for wauthn_get_assertion().
- Since :
- 7.0
- Remarks:
- Refer to the following W3C specification for more information. https://www.w3.org/TR/webauthn-3/#iface-pkcredential https://www.w3.org/TR/webauthn-3/#sctn-credentialrequestoptions-extension
The structure for a publickey_credential response for wauthn_make_credential().
- Since :
- 7.0
- Remarks:
- Refer to the following W3C specification for more information. https://www.w3.org/TR/webauthn-3/#iface-pkcredential https://www.w3.org/TR/webauthn-3/#sctn-credentialcreationoptions-extension
WebAuthn resident key requirement value.
- Since :
- 7.0
- Remarks:
- Refer to the following W3C specification for more information. https://www.w3.org/TR/webauthn-3/#enum-residentKeyRequirement
typedef struct __wauthn_rp_entity wauthn_rp_entity_s |
The structure for a RP entity.
- Since :
- 7.0
- Remarks:
- Refer to the following W3C specification for more information. https://www.w3.org/TR/webauthn-3/#dictdef-publickeycredentialrpentity
typedef void(* wauthn_update_linked_data_cb)(const wauthn_hybrid_linked_data_s *linked_data, wauthn_error_e result, void *user_data) |
Invoked when the authenticator updates its linked device data or the authenticator disconnects.
- Since :
- 7.0
- Remarks:
- An authenticator might send its updated linked device data to a client within 2 minutes after sending a response to the client.
- If an authenticator updates its linked device data, this callback is called with WAUTHN_ERROR_NONE_AND_WAIT and not null linked_data.
- If an authenticator disconnects or 2 minutes have passed after receiving wauthn_mc_on_response_cb or wauthn_ga_on_response_cb, this callback is called with WAUTHN_ERROR_NONE and null linked_data.
- The linked_data can be used only in the callback. To use outside, make a copy.
- Parameters:
-
[in] linked_data The Linked Device Connection Info. If this is not null, the client has to update the data for next use. [in] result The result of the request. WAUTHN_ERROR_NONE_AND_WAIT if a update message has arrived and the client needs to wait for another message to arrive. WAUTHN_ERROR_NONE if the client doesn't have to to wait for another message. WAUTHN_ERROR_INVALID_STATE if the server entered invalid state. Known causes: - reached the limit of credentials stored by the authenticator.
[in] user_data The user data passed from the callback structure, wauthn_ga_callbacks_s.
typedef struct __wauthn_user_entity wauthn_user_entity_s |
The structure for a user entity.
- Since :
- 7.0
- Remarks:
- Refer to the following W3C specification for more information. https://www.w3.org/TR/webauthn-3/#dictdef-publickeycredentialuserentity
WebAuthn user verification requirement value.
- Since :
- 7.0
- Remarks:
- Refer to the following W3C specification for more information. https://www.w3.org/TR/webauthn-3/#enumdef-userverificationrequirement
Enumeration Type Documentation
WebAuthn attestation preference.
- Since :
- 7.0
- Remarks:
- Refer to the following W3C specification for more information. https://www.w3.org/TR/webauthn-3/#enumdef-attestationconveyancepreference
WebAuthn authentication attachment value.
- Since :
- 7.0
- Remarks:
- Refer to the following W3C specification for more information. https://www.w3.org/TR/webauthn-3/#enumdef-authenticatorattachment
WebAuthn authenticator transports.
- Since :
- 7.0
- Remarks:
- Refer to the following W3C specification for more information. https://www.w3.org/TR/webauthn-3/#enum-transport
- Multiple transport values can be combined using bit-wise operation.
WebAuthn COSE (CBOR Object Signing and Encryption) algorithms.
- Since :
- 7.0
- Remarks:
- Refer to the following W3C specification for more information. https://www.w3.org/TR/webauthn-3/#sctn-alg-identifier
- Enumerator:
WebAuthn hash algorithms. Currently one hash algorithm is used, namely "SHA-256".
- Since :
- 7.0
- Remarks:
- Refer to the following W3C specification for more information. https://www.w3.org/TR/webauthn-3/#collectedclientdata-hash-of-the-serialized-client-data
WebAuthn public key credential hint value.
- Since :
- 7.0
- Remarks:
- Refer to the following W3C specification for more information. https://www.w3.org/TR/webauthn-3/#enumdef-publickeycredentialhints
WebAuthn credential type. Currently one credential type is defined, namely "public-key".
- Since :
- 7.0
- Remarks:
- Refer to the following W3C specification for more information. https://www.w3.org/TR/webauthn-3/#enumdef-publickeycredentialtype
WebAuthn resident key requirement value.
- Since :
- 7.0
- Remarks:
- Refer to the following W3C specification for more information. https://www.w3.org/TR/webauthn-3/#enum-residentKeyRequirement
WebAuthn user verification requirement value.
- Since :
- 7.0
- Remarks:
- Refer to the following W3C specification for more information. https://www.w3.org/TR/webauthn-3/#enumdef-userverificationrequirement
enum wauthn_error_e |
WebAuthn Errors.
- Since :
- 7.0
- Enumerator:
Function Documentation
int wauthn_cancel | ( | void | ) |
Stops operation of the previous wauthn_make_credential() or wauthn_get_assertion() call.
- Since :
- 7.0
- Remarks:
- This function is related with following feature:
- http://tizen.org/feature/security.webauthn
- http://tizen.org/feature/security.webauthn
- Returns:
0
on success,
- Return values:
-
WAUTHN_ERROR_NONE Successful WAUTHN_ERROR_NOT_SUPPORTED The required feature is not supported WAUTHN_ERROR_NOT_ALLOWED Not allowed in the current context
int wauthn_get_assertion | ( | const wauthn_client_data_s * | client_data, |
const wauthn_pubkey_cred_request_options_s * | options, | ||
wauthn_ga_callbacks_s * | callbacks | ||
) |
Gets assertion from authenticator.
- Since :
- 7.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/bluetooth
http://tizen.org/privilege/internet
- Remarks:
- This function is related with following features:
- http://tizen.org/feature/security.webauthn
- http://tizen.org/feature/network.bluetooth.le
- and at least one of the below features:
- http://tizen.org/feature/network.wifi
- http://tizen.org/feature/network.ethernet
- http://tizen.org/feature/network.telephony
- http://tizen.org/feature/network.wifi
- http://tizen.org/feature/security.webauthn
- Refer to the following W3C specification for more information. https://www.w3.org/TR/webauthn-3/#sctn-getAssertion
- Parameters:
-
[in] client_data UTF-8 encoded JSON serialization of the client data [in] options This argument is a wauthn_pubkey_cred_request_options_s object specifying the desired attributes of the public key credential to discover [in] callbacks The callback functions to be invoked
- Returns:
0
on success,
- Return values:
-
WAUTHN_ERROR_NONE Successful WAUTHN_ERROR_NOT_SUPPORTED The required feature is not supported WAUTHN_ERROR_PERMISSION_DENIED Required privilege is missing WAUTHN_ERROR_INVALID_PARAMETER Input parameter is invalid WAUTHN_ERROR_NOT_ALLOWED Not allowed in the current context including busy state WAUTHN_ERROR_CANCELED Cancelled by cancel request WAUTHN_ERROR_CONNECTION_REFUSED Authenticator is permanently uncontactable. Forget link info
- Precondition:
- API version must be set with wauthn_set_api_version() and required authenticator type must be supported (can be checked with wauthn_supported_authenticators()).
int wauthn_make_credential | ( | const wauthn_client_data_s * | client_data, |
const wauthn_pubkey_cred_creation_options_s * | options, | ||
wauthn_mc_callbacks_s * | callbacks | ||
) |
Makes a new web authentication credential and store it to authenticator.
- Since :
- 7.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/bluetooth
http://tizen.org/privilege/internet
- Remarks:
- This function is related with following features:
- http://tizen.org/feature/security.webauthn
- http://tizen.org/feature/network.bluetooth.le
- and at least one of the below features:
- http://tizen.org/feature/network.wifi
- http://tizen.org/feature/network.ethernet
- http://tizen.org/feature/network.telephony
- http://tizen.org/feature/network.wifi
- http://tizen.org/feature/security.webauthn
- Refer to the following W3C specification for more information. https://www.w3.org/TR/webauthn-3/#sctn-createCredential
- Parameters:
-
[in] client_data UTF-8 encoded JSON serialization of the client data. [in] options This argument is a wauthn_pubkey_cred_creation_options_s object specifying the desired attributes of the to-be-created public key credential [in] callbacks The callback functions to be invoked
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WAUTHN_ERROR_NONE Successful WAUTHN_ERROR_NOT_SUPPORTED The required feature is not supported WAUTHN_ERROR_PERMISSION_DENIED Required privilege is missing WAUTHN_ERROR_INVALID_PARAMETER Input parameter is invalid WAUTHN_ERROR_NOT_ALLOWED Not allowed in the current context including busy state WAUTHN_ERROR_INVALID_STATE Get in an invalid state WAUTHN_ERROR_CANCELED Cancelled by cancel request WAUTHN_ERROR_CONNECTION_REFUSED Authenticator is permanently uncontactable. Forget link info
- Precondition:
- API version must be set with wauthn_set_api_version() and required authenticator type must be supported (can be checked with wauthn_supported_authenticators()).
int wauthn_set_api_version | ( | int | api_version_number | ) |
Sets API version that the caller uses.
- Since :
- 7.0
- Remarks:
- This function is related with following feature:
- http://tizen.org/feature/security.webauthn
- http://tizen.org/feature/security.webauthn
- This function must be called before other functions are called.
- Parameters:
-
[in] api_version_number API version number to set. Use WAUTHN_API_VERSION_NUMBER as an input.
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WAUTHN_ERROR_NONE Successful WAUTHN_ERROR_NOT_SUPPORTED The specified API version or required feature is not supported
int wauthn_supported_authenticators | ( | unsigned int * | supported | ) |
Gets information on authenticator types that the client platform supports.
- Since :
- 7.0
- Remarks:
- This function is related with following feature:
- http://tizen.org/feature/security.webauthn
- http://tizen.org/feature/security.webauthn
- This version of API only support hybrid roaming authenticator. So the bit for WAUTHN_TRANSPORT_HYBRID is set 1 and bits for other authenticators set 0. Each authenticators can be checked using bitwise operation.
- Parameters:
-
[out] supported The pointer to an unsigned int for return supported authenticators
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WAUTHN_ERROR_NONE Successful WAUTHN_ERROR_NOT_SUPPORTED The required feature is not supported WAUTHN_ERROR_INVALID_PARAMETER The supported is NULL
unsigned int supported = 0; auto ret = wauthn_supported_authenticators(&supported); if (ret != WAUTHN_ERROR_NONE) return ret; if (supported & WAUTHN_TRANSPORT_HYBRID) { // hybrid transport is supported } else { // hybrid transport is not supported }
- See also:
- wauthn_authenticator_transport_e