Yoti.Sandbox
1.0.0
See the version list below for details.
dotnet add package Yoti.Sandbox --version 1.0.0
NuGet\Install-Package Yoti.Sandbox -Version 1.0.0
<PackageReference Include="Yoti.Sandbox" Version="1.0.0" />
paket add Yoti.Sandbox --version 1.0.0
#r "nuget: Yoti.Sandbox, 1.0.0"
// Install Yoti.Sandbox as a Cake Addin #addin nuget:?package=Yoti.Sandbox&version=1.0.0 // Install Yoti.Sandbox as a Cake Tool #tool nuget:?package=Yoti.Sandbox&version=1.0.0
Yoti .NET Sandbox SDK
Welcome to the Yoti .NET Sandbox. This repo contains the tools you need to test your .NET back-end integration, alongside installation of the Yoti .NET SDK.
Sandbox Supported Frameworks
- .NET Standard 2.1
- .NET Core App 3.1
- .NET 4.8
Please email sdksupport@yoti.com if you require a Target Framework which is not listed here.
Installing the Sandbox
To install the Yoti Sandbox NuGet package you will need to install NuGet. You can find instructions to do that here
To import the latest Yoti SDK into your project, enter the following command from NuGet Package Manager Console in Visual Studio:
Install-Package Yoti.Sandbox
For other installation methods, see nuget.org/packages/Yoti.Sandbox
Configuration
CLIENT_SDK_ID
is the SDK identifier generated by Yoti Hub in the Key tab when you create your app./path/to/your-pem-file.pem
is the path to the application pem file. It can be downloaded only once from the Keys tab in your Yoti Hub.
Please do not open the pem file as this might corrupt the key and you will need to create a new application.
Profile Token Creation
Org.BouncyCastle.Crypto.AsymmetricCipherKeyPair keyPair;
using (StreamReader stream = File.OpenText("path/to/hub-private-key.pem"))
{
keyPair = Yoti.Auth.CryptoEngine.LoadRsaKey(stream);
}
const string sandboxClientSdkid = "your SDK ID";
SandboxClient sandboxClient = new SandboxClientBuilder()
.WithClientSdkId(sandboxClientSdkid)
.WithKeyPair(keyPair)
.Build();
SandboxAgeVerification ageVerification = new SandboxAgeVerificationBuilder()
.WithDateOfBirth(new DateTime(2001, 12, 31))
.WithAgeOver(18)
.Build();
YotiTokenRequest tokenRequest = new YotiTokenRequestBuilder()
.WithRememberMeId("some Remember Me ID")
.WithGivenNames("some given names")
.WithFamilyName("some family name")
.WithFullName("some full name")
.WithDateOfBirth(new DateTime(1980, 10, 30))
.WithAgeVerification(ageVerification)
.WithGender("some gender")
.WithPhoneNumber("some phone number")
.WithNationality("some nationality")
.WithStructuredPostalAddress(Newtonsoft.Json.JsonConvert.SerializeObject(new
{
building_number = 1,
address_line1 = "some address"
}))
.WithBase64Selfie(Convert.ToBase64String(Encoding.UTF8.GetBytes("some base64 encoded selfie")))
.WithEmailAddress("some@email")
.WithDocumentDetails("PASSPORT USA 1234abc")
.Build();
var sandboxOneTimeUseToken = sandboxClient.SetupSharingProfile(tokenRequest);
var yotiClient = new YotiClient(new HttpClient(), sandboxClientSdkid, keyPair);
Uri sandboxUri = new UriBuilder(
"https",
"api.yoti.com",
443,
"sandbox/v1").Uri;
yotiClient.OverrideApiUri(sandboxUri);
ActivityDetails activityDetails = yotiClient.GetActivityDetails(sandboxOneTimeUseToken);
// Perform tests
Assert.AreEqual("some@email", activityDetails.Profile.EmailAddress.GetValue());
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 is compatible. |
.NET Standard | netstandard2.1 is compatible. |
.NET Framework | net48 is compatible. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 3.1
- Newtonsoft.Json (>= 12.0.3)
- Yoti (>= 3.3.1)
-
.NETFramework 4.8
- Newtonsoft.Json (>= 12.0.3)
- Yoti (>= 3.3.1)
-
.NETStandard 2.1
- Newtonsoft.Json (>= 12.0.3)
- Yoti (>= 3.3.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.