[FidoClient] Implementation of FIDO UAF Client C# API
authorJyothi Kumar Sambolu <s.jyothi@samsung.com>
Wed, 8 Feb 2017 09:58:53 +0000 (15:28 +0530)
committerJyothi Kumar Sambolu <s.jyothi@samsung.com>
Thu, 16 Feb 2017 05:00:37 +0000 (10:30 +0530)
Change-Id: I3283b9864283bb13e4361c7a97c2103c2653df49
Signed-off-by: Jyothi Kumar Sambolu <s.jyothi@samsung.com>
21 files changed:
LICENSE [new file with mode: 0755]
packaging/csapi-account-fido-client.manifest [new file with mode: 0755]
packaging/csapi-account-fido-client.spec [new file with mode: 0755]
src/Tizen.Account.FidoClient/Interop/Interop.Libc.cs [new file with mode: 0755]
src/Tizen.Account.FidoClient/Interop/Interop.Libraries.cs [new file with mode: 0755]
src/Tizen.Account.FidoClient/Interop/Interop.Uaf.Authenticator.cs [new file with mode: 0755]
src/Tizen.Account.FidoClient/Interop/Interop.Uaf.Client.cs [new file with mode: 0755]
src/Tizen.Account.FidoClient/Properties/AssemblyInfo.cs [new file with mode: 0755]
src/Tizen.Account.FidoClient/Tizen.Account.FidoClient.Net45.csproj [new file with mode: 0755]
src/Tizen.Account.FidoClient/Tizen.Account.FidoClient.Net45.project.json [new file with mode: 0644]
src/Tizen.Account.FidoClient/Tizen.Account.FidoClient.csproj [new file with mode: 0755]
src/Tizen.Account.FidoClient/Tizen.Account.FidoClient.nuspec [new file with mode: 0755]
src/Tizen.Account.FidoClient/Tizen.Account.FidoClient.project.json [new file with mode: 0755]
src/Tizen.Account.FidoClient/Tizen.Account.FidoClient.snk [new file with mode: 0755]
src/Tizen.Account.FidoClient/Tizen.Account.FidoClient/AuthenticatorInformation.cs [new file with mode: 0755]
src/Tizen.Account.FidoClient/Tizen.Account.FidoClient/ErrorFactory.cs [new file with mode: 0755]
src/Tizen.Account.FidoClient/Tizen.Account.FidoClient/UafAuthenticatorFinder.cs [new file with mode: 0755]
src/Tizen.Account.FidoClient/Tizen.Account.FidoClient/UafClient.cs [new file with mode: 0755]
src/Tizen.Account.FidoClient/Tizen.Account.FidoClient/UafEnumerations.cs [new file with mode: 0755]
src/Tizen.Account.FidoClient/Tizen.Account.FidoClient/UafMessage.cs [new file with mode: 0755]
src/Tizen.Account.FidoClient/Tizen.Account.FidoClient/UafResponse.cs [new file with mode: 0755]

diff --git a/LICENSE b/LICENSE
new file mode 100755 (executable)
index 0000000..d645695
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/packaging/csapi-account-fido-client.manifest b/packaging/csapi-account-fido-client.manifest
new file mode 100755 (executable)
index 0000000..75b0fa5
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+    <request>
+        <domain name="_"/>
+    </request>
+</manifest>
diff --git a/packaging/csapi-account-fido-client.spec b/packaging/csapi-account-fido-client.spec
new file mode 100755 (executable)
index 0000000..645109c
--- /dev/null
@@ -0,0 +1,76 @@
+%{!?dotnet_assembly_path: %define dotnet_assembly_path /opt/usr/share/dotnet.tizen/framework}
+
+%if 0%{?tizen_build_devel_mode}
+%define BUILDCONF Debug
+%else
+%define BUILDCONF Release
+%endif
+
+Name:       csapi-account-fido-client
+Summary:    FIDO UAF C# API for Tizen
+Version:    1.0.0
+Release:    1
+Group:      Development/Libraries
+License:    Apache-2.0
+URL:        https://www.tizen.org
+Source0:    %{name}-%{version}.tar.gz
+Source1:    %{name}.manifest
+
+AutoReqProv: no
+
+BuildRequires: mono-compiler
+BuildRequires: mono-devel
+
+BuildRequires: dotnet-build-tools
+
+# NuGet for Dependencies
+BuildRequires: csapi-tizen-nuget
+
+
+%description
+FIDO UAF C# API for Tizen
+
+%prep
+%setup -q
+cp %{SOURCE1} .
+
+%define Assemblies Tizen.Account.FidoClient
+
+%build
+for ASM in %{Assemblies}; do
+# NuGet Restore
+find $ASM/*.project.json -exec nuget restore {} \;
+# Build
+find $ASM/*.csproj -exec xbuild {} /p:Configuration=%{BUILDCONF} \;
+# NuGet Pack
+nuget pack $ASM/$ASM.nuspec -Version %{version} -Properties Configuration=%{BUILDCONF}
+done
+
+%install
+# Runtime Binary
+mkdir -p %{buildroot}%{dotnet_assembly_path}
+for ASM in %{Assemblies}; do
+%if 0%{?_with_corefx}
+  install -p -m 644 $ASM/bin/%{BUILDCONF}/$ASM.dll %{buildroot}%{dotnet_assembly_path}
+%else
+  install -p -m 644 $ASM/bin/%{BUILDCONF}/Net45/$ASM.dll %{buildroot}%{dotnet_assembly_path}
+%endif
+done
+# NuGet
+mkdir -p %{buildroot}/nuget
+install -p -m 644 *.nupkg %{buildroot}/nuget
+
+%files
+%manifest %{name}.manifest
+%license LICENSE
+%attr(644,root,root) %{dotnet_assembly_path}/*.dll
+
+%package nuget
+Summary:   NuGet package for %{name}
+Group:     Development/Libraries
+
+%description nuget
+NuGet package for %{name}
+
+%files nuget
+/nuget/*.nupkg
diff --git a/src/Tizen.Account.FidoClient/Interop/Interop.Libc.cs b/src/Tizen.Account.FidoClient/Interop/Interop.Libc.cs
new file mode 100755 (executable)
index 0000000..13c7170
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Runtime.InteropServices;
+
+internal static partial class Interop
+{
+    internal static partial class Libc
+    {
+        [DllImport(Libraries.Libc, EntryPoint = "free", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern int Free(IntPtr ptr);
+    }
+}
diff --git a/src/Tizen.Account.FidoClient/Interop/Interop.Libraries.cs b/src/Tizen.Account.FidoClient/Interop/Interop.Libraries.cs
new file mode 100755 (executable)
index 0000000..955fffe
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+internal static partial class Interop
+{
+    /// <summary>
+    /// Wrapper class for maintaining names of dependent native libraries.
+    /// </summary>
+    internal static partial class Libraries
+    {
+        public const string FidoClient = "libfido-client.so.0";
+        public const string Glib = "libglib-2.0.so.0";
+        public const string Libc = "libc.so.6";
+    }
+}
diff --git a/src/Tizen.Account.FidoClient/Interop/Interop.Uaf.Authenticator.cs b/src/Tizen.Account.FidoClient/Interop/Interop.Uaf.Authenticator.cs
new file mode 100755 (executable)
index 0000000..7cbd9f9
--- /dev/null
@@ -0,0 +1,68 @@
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+using System.Runtime.InteropServices;
+using Tizen.Internals.Errors;
+
+internal static partial class Interop
+{
+    internal static partial class UafAuthenticator
+    {
+        [DllImport(Libraries.FidoClient, EntryPoint = "fido_foreach_authenticator")]
+        internal static extern int ForeachAuthenticator(FidoAuthenticatorCallback cb, IntPtr /* void */ userData);
+
+        [DllImport(Libraries.FidoClient, EntryPoint = "fido_authenticator_get_title")]
+        internal static extern int GetTitle(IntPtr /* fido_authenticator_h */ auth, out IntPtr title);
+
+        [DllImport(Libraries.FidoClient, EntryPoint = "fido_authenticator_get_aaid")]
+        internal static extern int GetAaid(IntPtr /* fido_authenticator_h */ auth, out IntPtr aaid);
+
+        [DllImport(Libraries.FidoClient, EntryPoint = "fido_authenticator_get_description")]
+        internal static extern int GetDescription(IntPtr /* fido_authenticator_h */ auth, out IntPtr desc);
+
+        [DllImport(Libraries.FidoClient, EntryPoint = "fido_authenticator_get_assertion_scheme")]
+        internal static extern int GetAssertionScheme(IntPtr /* fido_authenticator_h */ auth, out IntPtr scheme);
+
+        [DllImport(Libraries.FidoClient, EntryPoint = "fido_authenticator_get_algorithm")]
+        internal static extern int GetAlgorithm(IntPtr /* fido_authenticator_h */ auth, out int /* fido_auth_algo_e */ algo);
+
+        [DllImport(Libraries.FidoClient, EntryPoint = "fido_authenticator_foreach_attestation_type")]
+        internal static extern int ForeachAttestationType(IntPtr /* fido_authenticator_h */ auth, FidoAttestationTypeCallback cb, IntPtr /* void */ userData);
+
+        [DllImport(Libraries.FidoClient, EntryPoint = "fido_authenticator_get_verification_method")]
+        internal static extern int GetVerificationMethod(IntPtr /* fido_authenticator_h */ auth, out int /* fido_auth_user_verify_type_e */ userVerification);
+
+        [DllImport(Libraries.FidoClient, EntryPoint = "fido_authenticator_get_key_protection_method")]
+        internal static extern int GetKeyProtectionMethod(IntPtr /* fido_authenticator_h */ auth, out int /* fido_auth_key_protection_type_e */ keyProtection);
+
+        [DllImport(Libraries.FidoClient, EntryPoint = "fido_authenticator_get_matcher_protection_method")]
+        internal static extern int GetMatcherProtectionMethod(IntPtr /* fido_authenticator_h */ auth, out int /* fido_auth_matcher_protection_type_e */ matcherProtection);
+
+        [DllImport(Libraries.FidoClient, EntryPoint = "fido_authenticator_get_attachment_hint")]
+        internal static extern int GetAttachmentHint(IntPtr /* fido_authenticator_h */ auth, out int /* fido_auth_attachment_hint_e */ attachmentHint);
+
+        [DllImport(Libraries.FidoClient, EntryPoint = "fido_authenticator_get_is_second_factor_only")]
+        internal static extern bool GetIsSecondFactorOnly(IntPtr /* fido_authenticator_h */ auth);
+
+        [DllImport(Libraries.FidoClient, EntryPoint = "fido_authenticator_get_tc_discplay")]
+        internal static extern int GetTcDiscplay(IntPtr /* fido_authenticator_h */ auth, out int /* fido_auth_tc_display_type_e */ tcDisplay);
+
+        [DllImport(Libraries.FidoClient, EntryPoint = "fido_authenticator_get_tc_display_type")]
+        internal static extern int GetTcDisplayType(IntPtr /* fido_authenticator_h */ auth, out IntPtr tcDisplayContentType);
+
+        [DllImport(Libraries.FidoClient, EntryPoint = "fido_authenticator_get_icon")]
+        internal static extern int GetIcon(IntPtr /* fido_authenticator_h */ auth, out IntPtr icon);
+
+        [UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)]
+        internal delegate void FidoAuthenticatorCallback(IntPtr /* fido_authenticator_h */ authInfo, IntPtr /* void */ userData);
+
+        [UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)]
+        internal delegate void FidoAttestationTypeCallback(int /* fido_auth_attestation_type_e */ attType, IntPtr /* void */ userData);
+    }
+}
diff --git a/src/Tizen.Account.FidoClient/Interop/Interop.Uaf.Client.cs b/src/Tizen.Account.FidoClient/Interop/Interop.Uaf.Client.cs
new file mode 100755 (executable)
index 0000000..2c4072d
--- /dev/null
@@ -0,0 +1,35 @@
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+using System.Runtime.InteropServices;
+using Tizen.Internals.Errors;
+
+internal static partial class Interop
+{
+    internal static partial class UafClient
+    {
+        [DllImport(Libraries.FidoClient, EntryPoint = "fido_get_client_vendor")]
+        internal static extern int FidoGetClientVendor(out string vendorName);
+
+        [DllImport(Libraries.FidoClient, EntryPoint = "fido_get_client_version")]
+        internal static extern int FidoGetClientVersion(out int clientMajorVersion, out int clientMinorVersion);
+
+        [DllImport(Libraries.FidoClient, EntryPoint = "fido_uaf_is_supported")]
+        internal static extern int FidoUafIsSupported(string uafMessageJson, out bool isSupported);
+
+        [DllImport(Libraries.FidoClient, EntryPoint = "fido_uaf_get_response_message")]
+        internal static extern int FidoUafGetResponseMessage(string uafRequestJson, string channelBinding, FidoUafResponseMessageCallback callback, IntPtr /* void */ userData);
+
+        [DllImport(Libraries.FidoClient, EntryPoint = "fido_uaf_set_server_result")]
+        internal static extern int FidoUafSetServerResult(int responseCode, string uafResponseJson);
+
+        [UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)]
+        internal delegate void FidoUafResponseMessageCallback(int /* fido_error_e */ tizenErrorCode, string uafResponseJson, IntPtr /* void */ userData);
+    }
+}
diff --git a/src/Tizen.Account.FidoClient/Properties/AssemblyInfo.cs b/src/Tizen.Account.FidoClient/Properties/AssemblyInfo.cs
new file mode 100755 (executable)
index 0000000..5b7b32b
--- /dev/null
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Tizen.Account.FidoClient")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Tizen.Account.FidoClient")]
+[assembly: AssemblyCopyright("Copyright ©  2017")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components.  If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("b4862bf3-9a0f-4e68-9684-c0377d7f67e2")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/src/Tizen.Account.FidoClient/Tizen.Account.FidoClient.Net45.csproj b/src/Tizen.Account.FidoClient/Tizen.Account.FidoClient.Net45.csproj
new file mode 100755 (executable)
index 0000000..f48b555
--- /dev/null
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{B7699082-916F-4124-8416-07BE5C799D53}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Tizen.Account.FidoClient</RootNamespace>
+    <AssemblyName>Tizen.Account.FidoClient</AssemblyName>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\Net45\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\Net45\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>Tizen.Account.FidoClient.snk</AssemblyOriginatorKeyFile>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Interop\Interop.Libc.cs" />
+    <Compile Include="Interop\Interop.Libraries.cs" />
+    <Compile Include="Interop\Interop.Uaf.Authenticator.cs" />
+    <Compile Include="Interop\Interop.Uaf.Client.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Tizen.Account.FidoClient\AuthenticatorInformation.cs" />
+    <Compile Include="Tizen.Account.FidoClient\ErrorFactory.cs" />
+    <Compile Include="Tizen.Account.FidoClient\UafAuthenticatorFinder.cs" />
+    <Compile Include="Tizen.Account.FidoClient\UafClient.cs" />
+    <Compile Include="Tizen.Account.FidoClient\UafEnumerations.cs" />
+    <Compile Include="Tizen.Account.FidoClient\UafMessage.cs" />
+    <Compile Include="Tizen.Account.FidoClient\UafResponse.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Tizen.Account.FidoClient.snk" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
\ No newline at end of file
diff --git a/src/Tizen.Account.FidoClient/Tizen.Account.FidoClient.Net45.project.json b/src/Tizen.Account.FidoClient/Tizen.Account.FidoClient.Net45.project.json
new file mode 100644 (file)
index 0000000..ab1a0ee
--- /dev/null
@@ -0,0 +1,11 @@
+{
+  "dependencies": {
+    "Tizen": "1.0.1"
+  },
+  "frameworks": {
+    "net45": {}
+  },
+  "runtimes": {
+    "win": {}
+  }
+}
diff --git a/src/Tizen.Account.FidoClient/Tizen.Account.FidoClient.csproj b/src/Tizen.Account.FidoClient/Tizen.Account.FidoClient.csproj
new file mode 100755 (executable)
index 0000000..24f2de0
--- /dev/null
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>8.0.30703</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{B4862BF3-9A0F-4E68-9684-C0377D7F67E2}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Tizen.Account.FidoClient</RootNamespace>
+    <AssemblyName>Tizen.Account.FidoClient</AssemblyName>
+    <FileAlignment>512</FileAlignment>
+    <DefaultLanguage>en-US</DefaultLanguage>
+  </PropertyGroup>
+  <PropertyGroup>
+    <TargetFrameworkIdentifier>.NETStandard</TargetFrameworkIdentifier>
+    <TargetFrameworkVersion>v1.6</TargetFrameworkVersion>
+    <NuGetTargetMoniker>.NETStandard,Version=v1.6</NuGetTargetMoniker>
+    <TargetFrameworkMoniker>.NETStandard,Version=v1.6</TargetFrameworkMoniker>
+    <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
+    <NoStdLib>true</NoStdLib>
+    <NoWarn>$(NoWarn);1701</NoWarn>
+    <UseVSHostingProcess>false</UseVSHostingProcess>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>Tizen.Account.FidoClient.snk</AssemblyOriginatorKeyFile>
+  </PropertyGroup>
+  <ItemGroup>
+    <None Include="Tizen.Account.FidoClient.project.json" />
+    <None Include="Tizen.Account.FidoClient.snk" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Interop\Interop.Libc.cs" />
+    <Compile Include="Interop\Interop.Libraries.cs" />
+    <Compile Include="Tizen.Account.FidoClient\AuthenticatorInformation.cs" />
+    <Compile Include="Interop\Interop.Uaf.Authenticator.cs" />
+    <Compile Include="Interop\Interop.Uaf.Client.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Tizen.Account.FidoClient\ErrorFactory.cs" />
+    <Compile Include="Tizen.Account.FidoClient\UafAuthenticatorFinder.cs" />
+    <Compile Include="Tizen.Account.FidoClient\UafClient.cs" />
+    <Compile Include="Tizen.Account.FidoClient\UafMessage.cs" />
+    <Compile Include="Tizen.Account.FidoClient\UafResponse.cs" />
+    <Compile Include="Tizen.Account.FidoClient\UafEnumerations.cs" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+               Other similar extension points exist, see Microsoft.Common.targets.
+       <Target Name="BeforeBuild">
+       </Target>
+       <Target Name="AfterBuild">
+       </Target>
+       -->
+  <PropertyGroup>
+    <!-- https://github.com/dotnet/corefxlab/tree/master/samples/NetCoreSample and
+                        https://docs.microsoft.com/en-us/dotnet/articles/core/tutorials/target-dotnetcore-with-msbuild
+               -->
+    <!-- We don't use any of MSBuild's resolution logic for resolving the framework, so just set these two
+                        properties to any folder that exists to skip the GetReferenceAssemblyPaths task (not target) and
+                        to prevent it from outputting a warning (MSB3644).
+               -->
+    <_TargetFrameworkDirectories>$(MSBuildThisFileDirectory)</_TargetFrameworkDirectories>
+    <_FullFrameworkReferenceAssemblyPaths>$(MSBuildThisFileDirectory)</_FullFrameworkReferenceAssemblyPaths>
+    <AutoUnifyAssemblyReferences>true</AutoUnifyAssemblyReferences>
+  </PropertyGroup>
+  <!-- Include tasks for Tizen -->
+  <PropertyGroup>
+    <TizenBuildPath>$(MSBuildExtensionsPath)\Tizen</TizenBuildPath>
+    <TizenToolsPath>$(TizenBuildPath)\bin</TizenToolsPath>
+  </PropertyGroup>
+  <UsingTask TaskName="Tizen.Tasks.SignPackage.TizenCleanPackageSource" AssemblyFile="$(TizenToolsPath)\Tizen.Tasks.SignPackage.dll" />
+  <UsingTask TaskName="Tizen.Tasks.SignPackage.TizenPreparePackageManifest" AssemblyFile="$(TizenToolsPath)\Tizen.Tasks.SignPackage.dll" />
+  <UsingTask TaskName="Tizen.Tasks.SignPackage.TizenPreparePackageSource" AssemblyFile="$(TizenToolsPath)\Tizen.Tasks.SignPackage.dll" />
+  <UsingTask TaskName="Tizen.Tasks.SignPackage.TizenSignPackage" AssemblyFile="$(TizenToolsPath)\Tizen.Tasks.SignPackage.dll" />
+  <!-- Task to clean package source -->
+  <Target Name="_TizenCleanPkgSrc">
+    <TizenCleanPackageSource SolutionPath="$(SolutionPath)" ProjectPath="$(MSBuildProjectFullPath)" />
+  </Target>
+  <!-- Task to prepare tizen-manifest.xml file -->
+  <Target Name="_TizenPrepManifest">
+    <TizenPreparePackageManifest SolutionPath="$(SolutionPath)" ProjectPath="$(MSBuildProjectFullPath)" />
+  </Target>
+  <!-- Task to prepare package sources(executable, dlls, resource files) -->
+  <Target Name="_TizenPrepPkgSrc">
+    <TizenPreparePackageSource SolutionPath="$(SolutionPath)" ProjectPath="$(MSBuildProjectFullPath)" AssemblyName="$(AssemblyName)" TargetPath="$(TargetPath)" />
+  </Target>
+  <!-- Task to signing and packaging -->
+  <Target Name="_TizenSignPackge">
+    <TizenSignPackage SolutionPath="$(SolutionPath)" ProjectPath="$(MSBuildProjectFullPath)" SolutionName="$(SolutionName)" AuthorCertificate="$(AuthorCertificate)" AuthorPasswd="$(AuthorPasswd)" DistribCertificate="$(DistribCertificate)" DistribPasswd="$(DistribPasswd)" />
+  </Target>
+</Project>
\ No newline at end of file
diff --git a/src/Tizen.Account.FidoClient/Tizen.Account.FidoClient.nuspec b/src/Tizen.Account.FidoClient/Tizen.Account.FidoClient.nuspec
new file mode 100755 (executable)
index 0000000..0f8d7c2
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<package>
+  <metadata>
+    <id>Tizen.Account.FidoClient</id>
+    <version>$version$</version>
+    <authors>Tizen Developers</authors>
+    <description>FIDO UAF API for Tizen.Net</description>
+    <dependencies>
+      <dependency id="Tizen" version="1.0.1" />
+    </dependencies>
+       </metadata>
+  <files>
+    <file src="bin/$Configuration$/Tizen.Account.FidoClient.dll" target="lib/netstandard1.3" />
+    <file src="bin/$Configuration$/Net45/Tizen.Account.FidoClient.dll" target="lib/net45" />
+  </files>
+</package>
diff --git a/src/Tizen.Account.FidoClient/Tizen.Account.FidoClient.project.json b/src/Tizen.Account.FidoClient/Tizen.Account.FidoClient.project.json
new file mode 100755 (executable)
index 0000000..aef135d
--- /dev/null
@@ -0,0 +1,17 @@
+{
+  "buildOptions": {
+    "debugType": "portable",
+    "platform": "AnyCPU",
+    "preserveCompilationContext": true
+  },
+  "dependencies": {
+    "NETStandard.Library": "1.6.0",
+    "Tizen": "1.0.1"
+  },
+  "runtimes": {
+    "win": {}
+  },
+  "frameworks": {
+    "netstandard1.6": {}
+  }
+}
\ No newline at end of file
diff --git a/src/Tizen.Account.FidoClient/Tizen.Account.FidoClient.snk b/src/Tizen.Account.FidoClient/Tizen.Account.FidoClient.snk
new file mode 100755 (executable)
index 0000000..847fdf6
Binary files /dev/null and b/src/Tizen.Account.FidoClient/Tizen.Account.FidoClient.snk differ
diff --git a/src/Tizen.Account.FidoClient/Tizen.Account.FidoClient/AuthenticatorInformation.cs b/src/Tizen.Account.FidoClient/Tizen.Account.FidoClient/AuthenticatorInformation.cs
new file mode 100755 (executable)
index 0000000..bf44822
--- /dev/null
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Collections.Generic;
+
+namespace Tizen.Account.FidoClient
+{
+    /// <summary>
+    /// Contains information about the authenticators registered on the device.
+    /// </summary>
+    /// <example>
+    /// <code>
+    ///     IEnumerable<AuthenticatorInformation> authInfos = await UafAuthenticatorFinder.DiscoverAuthenticatorsAsync();
+    ///     foreach (AuthenticatorInformation authInfo in authInfos)
+    ///     {
+    ///         string aaid = authInfo.Aaid;
+    ///         string title = authInfo.Title;
+    ///     }
+    /// </code>
+    /// </example>
+    public class AuthenticatorInformation
+    {
+        internal AuthenticatorInformation()
+        {
+        }
+
+        /// <summary>
+        /// The authenticator Title
+        /// </summary>
+        public string Title { get; internal set; }
+
+        /// <summary>
+        /// The Authenticator AAID (Authenticator Attestation ID)
+        /// </summary>
+        public string Aaid { get; internal set; }
+
+        /// <summary>
+        /// The Authenticator description
+        /// </summary>
+        public string Description { get; internal set; }
+
+        /// <summary>
+        /// The Authenticator assertion scheme.
+        /// </summary>
+        public string AssertionScheme { get; internal set; }
+
+        /// <summary>
+        /// The Authenticator algorithm.
+        /// </summary>
+        public AuthenticationAlgorithm AuthenticationAlgorithm { get; internal set; }
+
+        /// <summary>
+        /// The user verification method of this Authenticator
+        /// </summary>
+        public UserVerificationMethod UserVerification { get; internal set; }
+
+        /// <summary>
+        /// The key protection method of this Authenticator.
+        /// </summary>
+        public KeyProtectionType KeyProtection { get; internal set; }
+
+        /// <summary>
+        /// The matcher protection method of this Authenticator.
+        /// </summary>
+        public MatcherProtectionType MatcherProtection { get; internal set; }
+
+        /// <summary>
+        /// The attachment hint of this Authenticator.
+        /// </summary>
+        public AuthenticatorAttachmentHint AttachmentHint { get; internal set; }
+
+        /// <summary>
+        /// Denotes the Authenticator is Second factor only which is supported by U2F standards.
+        /// </summary>
+        public bool IsSecondFactorOnly { get; internal set; }
+
+        /// <summary>
+        /// The available attestation types for this Authenticator.
+        /// </summary>
+        public IEnumerable<AuthenticatorAttestationType> AttestationTypes { get; internal set; }
+
+        /// <summary>
+        /// The Transaction Confirmation display type of this Authenticator.
+        /// </summary>
+        public TransactionConfirmationDisplayType TcDisplayType { get; internal set; }
+
+        /// <summary>
+        /// The Transaction Confirmation display type of this Authenticator.
+        /// </summary>
+        public string TcDisplayContentType { get; internal set; }
+
+        /// <summary>
+        /// The icon of this Authenticator.
+        /// </summary>
+        public string Icon { get; internal set; }
+    }
+}
\ No newline at end of file
diff --git a/src/Tizen.Account.FidoClient/Tizen.Account.FidoClient/ErrorFactory.cs b/src/Tizen.Account.FidoClient/Tizen.Account.FidoClient/ErrorFactory.cs
new file mode 100755 (executable)
index 0000000..ab912d6
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using Tizen.Internals.Errors;
+
+namespace Tizen.Account.FidoClient
+{
+    internal enum FidoErrorCode
+    {
+        None = ErrorCode.None,
+        OutOfMemory = ErrorCode.OutOfMemory,
+        InvalidParameter = ErrorCode.InvalidParameter,
+        NoData = ErrorCode.NoData,
+        NotSupported = ErrorCode.NotSupported,
+        PermissionDenied = ErrorCode.PermissionDenied,
+        UserActionInProgress = -0x01030000 | 0x01,
+        UserCancelled = -0x01030000 | 0x02,
+        UnsupportedVersion = -0x01030000 | 0x03,
+        NoSuitableAuthenticator = -0x01030000 | 0x04,
+        ProtocolError = -0x01030000 | 0x05,
+        UntrustedFacetId = -0x01030000 | 0x06,
+        Unknown = ErrorCode.Unknown
+    }
+
+    internal class ErrorFactory
+    {
+        internal static string LogTag = "Tizen.Account.FidoClient";
+
+        internal static Exception GetException(int error)
+        {
+            if ((FidoErrorCode)error == FidoErrorCode.OutOfMemory)
+            {
+                return new OutOfMemoryException("Out of memory");
+            }
+            else if ((FidoErrorCode)error == FidoErrorCode.InvalidParameter)
+            {
+                return new ArgumentException("Invalid parameter");
+            }
+            else if ((FidoErrorCode)error == FidoErrorCode.UserActionInProgress)
+            {
+                return new InvalidOperationException("User action already in progress");
+            }
+            else if ((FidoErrorCode)error == FidoErrorCode.NotSupported)
+            {
+                return new NotSupportedException("FIDO is unsupported.");
+            }
+            else if ((FidoErrorCode)error == FidoErrorCode.PermissionDenied)
+            {
+                return new UnauthorizedAccessException("Permission denied");
+            }
+            else if ((FidoErrorCode)error == FidoErrorCode.UnsupportedVersion)
+            {
+                return new NotSupportedException("UAF message's version is not supported.");
+            }
+            else if ((FidoErrorCode)error == FidoErrorCode.NoSuitableAuthenticator)
+            {
+                return new Exception("Suitable authenticator can't be found");
+            }
+            else if ((FidoErrorCode)error == FidoErrorCode.ProtocolError)
+            {
+                return new Exception("Protocol error, the interaction may have timed out, or the UAF message is malformed.");
+            }
+            else if ((FidoErrorCode)error == FidoErrorCode.UserCancelled)
+            {
+                return new Exception("User has canceled the operation.");
+            }
+            else if ((FidoErrorCode)error == FidoErrorCode.UntrustedFacetId)
+            {
+                return new Exception(" The caller's id is not allowed to use this operation.");
+            }
+            else
+            {
+                return new Exception("Unknown error");
+            }
+        }
+    }
+}
diff --git a/src/Tizen.Account.FidoClient/Tizen.Account.FidoClient/UafAuthenticatorFinder.cs b/src/Tizen.Account.FidoClient/Tizen.Account.FidoClient/UafAuthenticatorFinder.cs
new file mode 100755 (executable)
index 0000000..86a0a37
--- /dev/null
@@ -0,0 +1,206 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using System.Runtime.InteropServices;
+
+namespace Tizen.Account.FidoClient
+{
+    /// <summary>
+    /// Class to find available FIDO specific authenticators on the device
+    /// </summary>
+    public static class UafAuthenticatorFinder
+    {
+        /// <summary>
+        /// Retrieves  all the available FIDO authenticators supported by this Device.
+        /// </summary>
+        /// <returns>Enumerable list of authenticators</returns>
+        /// <privilege>http://tizen.org/privilege/fido.client</privilege>
+        /// <exception cref="UnauthorizedAccessException">Thrown when the application does not have privilege to access this method</exception>
+        /// <example>
+        /// <code>
+        ///     IEnumerable<AuthenticatorInformation> authInfos = await UafAuthenticatorFinder.DiscoverAuthenticatorsAsync();
+        ///     foreach (AuthenticatorInformation authInfo in authInfos)
+        ///     {
+        ///         string aaid = authInfo.Aaid;
+        ///         string title = authInfo.Title;
+        ///     }
+        /// </code>
+        /// </example>
+        public static async Task<IEnumerable<AuthenticatorInformation>> DiscoverAuthenticatorsAsync()
+        {
+            IEnumerable<AuthenticatorInformation> result = null;
+            await Task.Run(() => result = Discover());
+            return result;
+        }
+
+        private static IEnumerable<AuthenticatorInformation> Discover()
+        {
+            IList<AuthenticatorInformation> result = new List<AuthenticatorInformation>();
+
+            Interop.UafAuthenticator.FidoAuthenticatorCallback cb = (IntPtr authHandle, IntPtr userData) =>
+            {
+                Log.Info(ErrorFactory.LogTag, "Iterating authenticators");
+                result.Add(GetAuthInfo(authHandle));
+            };
+
+            int ret = Interop.UafAuthenticator.ForeachAuthenticator(cb, IntPtr.Zero);
+            if(ret != (int)FidoErrorCode.None)
+            {
+                Log.Error(ErrorFactory.LogTag, "Interop API failed with error code: [" + ret + "]");
+                throw ErrorFactory.GetException(ret);
+            }
+
+            return result;
+        }
+
+        private static AuthenticatorInformation GetAuthInfo(IntPtr authHandle)
+        {
+            var authInfo = new AuthenticatorInformation();
+
+            IntPtr stringPtr;
+            int ret = Interop.UafAuthenticator.GetTitle(authHandle, out stringPtr);
+            if (ret != (int)FidoErrorCode.None)
+            {
+                Log.Error(ErrorFactory.LogTag, "Interop API failed with error code: [" + ret + "]");
+                throw ErrorFactory.GetException(ret);
+            }
+            authInfo.Title = Marshal.PtrToStringAnsi(stringPtr);
+            Interop.Libc.Free(stringPtr);
+
+            ret = Interop.UafAuthenticator.GetAaid(authHandle, out stringPtr);
+            if (ret != (int)FidoErrorCode.None)
+            {
+                Log.Error(ErrorFactory.LogTag, "Interop API failed with error code: [" + ret + "]");
+                throw ErrorFactory.GetException(ret);
+            }
+            authInfo.Aaid = Marshal.PtrToStringAnsi(stringPtr);
+            Interop.Libc.Free(stringPtr);
+
+            ret = Interop.UafAuthenticator.GetDescription(authHandle, out stringPtr);
+            if (ret != (int)FidoErrorCode.None)
+            {
+                Log.Error(ErrorFactory.LogTag, "Interop API failed with error code: [" + ret + "]");
+                throw ErrorFactory.GetException(ret);
+            }
+            authInfo.Description = Marshal.PtrToStringAnsi(stringPtr);
+            Interop.Libc.Free(stringPtr);
+
+            ret = Interop.UafAuthenticator.GetAssertionScheme(authHandle, out stringPtr);
+            if (ret != (int)FidoErrorCode.None)
+            {
+                Log.Error(ErrorFactory.LogTag, "Interop API failed with error code: [" + ret + "]");
+                throw ErrorFactory.GetException(ret);
+            }
+            authInfo.AssertionScheme = Marshal.PtrToStringAnsi(stringPtr);
+            Interop.Libc.Free(stringPtr);
+
+            int authAlgo;
+            ret = Interop.UafAuthenticator.GetAlgorithm(authHandle, out authAlgo);
+            if (ret != (int)FidoErrorCode.None)
+            {
+                Log.Error(ErrorFactory.LogTag, "Interop API failed with error code: [" + ret + "]");
+                throw ErrorFactory.GetException(ret);
+            }
+
+            int usrVerificationMethod;
+            ret = Interop.UafAuthenticator.GetVerificationMethod(authHandle, out usrVerificationMethod);
+            if (ret != (int)FidoErrorCode.None)
+            {
+                Log.Error(ErrorFactory.LogTag, "Interop API failed with error code: [" + ret + "]");
+                throw ErrorFactory.GetException(ret);
+            }
+
+            int keyProtectionType;
+            ret = Interop.UafAuthenticator.GetKeyProtectionMethod(authHandle, out keyProtectionType);
+            if (ret != (int)FidoErrorCode.None)
+            {
+                Log.Error(ErrorFactory.LogTag, "Interop API failed with error code: [" + ret + "]");
+                throw ErrorFactory.GetException(ret);
+            }
+
+            int matcherProtection;
+            ret = Interop.UafAuthenticator.GetMatcherProtectionMethod(authHandle, out matcherProtection);
+            if (ret != (int)FidoErrorCode.None)
+            {
+                Log.Error(ErrorFactory.LogTag, "Interop API failed with error code: [" + ret + "]");
+                throw ErrorFactory.GetException(ret);
+            }
+
+            int attachmentHint;
+            ret = Interop.UafAuthenticator.GetAttachmentHint(authHandle, out attachmentHint);
+            if (ret != (int)FidoErrorCode.None)
+            {
+                Log.Error(ErrorFactory.LogTag, "Interop API failed with error code: [" + ret + "]");
+                throw ErrorFactory.GetException(ret);
+            }
+
+            bool isSecondaryOnly = Interop.UafAuthenticator.GetIsSecondFactorOnly(authHandle);
+
+            int tcDisplayType;
+            ret = Interop.UafAuthenticator.GetTcDiscplay(authHandle, out tcDisplayType);
+            if (ret != (int)FidoErrorCode.None)
+            {
+                Log.Error(ErrorFactory.LogTag, "Interop API failed with error code: [" + ret + "]");
+                throw ErrorFactory.GetException(ret);
+            }
+
+            ret = Interop.UafAuthenticator.GetTcDisplayType(authHandle, out stringPtr);
+            if (ret != (int)FidoErrorCode.None)
+            {
+                Log.Error(ErrorFactory.LogTag, "Interop API failed with error code: [" + ret + "]");
+                throw ErrorFactory.GetException(ret);
+            }
+            authInfo.TcDisplayContentType = Marshal.PtrToStringAnsi(stringPtr);
+            Interop.Libc.Free(stringPtr);
+
+            ret = Interop.UafAuthenticator.GetIcon(authHandle, out stringPtr);
+            if (ret != (int)FidoErrorCode.None)
+            {
+                Log.Error(ErrorFactory.LogTag, "Interop API failed with error code: [" + ret + "]");
+                throw ErrorFactory.GetException(ret);
+            }
+            authInfo.Icon = Marshal.PtrToStringAnsi(stringPtr);
+            Interop.Libc.Free(stringPtr);
+
+            var attestationTypes = new List<AuthenticatorAttestationType> ();
+            Interop.UafAuthenticator.FidoAttestationTypeCallback cb = (int type, IntPtr usrData) =>
+            {
+                attestationTypes.Add((AuthenticatorAttestationType)type);
+            };
+
+            ret = Interop.UafAuthenticator.ForeachAttestationType(authHandle, cb, IntPtr.Zero);
+            if (ret != (int)FidoErrorCode.None)
+            {
+                Log.Error(ErrorFactory.LogTag, "Interop API failed with error code: [" + ret + "]");
+                throw ErrorFactory.GetException(ret);
+            }
+
+            authInfo.AuthenticationAlgorithm = (AuthenticationAlgorithm)authAlgo;
+            authInfo.UserVerification = (UserVerificationMethod)usrVerificationMethod;
+            authInfo.KeyProtection = (KeyProtectionType)keyProtectionType;
+            authInfo.MatcherProtection = (MatcherProtectionType)matcherProtection;
+            authInfo.AttachmentHint = (AuthenticatorAttachmentHint)attachmentHint;
+            authInfo.IsSecondFactorOnly = isSecondaryOnly;
+            authInfo.TcDisplayType = (TransactionConfirmationDisplayType)tcDisplayType;
+            authInfo.AttestationTypes = attestationTypes;
+
+            return authInfo;
+        }
+    }
+}
diff --git a/src/Tizen.Account.FidoClient/Tizen.Account.FidoClient/UafClient.cs b/src/Tizen.Account.FidoClient/Tizen.Account.FidoClient/UafClient.cs
new file mode 100755 (executable)
index 0000000..1dd8187
--- /dev/null
@@ -0,0 +1,234 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Threading.Tasks;
+using Tizen.Internals.Errors;
+
+namespace Tizen.Account.FidoClient
+{
+    /// <summary>
+    /// The FIDO UAF Client APIs
+    /// </summary>
+    public static class UafClient
+    {
+        private static string _vendorName = null;
+        private static int _majorVersion;
+        private static int _minorVersion;
+
+        static UafClient()
+        {
+            int ret = Interop.UafClient.FidoGetClientVendor(out _vendorName);
+            if (ret != (int)FidoErrorCode.None)
+            {
+                Log.Error(ErrorFactory.LogTag, "Interop API failed with error code: [" + ret + "]");
+                throw ErrorFactory.GetException(ret);
+            }
+
+            ret = Interop.UafClient.FidoGetClientVersion(out _majorVersion, out _minorVersion);
+            if (ret != (int)FidoErrorCode.None)
+            {
+                Log.Error(ErrorFactory.LogTag, "Interop API failed with error code: [" + ret + "]");
+                throw ErrorFactory.GetException(ret);
+            }
+        }
+
+        /// <summary>
+        /// The FIDO Client vendor name
+        /// </summary>
+        public static string VendorName
+        {
+            get
+            {
+                return _vendorName;
+            }
+        }
+
+        /// <summary>
+        /// The FIDO Client Major version
+        /// </summary>
+        public static int MajorVersion
+        {
+            get
+            {
+                return _majorVersion;
+            }
+        }
+
+        /// <summary>
+        /// The FIDO Client Minor version
+        /// </summary>
+        public static int MinorVersion
+        {
+            get
+            {
+                return _minorVersion;
+            }
+        }
+
+        /// <summary>
+        /// The FIDO Server response for successfull interaction.
+        /// </summary>
+        public static int StautsOk
+        {
+            get
+            {
+                return 1200;
+            }
+        }
+
+        /// <summary>
+        /// Checks whether the FIDO message can be processed
+        /// </summary>
+        /// <param name="uafMessage">The FIDO UAF message which is received from the relying party server</param>
+        /// <returns>True if the message can be handled by the device, else false</returns>
+        /// <privilege>http://tizen.org/privilege/fido.client</privilege>
+        /// <exception cref="ArgumentException"> In case of invalid parameter</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when the application does not have privilege to access this method</exception>
+        /// <example>
+        /// <code>
+        ///     UafMessage uafRequest = new UafMessage()
+        ///     {
+        ///         Operation = "UafRequestJson"
+        ///     };
+        ///     bool response = await UafClient.CheckPolicyAsync(uafRequest);
+        /// </code>
+        /// </example>
+        public static async Task<bool> CheckPolicyAsync(UafMessage uafMessage)
+        {
+            if (uafMessage == null)
+            {
+                Log.Error(ErrorFactory.LogTag, "Invalid request or request is null");
+                throw ErrorFactory.GetException((int)FidoErrorCode.InvalidParameter);
+            }
+
+            bool result = false;
+            await Task.Run(() => result = CheckPolicy(uafMessage.Operation));
+            return result;
+        }
+
+        /// <summary>
+        /// Processes the given FIDO UAF message.
+        /// </summary>
+        /// <param name="uafMessage">The FIDO UAF message which is received from the relying party server</param>
+        /// <param name="channelBindng">The channel binding data in JSON format which is received from the relying party server</param>
+        /// <returns>FIDO response message</returns>
+        /// <privilege>http://tizen.org/privilege/fido.client</privilege>
+        /// <exception cref="ArgumentException"> In case of invalid parameter</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when the application does not have privilege to access this method</exception>
+        /// <exception cref="NotSupportedException">FIDO is not supported</exception>
+        /// <example>
+        /// <code>
+        ///     UafMessage uafRequest = new UafMessage()
+        ///     {
+        ///         Operation = "UafAuthRequestJson"
+        ///     };
+        ///
+        ///     var response = await UafClient.ProcessRequestAsync(uafRequest, null);
+        /// </code>
+        /// </example>
+        public static async Task<UafResponse> ProcessRequestAsync(UafMessage uafMessage, string channelBindng)
+        {
+            if (uafMessage == null)
+            {
+                Log.Error(ErrorFactory.LogTag, "Invalid request or request is null");
+                throw ErrorFactory.GetException((int)FidoErrorCode.InvalidParameter);
+            }
+
+            TaskCompletionSource<UafResponse> tcs = new TaskCompletionSource<UafResponse>();
+            Interop.UafClient.FidoUafResponseMessageCallback cb = (int errorCode, string uafResponseJson, IntPtr userData) =>
+            {
+                if (uafMessage == null)
+                {
+                    Log.Error(ErrorFactory.LogTag, "Invalid request or request is null");
+                    tcs.SetException(ErrorFactory.GetException((int)FidoErrorCode.InvalidParameter));
+                }
+
+                if (errorCode != (int)FidoErrorCode.None)
+                {
+                    Log.Error(ErrorFactory.LogTag, "Interop callback failed with error code: [" + errorCode + "]");
+                    tcs.SetException(ErrorFactory.GetException(errorCode));
+                }
+
+                tcs.SetResult(new UafResponse() { Response = uafResponseJson });
+            };
+
+            int ret = Interop.UafClient.FidoUafGetResponseMessage(uafMessage.Operation, channelBindng, cb, IntPtr.Zero);
+            if (ret != (int)FidoErrorCode.None)
+            {
+                Log.Error(ErrorFactory.LogTag, "Interop API failed with error code: [" + ret + "]");
+                throw ErrorFactory.GetException(ret);
+            }
+
+            return await tcs.Task;
+        }
+
+        /// <summary>
+        /// Notifies the FIDO client about the server result. FIDO Server sends the result of processing a UAF message to FIDO client.
+        /// </summary>
+        /// <param name="responseCode">The status code received from Server.(StautsOk implies success)</param>
+        /// <param name="response">The FIDO response message sent to server in JSON format</param>
+        /// <privilege>http://tizen.org/privilege/fido.client</privilege>
+        /// <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
+        /// </remarks>
+        /// <exception cref="ArgumentException"> In case of invalid parameter</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when the application does not have privilege to access this method</exception>
+        /// <example>
+        /// <code>
+        ///     UafResponse response = new UafResponse()
+        ///     {
+        ///         Response = "Responsejson"
+        ///     };
+        ///
+        ///     await UafClient.NotifyResultAsync(UafClient.StautsOk, response);
+        /// </code>
+        /// </example>
+        public static async Task NotifyResultAsync(int responseCode, UafResponse response)
+        {
+            if (response == null)
+            {
+                Log.Error(ErrorFactory.LogTag, "Invalid parameter");
+                throw ErrorFactory.GetException((int)FidoErrorCode.InvalidParameter);
+            }
+
+            await Task.Run(() => NotifyResult(responseCode, response.Response));
+        }
+
+        private static bool CheckPolicy(string uafOperation)
+        {
+            bool isSupported;
+            int ret = Interop.UafClient.FidoUafIsSupported(uafOperation, out isSupported);
+            if (ret != (int)FidoErrorCode.None)
+            {
+                Log.Error(ErrorFactory.LogTag, "Interop API failed with error code: [" + ret + "]");
+                throw ErrorFactory.GetException(ret);
+            }
+            return isSupported;
+        }
+
+        private static void NotifyResult(int responseCode, string response)
+        {
+            int ret = Interop.UafClient.FidoUafSetServerResult(responseCode, response);
+            if (ret != (int)FidoErrorCode.None)
+            {
+                Log.Error(ErrorFactory.LogTag, "Interop API failed with error code: [" + ErrorFacts.GetErrorMessage(ret) + "]");
+                throw ErrorFactory.GetException(ret);
+            }
+        }
+
+    }
+}
diff --git a/src/Tizen.Account.FidoClient/Tizen.Account.FidoClient/UafEnumerations.cs b/src/Tizen.Account.FidoClient/Tizen.Account.FidoClient/UafEnumerations.cs
new file mode 100755 (executable)
index 0000000..06beae9
--- /dev/null
@@ -0,0 +1,264 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace Tizen.Account.FidoClient
+{
+    /// <summary>
+    /// Authenticator's supported algorithm and encoding
+    /// </summary>
+    public enum AuthenticationAlgorithm
+    {
+        /// <summary>
+        /// SECP256R1 ECDSA SHA256 Raw
+        /// </summary>
+        Secp256r1EcdsaSha256Raw = 0X01,
+
+        /// <summary>
+        /// SECP256R1 ECDSA SHA256 DER
+        /// </summary>
+        Secp256r1EcdsaSha256Der = 0X02,
+
+        /// <summary>
+        /// RSA PSS SHA256 Raw
+        /// </summary>
+        RsassaPssSha256Raw = 0X03,
+
+        /// <summary>
+        /// RSA PSS SHA256 DER
+        /// </summary>
+        RsassaPssSha256Der = 0X04,
+
+        /// <summary>
+        /// SECP256K1 ECDSA SHA256 Raw
+        /// </summary>
+        Secp256k1EcdsaSha256Raw = 0X05,
+
+        /// <summary>
+        /// SECP256K1 ECDSA SHA256 DER
+        /// </summary>
+        Secp256k1EcdsaSha256Der = 0X06
+    }
+
+    /// <summary>
+    /// Authenticator's supported user verification method type.
+    /// </summary>
+    public enum UserVerificationMethod
+    {
+        /// <summary>
+        /// User presence verification.
+        /// </summary>
+        Presence = 0X01,
+
+        /// <summary>
+        /// User fingerprint verification.
+        /// </summary>
+        Fingerprint = 0X02,
+
+        /// <summary>
+        /// User passcode verification.
+        /// </summary>
+        Passcode = 0X04,
+
+        /// <summary>
+        /// User voiceprint verification.
+        /// </summary>
+        Voiceprint = 0X08,
+
+        /// <summary>
+        /// User faceprint verification.
+        /// </summary>
+        Faceprint = 0X10,
+        /// <summary>
+        /// User location verification.
+        /// </summary>
+        Location = 0X20,
+
+        /// <summary>
+        /// User eyeprint verification.
+        /// </summary>
+        Eyeprint = 0X40,
+
+        /// <summary>
+        /// User pattern verification.
+        /// </summary>
+        Pattern = 0X80,
+
+        /// <summary>
+        /// User handprint verification.
+        /// </summary>
+        Handprint = 0X100,
+
+        /// <summary>
+        /// Silent verification.
+        /// </summary>
+        None = 0X200,
+
+        /// <summary>
+        /// If an authenticator sets multiple flags for user verification types, it may also set this flag to indicate that all verification methods will be enforced (e.g. faceprint AND voiceprint). If flags for multiple user verification methods are set and this flag is not set, verification with only one is necessary (e.g. fingerprint OR passcode).
+        /// </summary>
+        All = 0X400
+    }
+
+    /// <summary>
+    /// Authenticator's supported key protection method type.
+    /// </summary>
+    public enum KeyProtectionType
+    {
+        /// <summary>
+        /// Software based key management.
+        /// </summary>
+        Software = 0X01,
+
+        /// <summary>
+        /// Hardware based key management.
+        /// </summary>
+        Hardware = 0X02,
+
+        /// <summary>
+        /// Trusted Execution Environment based key management.
+        /// </summary>
+        Tee = 0X04,
+
+        /// <summary>
+        /// Secure Element based key management.
+        /// </summary>
+        SecureElement = 0X08,
+
+        /// <summary>
+        /// Authenticator does not store (wrapped) UAuth keys at the client, but relies on a server-provided key handle.
+        /// </summary>
+        RemoteHandle = 0X10
+    }
+
+    /// <summary>
+    /// Authenticator's supported matcher protection type.
+    /// </summary>
+    public enum MatcherProtectionType
+    {
+        /// <summary>
+        /// Authenticator's matcher is running in software.
+        /// </summary>
+        Software = 0X01,
+
+        /// <summary>
+        /// Authenticator's matcher is running inside the Trusted Execution Environment.
+        /// </summary>
+        Tee = 0X02,
+
+        /// <summary>
+        /// Aauthenticator's matcher is running on the chip.
+        /// </summary>
+        OnChip = 0X04
+    }
+
+    /// <summary>
+    /// Authenticator's supproted method to communicate to FIDO user device.
+    /// </summary>
+    public enum AuthenticatorAttachmentHint
+    {
+        /// <summary>
+        /// Authenticator is permanently attached to the FIDO User Device.
+        /// </summary>
+        Internal = 0X01,
+
+        /// <summary>
+        /// Authenticator is removable or remote from the FIDO User Device.
+        /// </summary>
+        External = 0X02,
+
+        /// <summary>
+        /// The external authenticator currently has an exclusive wired connection.
+        /// </summary>
+        Wired = 0X04,
+
+        /// <summary>
+        /// The external authenticator communicates with the FIDO User Device through wireless means.
+        /// </summary>
+        Wireless = 0X08,
+
+        /// <summary>
+        /// Authenticator is able to communicate by NFC to the FIDO User Device.
+        /// </summary>
+        Nfc = 0X10,
+
+        /// <summary>
+        /// Authenticator is able to communicate by Bluetooth to the FIDO User Device.
+        /// </summary>
+        Bt = 0X20,
+
+        /// <summary>
+        /// Authenticator is connected to the FIDO User Device ver a non-exclusive network (e.g. over a TCP/IP LAN or WAN, as opposed to a PAN or point-to-point connection).
+        /// </summary>
+        Nw = 0X40,
+
+        /// <summary>
+        /// The external authenticator is in a "ready" state.
+        /// </summary>
+        Ready = 0X80,
+
+        /// <summary>
+        /// The external authenticator is able to communicate using WiFi Direct with the FIDO User Device.
+        /// </summary>
+        WifiDirect = 0X100
+    }
+
+    /// <summary>
+    /// Authenticator's supported Attestation type.
+    /// </summary>
+    public enum AuthenticatorAttestationType
+    {
+        /// <summary>
+        /// Full basic attestation.
+        /// </summary>
+        BasicFull = 0X3e07,
+
+        /// <summary>
+        /// Surrogate basic attestation.
+        /// </summary>
+        BasicSurrogate = 0X3e08,
+    }
+
+    /// <summary>
+    /// Transaction confirmation display capability type.
+    /// </summary>
+    public enum TransactionConfirmationDisplayType
+    {
+        /// <summary>
+        /// Some form of transaction confirmation display is available on this authenticator.
+        /// </summary>
+        Any = 0X01,
+
+        /// <summary>
+        /// Software-based transaction confirmation display operating in a privileged context is available on this authenticator.
+        /// </summary>
+        PrivilegedSoftware = 0X02,
+
+        /// <summary>
+        /// Transaction confirmation display is in a Trusted Execution Environment.
+        /// </summary>
+        Tee = 0X04,
+
+        /// <summary>
+        /// Transaction confirmation display based on hardware assisted capabilities is available on this authenticator.
+        /// </summary>
+        Hw = 0X08,
+
+        /// <summary>
+        /// Transaction confirmation display is provided on a distinct device from the FIDO User Device.
+        /// </summary>
+        Remote = 0X10
+    }
+}
diff --git a/src/Tizen.Account.FidoClient/Tizen.Account.FidoClient/UafMessage.cs b/src/Tizen.Account.FidoClient/Tizen.Account.FidoClient/UafMessage.cs
new file mode 100755 (executable)
index 0000000..9e60540
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace Tizen.Account.FidoClient
+{
+    /// <summary>
+    /// The FIDO message received from the relying party server
+    /// </summary>
+    public class UafMessage
+    {
+        /// <summary>
+        /// The FIDO message in JSON format which is received from the relying party server
+        /// </summary>
+        public string Operation { get; set; }
+    }
+}
\ No newline at end of file
diff --git a/src/Tizen.Account.FidoClient/Tizen.Account.FidoClient/UafResponse.cs b/src/Tizen.Account.FidoClient/Tizen.Account.FidoClient/UafResponse.cs
new file mode 100755 (executable)
index 0000000..4745749
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace Tizen.Account.FidoClient
+{
+    /// <summary>
+    /// Represents FIDO response message
+    /// </summary>
+    public class UafResponse
+    {
+        /// <summary>
+        /// FIDO response message in JSON format
+        /// </summary>
+        public string Response { set; get; }
+    }
+}
\ No newline at end of file