[WebAuthn] Enhance code documentation
authorFilip Skrzeczkowski <f.skrzeczkow@samsung.com>
Tue, 5 Nov 2024 14:17:50 +0000 (15:17 +0100)
committerterry2000s <ds73.lee@samsung.com>
Thu, 7 Nov 2024 23:53:25 +0000 (08:53 +0900)
17 files changed:
src/Tizen.Security.WebAuthn/Tizen.Security.WebAuthn/AuthenticationExtension.cs
src/Tizen.Security.WebAuthn/Tizen.Security.WebAuthn/AuthenticationSelectionCriteria.cs
src/Tizen.Security.WebAuthn/Tizen.Security.WebAuthn/Authenticator.cs
src/Tizen.Security.WebAuthn/Tizen.Security.WebAuthn/AuthenticatorAssertionResponse.cs
src/Tizen.Security.WebAuthn/Tizen.Security.WebAuthn/AuthenticatorAttestationResponse.cs
src/Tizen.Security.WebAuthn/Tizen.Security.WebAuthn/ClientData.cs
src/Tizen.Security.WebAuthn/Tizen.Security.WebAuthn/GetAssertionCallbacks.cs
src/Tizen.Security.WebAuthn/Tizen.Security.WebAuthn/HybridLinkedData.cs
src/Tizen.Security.WebAuthn/Tizen.Security.WebAuthn/MakeCredentialCallbacks.cs
src/Tizen.Security.WebAuthn/Tizen.Security.WebAuthn/PubkeyCredAssertion.cs
src/Tizen.Security.WebAuthn/Tizen.Security.WebAuthn/PubkeyCredAttestation.cs
src/Tizen.Security.WebAuthn/Tizen.Security.WebAuthn/PubkeyCredCreationOptions.cs
src/Tizen.Security.WebAuthn/Tizen.Security.WebAuthn/PubkeyCredDescriptor.cs
src/Tizen.Security.WebAuthn/Tizen.Security.WebAuthn/PubkeyCredParam.cs
src/Tizen.Security.WebAuthn/Tizen.Security.WebAuthn/PubkeyCredRequestOptions.cs
src/Tizen.Security.WebAuthn/Tizen.Security.WebAuthn/RelyingPartyEntity.cs
src/Tizen.Security.WebAuthn/Tizen.Security.WebAuthn/UserEntity.cs

index 630461152dba5e32a4ba496df0e2f44c77b8154b..ef243ecc412357e34de0ba69d550096faef13680 100644 (file)
@@ -15,7 +15,6 @@
  */
 
 using static Interop;
-using static Tizen.Security.WebAuthn.ErrorFactory;
 
 namespace Tizen.Security.WebAuthn
 {
@@ -47,12 +46,20 @@ namespace Tizen.Security.WebAuthn
         }
 
         /// <summary>
-        /// Extension identifier.
+        /// Gets the extension identifier.
         /// </summary>
+        /// <value>
+        /// The binary data of the extension indentifier.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public byte[] ExtensionId { get; init; }
         /// <summary>
-        /// Extension value.
+        /// Gets the extension value.
         /// </summary>
+        /// <value>
+        /// The binary data of the extension value.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public byte[] ExtensionValue { get; init; }
     }
 }
index 1f4714caa567cbaaebc54cd7ff768b8f54e658ef..ee8923c28276008f4bcc00562a4793d29e5243d2 100644 (file)
@@ -43,20 +43,36 @@ namespace Tizen.Security.WebAuthn
         }
 
         /// <summary>
-        /// Authenticator attachment modality.
+        /// Gets the authenticator attachment modality.
         /// </summary>
+        /// <value>
+        /// The attachment modality - the usage of platform or roaming authenticators.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public AuthenticatorAttachment Attachment { get; init; }
         /// <summary>
-        /// The extent to which the Relying Party desires to create a client-side discoverable credential.
+        /// Gets the Relying Party's requirement regarding client-side discoverable credentials.
         /// </summary>
+        /// <value>
+        /// The extent to which the Relying Party desires to create a client-side discoverable credential.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public ResidentKeyRequirement ResidentKey { get; init; }
         /// <summary>
-        /// Whether residentKey is required.
+        /// Gets a value indicating whether a ResidentKey is required.
         /// </summary>
+        /// <value>
+        /// A boolean value indicating whether a ResidentKey is required.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public bool RequireResidentKey { get; init; }
         /// <summary>
-        /// The Relying Party's requirements regarding user verification.
+        /// Gets the user verification requirements.
         /// </summary>
+        /// <value>
+        /// The Relying Party's requirements regarding user verification.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public UserVerificationRequirement UserVerification { get; init; }
     }
 }
index 803c3915604fd31686b929fee39c577214298c7a..dd69fa61cb37468889dd9418ee8e80f53483a68c 100644 (file)
@@ -41,7 +41,7 @@ namespace Tizen.Security.WebAuthn
         /// <since_tizen> 12 </since_tizen>
         /// <feature>http://tizen.org/feature/security.webauthn</feature>
         /// <returns>An enum with the collection of all supported authenticator types.</returns>
-        /// <exception cref="NotSupportedException">The required feature is not supported.</exception>
+        /// <exception cref="NotSupportedException">Thrown when the required feature is not supported.</exception>
         public static AuthenticatorTransport SupportedAuthenticators()
         {
             int ret = Libwebauthn.SupportedAuthenticators(out uint supported);
@@ -72,11 +72,11 @@ namespace Tizen.Security.WebAuthn
         /// <param name="clientData">UTF-8 encoded JSON serialization of the client data.</param>
         /// <param name="options">Specifies the desired attributes of the to-be-created public key credential.</param>
         /// <param name="callbacks">The callback functions to be invoked.</param>
-        /// <exception cref="NotSupportedException">The required feature is not supported.</exception>
-        /// <exception cref="UnauthorizedAccessException">Required privilege is missing.</exception>
-        /// <exception cref="ArgumentException">Input parameter is invalid.</exception>
-        /// <exception cref="InvalidOperationException">Operation invalid in current state.</exception>
-        /// <exception cref="OperationCanceledException">Canceled by a cancel request.</exception>
+        /// <exception cref="NotSupportedException">Thrown when the required feature is not supported.</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when a required privilege is missing.</exception>
+        /// <exception cref="ArgumentException">Thrown when an input parameter is invalid.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the operation is invalid in current state.</exception>
+        /// <exception cref="OperationCanceledException">Thrown when the call is canceled by a cancel request.</exception>
         public static void MakeCredential(ClientData clientData, PubkeyCredCreationOptions options, MakeCredentialCallbacks callbacks)
         {
             CheckPreconditions();
@@ -136,11 +136,11 @@ namespace Tizen.Security.WebAuthn
         /// <param name="clientData">UTF-8 encoded JSON serialization of the client data.</param>
         /// <param name="options">Specifies the desired attributes of the public key credential to discover.</param>
         /// <param name="callbacks">The callback functions to be invoked.</param>
-        /// <exception cref="NotSupportedException">The required feature is not supported.</exception>
-        /// <exception cref="UnauthorizedAccessException">Required privilege is missing.</exception>
-        /// <exception cref="ArgumentException">Input parameter is invalid.</exception>
-        /// <exception cref="InvalidOperationException">Operation invalid in current state.</exception>
-        /// <exception cref="OperationCanceledException">Canceled by a cancel request.</exception>
+        /// <exception cref="NotSupportedException">Thrown when the required feature is not supported.</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when a required privilege is missing.</exception>
+        /// <exception cref="ArgumentException">Thrown when an input parameter is invalid.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the operation is invalid in current state.</exception>
+        /// <exception cref="OperationCanceledException">Thrown when the call is canceled by a cancel request.</exception>
         public static void GetAssertion(ClientData clientData, PubkeyCredRequestOptions options, GetAssertionCallbacks callbacks)
         {
             CheckPreconditions();
@@ -180,8 +180,8 @@ namespace Tizen.Security.WebAuthn
         /// </summary>
         /// <since_tizen> 12 </since_tizen>
         /// <feature>http://tizen.org/feature/security.webauthn</feature>
-        /// <exception cref="NotSupportedException">The required feature is not supported.</exception>
-        /// <exception cref="InvalidOperationException">Not allowed in the current context.</exception>
+        /// <exception cref="NotSupportedException">Thrown when the required feature is not supported.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the operation is invalid in current state.</exception>
         public static void Cancel()
         {
             int ret = Libwebauthn.Cancel();
index b17fa49726c4cff289876d253124d31e145049c5..f52006b1684f888ce6f2203bdbb086aadc447de5 100644 (file)
@@ -19,7 +19,7 @@ using static Interop;
 namespace Tizen.Security.WebAuthn
 {
     /// <summary>
-    /// The response of GetAssertion().
+    /// The authenticator's response of <see cref="Authenticator.GetAssertion"/>.
     /// </summary>
     /// <remarks>
     /// Refer to the following W3C specification for more information.
@@ -38,28 +38,48 @@ namespace Tizen.Security.WebAuthn
         }
 
         /// <summary>
-        /// JSON-compatible serialization of client data.
+        /// Gets the serialized client data json.
         /// </summary>
+        /// <value>
+        /// A JSON-compatible serialization of client data.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public byte[] ClientDataJson { get; init; }
         /// <summary>
-        /// The authenticator data contained within attestation_object.
-        /// For more information, refer to https://www.w3.org/TR/webauthn-3/#sctn-authenticator-data
+        /// Gets the authenticator data contained within the Attestation Object.
         /// </summary>
+        /// <value>
+        /// Authenticator data contained within the Attestation Object.
+        /// For more information, refer to https://www.w3.org/TR/webauthn-3/#sctn-authenticator-data
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public byte[] AuthenticatorData { get; init; }
         /// <summary>
-        /// The raw signature returned from the authenticator.
-        /// For more information, refer to https://www.w3.org/TR/webauthn-3/#sctn-op-get-assertion
+        /// Gets the signature returned from the authenticator.
         /// </summary>
+        /// <value>
+        /// The signature returned from the authenticator.
+        /// For more information, refer to https://www.w3.org/TR/webauthn-3/#sctn-op-get-assertion
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public byte[] Signature { get; init; }
         /// <summary>
+        /// Gets the user handle returned from the authenticator.
+        /// </summary>
+        /// <value>
         /// The user handle returned from the authenticator,
         /// or null if the authenticator did not return a user handle.
-        /// </summary>
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public byte[] UserHandle { get; init; }
         /// <summary>
-        /// This OPTIONAL attribute contains an attestation object,
-        /// if the authenticator supports attestation in assertions.
+        /// Gets the attestation object.
         /// </summary>
+        /// <value>
+        /// An OPTIONAL property that contains an attestation object,
+        /// if the authenticator supports attestation in assertions.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public byte[] AttestationObject { get; init; }
     }
 }
\ No newline at end of file
index e4209c00f527a5236b078cbf600a65390d9ed3ca..b25c822e8e3eb371b129ef5e325e280427afd94f 100644 (file)
@@ -19,7 +19,7 @@ using static Interop;
 namespace Tizen.Security.WebAuthn
 {
     /// <summary>
-    /// The response of MakeCredential().
+    /// The response of <see cref="Authenticator.MakeCredential"/>.
     /// </summary>
     /// <remarks>
     /// Refer to the following W3C specification for more information.
@@ -39,30 +39,55 @@ namespace Tizen.Security.WebAuthn
         }
 
         /// <summary>
-        /// JSON-compatible serialization of client data.
+        /// Gets the serialized client data json.
         /// </summary>
+        /// <value>
+        /// A JSON-compatible serialization of client data.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public byte[] ClientDataJson { get; init; }
         /// <summary>
-        /// The CBOR encoded Attestation Object to be returned to the RP.
+        /// Gets the Attestation Object to be returned to the Relying Party.
         /// </summary>
+        /// <value>
+        /// A CBOR-encoded Attestation Object.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public byte[] AttestationObject { get; init; }
         /// <summary>
-        /// To represent multiple transports, <see cref="AuthenticatorTransport"/> can be ORed multiple times.
+        /// Gets an enum containing a list of transports.
         /// </summary>
+        /// <value>
+        /// A list of transports. To represent multiple transports,
+        /// <see cref="AuthenticatorTransport"/> can be ORed multiple times.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public AuthenticatorTransport Transports { get; init; }
         /// <summary>
-        /// The authenticator data contained within attestation_object.
-        /// For more information, refer to https://www.w3.org/TR/webauthn-3/#sctn-authenticator-data
+        /// Gets the authenticator data contained within the Attestation Object.
         /// </summary>
+        /// <value>
+        /// Authenticator data contained within the Attestation Object.
+        /// For more information, refer to https://www.w3.org/TR/webauthn-3/#sctn-authenticator-data
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public byte[] AuthenticatorData { get; init; }
         /// <summary>
+        /// Gets the DER SubjectPublicKeyInfo of the new credential.
+        /// </summary>
+        /// <value>
         /// DER SubjectPublicKeyInfo of the new credential, or null if this is not available.
         /// For more information, refer to https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.7
-        /// </summary>
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public byte[] SubjectPubkeyInfo { get; init; }
         /// <summary>
-        /// The COSEAlgorithmIdentifier of the new credential.
+        /// Gets the COSE algorithm identifier of the new credential.
         /// </summary>
+        /// <value>
+        /// The COSE algorithm identifier of the new credential.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public CoseAlgorithm PubkeyAlg { get; init; }
 
     }
index 609cfb4e749ae87768fba3f80a06c2e7ff01d8ac..f0f1b8ea5d72b93c9d442ee1d9cbb587e23f828c 100644 (file)
@@ -14,8 +14,6 @@
  *  limitations under the License
  */
 
-using static Tizen.Security.WebAuthn.ErrorFactory;
-
 namespace Tizen.Security.WebAuthn
 {
     /// <summary>
@@ -33,7 +31,7 @@ namespace Tizen.Security.WebAuthn
         /// </summary>
         /// <since_tizen> 12 </since_tizen>
         /// <param name="jsonData">UTF-8 encoded JSON serialization of the client data.</param>
-        /// <param name="hashAlgo">Hash algorithm used to hash the JsonData property.</param>
+        /// <param name="hashAlgo">Hash algorithm used to hash the jsonData parameter.</param>
         public ClientData(byte[] jsonData, HashAlgorithm hashAlgo)
         {
             JsonData = jsonData;
@@ -41,12 +39,20 @@ namespace Tizen.Security.WebAuthn
         }
 
         /// <summary>
-        /// UTF-8 encoded JSON serialization of the client data.
+        /// Gets the serialized client data json.
         /// </summary>
+        /// <value>
+        /// A UTF-8 encoded JSON serialization of the client data.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public byte[] JsonData { get; init; }
         /// <summary>
-        /// Hash algorithm used to hash the JsonData property.
+        /// Gets the hash algorithm.
         /// </summary>
+        /// <value>
+        /// The hash algorithm used to hash the JsonData property.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public HashAlgorithm HashAlgo{ get; init; }
     }
 }
index b3a79daa60baf3f99c49b94d4bd1a2b5f9b8e976..7f6f1dbfcaf3f7057769800b74edfa7a15ea49b9 100644 (file)
@@ -82,20 +82,36 @@ namespace Tizen.Security.WebAuthn
         }
 
         /// <summary>
-        /// Callback function for displaying QR code.
+        /// Gets the callback function for displaying the QR code.
         /// </summary>
+        /// <value>
+        /// The callback function for displaying the QR code.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public Action<string, object> QrcodeCallback { get; init; }
         /// <summary>
-        /// Callback function for getting the final response.
+        /// Gets the callback function for getting the final response.
         /// </summary>
+        /// <value>
+        /// The callback function for getting the final response of the operation from the authenticator.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public Action<PubkeyCredAssertion, WauthnError, object> ResponseCallback { get; init; }
         /// <summary>
-        /// Callback function for getting the updated linked device data.
+        /// Gets the callback function for getting the updated linked device data.
         /// </summary>
+        /// <value>
+        /// The callback function for getting the updated linked device data from the authenticator.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public Action<HybridLinkedData, WauthnError, object> LinkedDataCallback { get; init; }
         /// <summary>
-        /// User data to be passed to <see cref="QrcodeCallback"/>, <see cref="ResponseCallback"/> and <see cref="LinkedDataCallback"/>.
+        /// Gets the user data to be passed to callbacks.
         /// </summary>
+        /// <value>
+        /// The user data to be passed to <see cref="QrcodeCallback"/>, <see cref="ResponseCallback"/> and <see cref="LinkedDataCallback"/>.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public object UserData { get; init; }
     }
 }
index f12d8852cc0a28a5c899e80c3368a0316798f195..4ee638b6550e69cbb4b3fcc179ece9bbd7373143 100644 (file)
@@ -89,35 +89,35 @@ namespace Tizen.Security.WebAuthn
         }
 
         /// <summary>
-        /// CBOR:"1".
+        /// Gets the contact id (CBOR:"1").
         /// </summary>
         public byte[] ContactId { get; init; }
         /// <summary>
-        /// CBOR:"3".
+        /// Gets the link id (CBOR:"3").
         /// </summary>
         public byte[] LinkId { get; init; }
         /// <summary>
-        /// CBOR:"3".
+        /// Gets the link secret (CBOR:"3").
         /// </summary>
         public byte[] LinkSecret { get; init; }
         /// <summary>
-        /// CBOR:"4".
+        /// Gets the authenticator public key (CBOR:"4").
         /// </summary>
         public byte[] AuthenticatorPubkey { get; init; }
         /// <summary>
-        /// CBOR:"5".
+        /// Gets the authenticator name (CBOR:"5").
         /// </summary>
         public byte[] AuthenticatorName { get; init; }
         /// <summary>
-        /// CBOR:"6".
+        /// Gets the signature (CBOR:"6").
         /// </summary>
         public byte[] Signature { get; init; }
         /// <summary>
-        /// Domain String of tunnel server.
+        /// Gets the Domain String of tunnel server.
         /// </summary>
         public byte[] TunnelServerDomain { get; init; }
         /// <summary>
-        /// Identity Key created during QR initiated transaction.
+        /// Gets the identity Key created during QR initiated transaction.
         /// </summary>
         public byte[] IdentityKey { get; init; }
     }
index 9d3ecf1948573aee89cb63c992db7b50047892ee..fd932bcf75fdca9845a56cacdde02e6cd637ffdc 100644 (file)
@@ -82,20 +82,36 @@ namespace Tizen.Security.WebAuthn
         }
 
         /// <summary>
-        /// Callback function for displaying QR code.
+        /// Gets the callback function for displaying the QR code.
         /// </summary>
+        /// <value>
+        /// The callback function for displaying the QR code.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public Action<string, object> QrcodeCallback { get; init; }
         /// <summary>
-        /// Callback function for getting the final response.
+        /// Gets the callback function for getting the final response.
         /// </summary>
+        /// <value>
+        /// The callback function for getting the final response of the operation from the authenticator.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public Action<PubkeyCredAttestation, WauthnError, object> ResponseCallback { get; init; }
         /// <summary>
-        /// Callback function for getting the updated linked device data.
+        /// Gets the callback function for getting the updated linked device data.
         /// </summary>
+        /// <value>
+        /// The callback function for getting the updated linked device data from the authenticator.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public Action<HybridLinkedData, WauthnError, object> LinkedDataCallback { get; init; }
         /// <summary>
-        /// User data to be passed to <see cref="QrcodeCallback"/>, <see cref="ResponseCallback"/> and <see cref="LinkedDataCallback"/>.
+        /// Gets the user data to be passed to callbacks.
         /// </summary>
+        /// <value>
+        /// The user data to be passed to <see cref="QrcodeCallback"/>, <see cref="ResponseCallback"/> and <see cref="LinkedDataCallback"/>.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public object UserData { get; init; }
     }
 }
index 292a30e66a0012e105a16be64bc8a46a6e56187f..08def88db579326076819549ce284a9ea847bee1 100644 (file)
@@ -49,9 +49,9 @@ namespace Tizen.Security.WebAuthn
                 unsafe
                 {
                     var extPtr = (WauthnAuthenticationExt*)wauthnExts.descriptors;
-                    for (int i = 0; i < (int)wauthnExts.size; i++)
+                    for (ulong i = 0; i < wauthnExts.size; i++)
                     {
-                        var wauthnExt = Marshal.PtrToStructure<WauthnAuthenticationExt>(new IntPtr(extPtr + i * sizeof(WauthnAuthenticationExt)));
+                        var wauthnExt = Marshal.PtrToStructure<WauthnAuthenticationExt>(new IntPtr(extPtr + i * (ulong)sizeof(WauthnAuthenticationExt)));
                         extensionsArray[i] = new AuthenticationExtension(wauthnExt);
                     }
                 }
@@ -68,35 +68,63 @@ namespace Tizen.Security.WebAuthn
         }
 
         /// <summary>
-        /// The base64url encoding of credential’s identifier.
+        /// Gets the credential’s identifier.
         /// </summary>
+        /// <value>
+        /// The base64url encoding of credential’s identifier.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public byte[] Id { get; init; }
         /// <summary>
-        /// The credential’s type.
+        /// Gets the credential’s type.
         /// </summary>
+        /// <value>
+        /// The credential’s type.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public PubkeyCredType Type { get; init; }
         /// <summary>
-        /// The raw value of credential’s identifier.
+        /// Gets the credential’s raw identifier.
         /// </summary>
+        /// <value>
+        /// The raw value of the credential’s identifier.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public byte[] RawId { get; init; }
         /// <summary>
-        /// Authenticator's response.
+        /// Gets the authenticator's response.
         /// </summary>
+        /// <value>
+        /// The authenticator's response data.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public AuthenticatorAssertionResponse Response { get; init; }
         /// <summary>
-        /// Authenticator attachment modality.
+        /// Gets the authenticator attachment modality.
         /// </summary>
+        /// <value>
+        /// The attachment modality - the usage of platform or roaming authenticators.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public AuthenticatorAttachment AuthenticatorAttachment { get; init; }
         /// <summary>
-        /// The results of processing client extensions requested by the Relying Party
-        /// upon the Relying Party's invocation of GetAssertion(). (optional)
+        /// Gets the results of processing client extensions.
         /// </summary>
+        /// <value>
+        /// The results of processing client extensions requested by the Relying Party
+        /// upon the Relying Party's invocation of <see cref="Authenticator.GetAssertion"/>. (optional)
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public IEnumerable<AuthenticationExtension> Extensions { get; init; }
         /// <summary>
-        /// Linked Device Connection Info (optional).
+        /// Gets the linked Device Connection Info.
+        /// </summary>
+        /// <value>
+        /// The linked Device Connection Info (optional).
         /// If not null, the caller has to store this value and use this
         /// in the next transaction to invoke state assisted transaction.
-        /// </summary>
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public HybridLinkedData LinkedDevice { get; init; }
     }
 }
\ No newline at end of file
index 12368be29f28dbf910aa218284a1760c20bde44c..1a4e28d3db85f3d2b81772bc528584b24a07570b 100644 (file)
@@ -49,9 +49,9 @@ namespace Tizen.Security.WebAuthn
                 unsafe
                 {
                     var extPtr = (WauthnAuthenticationExt*)wauthnExts.descriptors;
-                    for (int i = 0; i < (int)wauthnExts.size; i++)
+                    for (ulong i = 0; i < wauthnExts.size; i++)
                     {
-                        var wauthnExt = Marshal.PtrToStructure<WauthnAuthenticationExt>(new IntPtr(extPtr + i * sizeof(WauthnAuthenticationExt)));
+                        var wauthnExt = Marshal.PtrToStructure<WauthnAuthenticationExt>(new IntPtr(extPtr + i * (ulong)sizeof(WauthnAuthenticationExt)));
                         extensionsArray[i] = new AuthenticationExtension(wauthnExt);
                     }
                 }
@@ -68,35 +68,63 @@ namespace Tizen.Security.WebAuthn
         }
 
         /// <summary>
-        /// The base64url encoding of credential’s identifier.
+        /// Gets the credential’s identifier.
         /// </summary>
+        /// <value>
+        /// The base64url encoding of credential’s identifier.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public byte[] Id { get; init; }
         /// <summary>
-        /// The credential’s type.
+        /// Gets the credential’s type.
         /// </summary>
+        /// <value>
+        /// The credential’s type.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public PubkeyCredType Type { get; init; }
         /// <summary>
-        /// The raw value of credential’s identifier.
+        /// Gets the credential’s raw identifier.
         /// </summary>
+        /// <value>
+        /// The raw value of the credential’s identifier.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public byte[] RawId { get; init; }
         /// <summary>
-        /// Authenticator's response.
+        /// Gets the authenticator's response.
         /// </summary>
+        /// <value>
+        /// The authenticator's response data.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public AuthenticatorAttestationResponse Response { get; init; }
         /// <summary>
-        /// Authenticator attachment modality.
+        /// Gets the authenticator attachment modality.
         /// </summary>
+        /// <value>
+        /// The attachment modality - the usage of platform or roaming authenticators.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public AuthenticatorAttachment AuthenticatorAttachment { get; init; }
         /// <summary>
-        /// The results of processing client extensions requested by the Relying Party
-        /// upon the Relying Party's invocation of MakeCredential(). (optional)
+        /// Gets the results of processing client extensions.
         /// </summary>
+        /// <value>
+        /// The results of processing client extensions requested by the Relying Party
+        /// upon the Relying Party's invocation of <see cref="Authenticator.MakeCredential"/>. (optional)
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public IEnumerable<AuthenticationExtension> Extensions { get; init; }
         /// <summary>
-        /// Linked Device Connection Info (optional).
-        /// If not null, the caller has to store this value and use thi
-        /// in the next transaction to invoke state assisted transaction.
+        /// Gets the linked Device Connection Info.
         /// </summary>
+        /// <value>
+        /// The linked Device Connection Info (optional).
+        /// If not null, the caller has to store this value and use this
+        /// in the next transaction to invoke state assisted transaction.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public HybridLinkedData LinkedDevice { get; init; }
     }
 }
index 9f812041609857edd2726795b3f955cd02db310f..147868a80b398ba62cc4ed97cdcede933f911dd3 100644 (file)
@@ -15,7 +15,6 @@
  */
 
 using System.Collections.Generic;
-using static Tizen.Security.WebAuthn.ErrorFactory;
 
 namespace Tizen.Security.WebAuthn
 {
@@ -101,53 +100,97 @@ namespace Tizen.Security.WebAuthn
         }
 
         /// <summary>
-        /// Contains a name and an identifier for the Relying Party responsible for the request.
+        /// Gets the Relying Party data.
         /// </summary>
+        /// <value>
+        /// The name and identifier for the Relying Party responsible for the request.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public RelyingPartyEntity Rp { get; init; }
         /// <summary>
-        /// Contains names and an identifier for the user account performing the registration.
+        /// Gets user account data.
         /// </summary>
+        /// <value>
+        /// The names and identifier for the user account performing the registration.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public UserEntity User { get; init; }
         /// <summary>
-        /// Lists the key types and signature algorithms the Relying Party supports,
-        /// ordered from most preferred to least preferred.
+        /// Gets the key parameters the Relying Party supports.
         /// </summary>
+        /// <value>
+        /// The key types and signature algorithms the Relying Party supports,
+        /// ordered from most preferred to least preferred.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public IEnumerable<PubkeyCredParam> PubkeyCredParams { get; init; }
         /// <summary>
-        /// Specifies a time, in milliseconds, that the Relying Party is willing to wait for the
+        /// Gets the timeout requested by the Relying Party.
+        /// </summary>
+        /// <value>
+        /// The time, in milliseconds, that the Relying Party is willing to wait for the
         /// call to complete. This is treated as a hint, and MAY be overridden by the client.
         /// The value, '0', means no timeout is set.
-        /// </summary>
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public ulong Timeout { get; init; }
         /// <summary>
-        /// Lists any existing credentials mapped to this user account (as identified by user.id).
+        /// Gets the existing credentials mapped to this user account.
         /// </summary>
+        /// <value>
+        /// Any existing credentials mapped to this user account (as identified by user.id).
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public IEnumerable<PubkeyCredDescriptor> ExcludeCredentials { get; init; }
         /// <summary>
-        /// Specifies capabilities and settings that the authenticator MUST or SHOULD satisfy
-        /// to participate in this operation.
+        /// Gets the criteria for authenticator selection.
         /// </summary>
+        /// <value>
+        /// The capabilities and settings that the authenticator MUST or SHOULD satisfy
+        /// to participate in this operation.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public AuthenticationSelectionCriteria AuthenticatorSelection { get; init; }
         /// <summary>
+        /// Gets hints used to guide the user agent in interacting with the user.
+        /// </summary>
+        /// <value>
         /// Contains zero or more elements from <see cref="PubkeyCredHint"/> to
         /// guide the user agent in interacting with the user.
-        /// </summary>
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public IEnumerable<PubkeyCredHint> Hints { get; init; }
         /// <summary>
-        /// Specifies a preference regarding attestation conveyance.
+        /// Gets the attestation conveyance preference.
         /// </summary>
+        /// <value>
+        /// Specifies a preference regarding attestation conveyance.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public AttestationPref Attestation { get; init; }
         /// <summary>
-        /// Specifies a preference regarding the attestation statement format used by the authenticator.
+        /// Gets the attestation format preference.
         /// </summary>
+        /// <value>
+        /// Specifies a preference regarding the attestation statement format used by the authenticator.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public IEnumerable<byte[]> AttestationFormats { get; init; }
         /// <summary>
-        /// Client extension inputs requesting additional processing by the client and authenticator.
+        /// Gets the client extension inputs.
         /// </summary>
+        /// <value>
+        /// Client extension inputs requesting additional processing by the client and authenticator.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public IEnumerable<AuthenticationExtension> Extensions { get; init; }
         /// <summary>
-        /// Linked Device Connection Info. If not null, the state assisted transaction will start.
+        /// Gets the Linked Device Connection Info.
         /// </summary>
+        /// <value>
+        /// Linked Device Connection Info. If not null, the state assisted transaction will start.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public HybridLinkedData LinkedDevice { get; init; }
     }
 }
index f1a6523318babcd5faed3acca954fbe34309c1b0..fc3aa10920ee3c01edbf6a4ce91b82447329b828 100644 (file)
@@ -14,8 +14,6 @@
  *  limitations under the License
  */
 
-using static Tizen.Security.WebAuthn.ErrorFactory;
-
 namespace Tizen.Security.WebAuthn
 {
     /// <summary>
@@ -33,7 +31,7 @@ namespace Tizen.Security.WebAuthn
         /// </summary>
         /// <param name="type">The type of the public key credential.</param>
         /// <param name="id">The credential ID of the public key credential.</param>
-        /// <param name="transport">To represent multiple transports, this enum can be ORed multiple times.</param>
+        /// <param name="transport">Transport types. To represent multiple transports, this enum can be ORed multiple times.</param>
         public PubkeyCredDescriptor(PubkeyCredType type, byte[] id, AuthenticatorTransport transport)
         {
             Type = type;
@@ -41,16 +39,29 @@ namespace Tizen.Security.WebAuthn
             Transport = transport;
         }
         /// <summary>
-        /// The type of the public key credential.
+        /// Gets the type of the public key credential.
         /// </summary>
+        /// <value>
+        /// The type of the public key credential.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public PubkeyCredType Type { get; init; }
         /// <summary>
-        /// The credential ID of the public key credential.
+        /// Gets the ID of the public key credential.
         /// </summary>
+        /// <value>
+        /// The binary ID of the public key credential.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public byte[] Id { get; init; }
         /// <summary>
-        /// Transport types.
+        /// Gets the transport types.
         /// </summary>
+        /// <value>
+        /// The transport types describing communication between the client and the authenticator.
+        /// To represent multiple transports, this enum can be ORed multiple times.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public AuthenticatorTransport Transport { get; init; }
     }
 }
index 762b1195b55d82e7c9b14a8fc1e90f29bd4a0d85..a0186e5cdb82a0747bbff8754716479566c3f9c1 100644 (file)
@@ -38,12 +38,20 @@ namespace Tizen.Security.WebAuthn
             Alg = alg;
         }
         /// <summary>
-        /// Well-known credential type specifying a credential to create.
+        /// Gets the type of the credential to create.
         /// </summary>
+        /// <value>
+        /// Well-known credential type specifying the credential to create.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public PubkeyCredType Type { get; init; }
         /// <summary>
-        /// Well-known COSE algorithm specifying the algorithm to use for the credential.
+        /// Gets the algotithm used for the credential.
         /// </summary>
+        /// <value>
+        /// Well-known COSE algorithm specifying the algorithm to use for the credential.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public CoseAlgorithm Alg { get; init; }
     }
 }
index 3df50f33ae00855950eb400eaa277aaf81cdb193..45dd06fb74d1c1d0b96207dbfa9e695096305004 100644 (file)
@@ -91,43 +91,81 @@ namespace Tizen.Security.WebAuthn
         }
 
         /// <summary>
-        /// Specifies a time, in milliseconds, that the Relying Party is willing to wait for the
+        /// Gets the timeout requested by the Relying Party.
+        /// </summary>
+        /// <value>
+        /// The time, in milliseconds, that the Relying Party is willing to wait for the
         /// call to complete. This is treated as a hint, and MAY be overridden by the client.
         /// The value, '0', means no timeout is set.
-        /// </summary>
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public ulong Timeout { get; init; }
         /// <summary>
-        /// Specifies the RP ID claimed by the Relying Party.
+        /// Gets the Relying Party ID.
         /// </summary>
+        /// <value>
+        /// Specifies the RP ID claimed by the Relying Party.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public string RpId { get; init; }
         /// <summary>
-        /// Used by the client to find authenticators eligible for this authentication ceremony.
+        /// Gets the list of allowed credentials.
         /// </summary>
+        /// <value>
+        /// Used by the client to find authenticators eligible for this authentication ceremony.
+        /// The list is ordered in descending order of preference.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public IEnumerable<PubkeyCredDescriptor> AllowCredentials { get; init; }
         /// <summary>
-        /// Specifies the Relying Party's requirements regarding user verification for the GetAssertion() operation.
+        /// Gets the user verification requirements.
         /// </summary>
+        /// <value>
+        /// The Relying Party's requirements regarding user verification for the
+        /// <see cref="Authenticator.GetAssertion"/> operation.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public UserVerificationRequirement UserVerification { get; init; }
         /// <summary>
+        /// Gets hints used to guide the user agent in interacting with the user.
+        /// </summary>
+        /// <value>
         /// Contains zero or more elements from <see cref="PubkeyCredHint"/> to
         /// guide the user agent in interacting with the user.
-        /// </summary>
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public IEnumerable<PubkeyCredHint> Hints { get; init; }
         /// <summary>
-        /// Specifies a preference regarding attestation conveyance.
+        /// Gets the attestation conveyance preference.
         /// </summary>
+        /// <value>
+        /// Specifies a preference regarding attestation conveyance.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public AttestationPref Attestation { get; init; }
         /// <summary>
-        /// Specifies a preference regarding the attestation statement format used by the authenticator.
+        /// Gets the attestation format preference.
         /// </summary>
+        /// <value>
+        /// Specifies a preference regarding the attestation statement format used by the authenticator.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public IEnumerable<byte[]> AttestationFormats { get; init; }
         /// <summary>
-        /// Client extension inputs requesting additional processing by the client and authenticator.
+        /// Gets the client extension inputs.
         /// </summary>
+        /// <value>
+        /// Client extension inputs requesting additional processing by the client and authenticator.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public IEnumerable<AuthenticationExtension> Extensions { get; init; }
         /// <summary>
-        /// Linked Device Connection Info. If not null, the state assisted transaction will start.
+        /// Gets the Linked Device Connection Info.
         /// </summary>
+        /// <value>
+        /// Linked Device Connection Info. If not null, the state assisted transaction will start.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public HybridLinkedData LinkedDevice { get; init; }
     }
 }
\ No newline at end of file
index f00fdec4fc6c8868436025802af099b1019d3f06..a483ee8637f6112530f5d0fe68a7f304024ae0f6 100644 (file)
@@ -30,8 +30,8 @@ namespace Tizen.Security.WebAuthn
         /// Initializes a new instance of the <see cref="RelyingPartyEntity"/> class.
         /// </summary>
         /// <since_tizen> 12 </since_tizen>
-        /// <param name="name">The name of RP.</param>
-        /// <param name="id">The RPID.</param>
+        /// <param name="name">The name of the Relying Party.</param>
+        /// <param name="id">The ID of the Relying Party.</param>
         public RelyingPartyEntity(string name, string id)
         {
             Name = name;
@@ -39,12 +39,20 @@ namespace Tizen.Security.WebAuthn
         }
 
         /// <summary>
-        /// The name of RP.
+        /// Gets the name of the Relying Party.
         /// </summary>
+        /// <value>
+        /// The name of the Relying Party.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public string Name { get; init; }
         /// <summary>
-        /// The RPID.
+        /// Gets the ID of the Relying Party.
         /// </summary>
+        /// <value>
+        /// The ID of the Relying Party.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public string Id { get; init; }
     }
 }
index 6eb65e12145282bb949c78266d65d49fc8213fd2..b7d26416127233c42307103b5f89f812bf6fde5c 100644 (file)
@@ -14,8 +14,6 @@
  *  limitations under the License
  */
 
-using static Tizen.Security.WebAuthn.ErrorFactory;
-
 namespace Tizen.Security.WebAuthn
 {
     /// <summary>
@@ -46,16 +44,28 @@ namespace Tizen.Security.WebAuthn
         }
 
         /// <summary>
-        /// A human-palatable name for the entity.
+        /// Gets the name of the user entity.
         /// </summary>
+        /// <value>
+        /// A human-palatable name for the entity.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public string Name { get; init; }
         /// <summary>
-        /// The ID of the user account.
+        /// Gets the user ID.
         /// </summary>
+        /// <value>
+        /// The ID of the user account.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public byte[] Id { get; init; }
         /// <summary>
-        /// A human-palatable name for the user account, intended only for display.
+        /// Gets the dispay name of the user entity.
         /// </summary>
+        /// <value>
+        /// A human-palatable name for the user account, intended only for display.
+        /// </value>
+        /// <since_tizen> 12 </since_tizen>
         public string DisplayName { get; init; }
     }
 }