Skip to content
Closed
Show file tree
Hide file tree
Changes from 48 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
146d1ca
Merge pull request #430 from getyoti/SDK-2201-Add-support-to-fetch-th…
mehmet-yoti Apr 20, 2023
3b678a9
SDK-2238:added net-create-session work
mehmet-yoti Sep 29, 2023
c2735ea
SDK:2238 refatoring tests
mehmet-yoti Oct 5, 2023
57a6a7b
SDK:2238 refatoring tests
mehmet-yoti Oct 5, 2023
31db97b
Update WantedAttribute.cs
saurabh-yoti Oct 5, 2023
a4507ee
Update ShareSessionRequestBuilder.cs
saurabh-yoti Oct 5, 2023
99d192c
updated test franework version
mehmet-yoti Oct 5, 2023
f1f68c0
updated test franework version
mehmet-yoti Oct 5, 2023
adc51cf
updated test franework version
mehmet-yoti Oct 5, 2023
1288d3a
Update azure-pipelines.yml
mehmet-yoti Oct 6, 2023
51fcc0d
Merge pull request #438 from getyoti/SDK-2238-net-create-session
mehmet-yoti Oct 6, 2023
948a5eb
SDK-2245: net retrieve session
mehmet-yoti Oct 6, 2023
1d111af
SDK-2245: net retrieve session
mehmet-yoti Oct 6, 2023
5b2544e
SDK-2245: net retrieve session
mehmet-yoti Oct 6, 2023
1788b94
SDK-2245: update session response
mehmet-yoti Oct 10, 2023
9562647
SDK-2245: update session response
mehmet-yoti Oct 10, 2023
a27a3db
SDK-2245: update session response
mehmet-yoti Oct 16, 2023
6da1b85
SDK-2245: update session response
mehmet-yoti Oct 16, 2023
f7e3e19
Merge pull request #439 from getyoti/SDK-2245-net-retrieve-session
mehmet-yoti Oct 16, 2023
2ea167a
Sdk 2252 net create qr code (#441)
mehmet-yoti Jan 10, 2024
cce170c
Sdk 2257 net retrieve qr code (#442)
mehmet-yoti Jan 10, 2024
e72a8c5
IN-5590: Update support link (#437)
nikhilPank Jan 10, 2024
2f774ad
Sdk 2363 net check for and add optional attribute configuration to sd…
mehmet-yoti Apr 25, 2024
b85fa27
Bump Google.Protobuf from 3.21.3 to 3.22.0 (#425)
dependabot[bot] Apr 25, 2024
9ce5386
Bump Microsoft.CodeAnalysis.CSharp.Workspaces, Microsoft.CodeAnalysis…
dependabot[bot] Apr 25, 2024
8633048
Bump Microsoft.VisualStudio.Azure.Containers.Tools.Targets (#459)
dependabot[bot] Apr 25, 2024
7b73f5a
SDK-2264 share v2 net-retrieve-receipt (#457)
mehmet-yoti Apr 25, 2024
642a010
Sdk 2416 update for json generation method (#463)
mehmet-yoti May 13, 2024
b7e9b97
SDK-2466 added notification builder and test (#468)
mehmet-yoti Jun 28, 2024
39a4566
SDK-2354 added error details and related tests (#467)
mehmet-yoti Jun 28, 2024
ebfe197
SDK-2374 added failure reason info to idv and added tests (#466)
mehmet-yoti Jun 28, 2024
76df6b8
SDK-2382: Update IDV example project defaults (#440)
nikhilPank Jun 28, 2024
4eac834
Create and Get Qr Methods Added
msepici Nov 21, 2024
dd6beb8
added getSession method
mehmet-yoti Mar 7, 2025
e566e3a
Added unit tests
mehmet-yoti Jun 27, 2025
9e07572
Update azure-pipelines.yml
mehmet-yoti Jun 27, 2025
e00ca73
Update azure-pipelines.yml
mehmet-yoti Jun 27, 2025
5089a60
Update azure-pipelines.yml
mehmet-yoti Jun 27, 2025
7cac72d
Update azure-pipelines.yml
mehmet-yoti Jun 27, 2025
73b33a3
updated pipeline
mehmet-yoti Jun 27, 2025
f382a0b
updated pipeline
mehmet-yoti Jun 27, 2025
80717bb
updated pipeline
mehmet-yoti Jun 27, 2025
b826690
updated pipeline
mehmet-yoti Jun 27, 2025
80727e3
Update test/Yoti.Auth.Tests/DigitalIdentityClientEngineTests.cs
mehmet-yoti Jun 27, 2025
8bf94c0
updated frame url
mehmet-yoti Jun 27, 2025
8a899a9
Update test/Yoti.Auth.Tests/DigitalIdentityClientEngineTests.cs
mehmet-yoti Jun 27, 2025
e7e4b24
updated tests
mehmet-yoti Jun 27, 2025
b39b573
Merge pull request #476 from getyoti/CreateQrFix
mehmet-yoti Jul 1, 2025
0b3f25c
added create-qr sample
mehmet-yoti Sep 26, 2025
90d5637
updated createqr with sessionid
mehmet-yoti Oct 2, 2025
d62f7e2
updated create qr core method
mehmet-yoti Oct 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ assignees: ''
#
# There's a better way to get help!
#
# Send your questions or issues to sdksupport@yoti.com
# Send your questions or issues to https://support.yoti.com
#
#
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ Backup*/
# except build/, which is used as an MSBuild target.
!**/packages/build/

.DS_STORE
.DS_Store

# Coverage
OpenCover/

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ The Yoti SDK can be used for the following products, follow the links for more i

## Support

For any questions or support please email [[email protected]](mailto:clientsupport@yoti.com).
For any questions or support please contact us here: https://support.yoti.com
Please provide the following to get you up and working as quickly as possible:

* Computer type
Expand Down
4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ steps:
scannerMode: 'MSBuild'
projectKey: 'getyoti:dotnet'
projectName: '.NET SDK'
projectVersion: '3.11.0'
projectVersion: '3.18.0'
extraProperties: |
sonar.cs.opencover.reportsPaths="**/coverage.opencover.xml"
sonar.links.scm = https://github.com/getyoti/yoti-dotnet-sdk
sonar.exclusions = src/Yoti.Auth/ProtoBuf/**,src/Examples/**,**/obj/**,**/*.dll
sonar.exclusions = src/Yoti.Auth/ProtoBuf/**,src/Examples/**,**/obj/**,**/*.dll,src/Yoti.Auth/DigitalIdentity/**
displayName: SonarCloud Prepare Analysis

- task: NuGetToolInstaller@1
Expand Down
4 changes: 2 additions & 2 deletions src/Examples/Aml/AmlExample/AmlExample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand All @@ -12,7 +12,7 @@

<ItemGroup>
<PackageReference Include="DotNetEnv" Version="2.3.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

<ItemGroup>
Expand Down
25 changes: 25 additions & 0 deletions src/Examples/DigitalIdentity/DigitalIdentity/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/azds.yaml
**/bin
**/charts
**/docker-compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md
2 changes: 2 additions & 0 deletions src/Examples/DigitalIdentity/DigitalIdentity/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
YOTI_CLIENT_SDK_ID=yourClientSdkId
YOTI_KEY_FILE_PATH=yourKeyFilePath
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
using System;
using System.IO;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using Yoti.Auth;
using Yoti.Auth.DigitalIdentity;
using Yoti.Auth.DigitalIdentity.Policy;

namespace DigitalIdentityExample.Controllers
{
public class AdvancedIdentityShareController : Controller
{
private readonly string _clientSdkId;
private readonly ILogger _logger;
public AdvancedIdentityShareController(ILogger<AdvancedIdentityShareController> logger)
{
_logger = logger;

_clientSdkId = Environment.GetEnvironmentVariable("YOTI_CLIENT_SDK_ID");
_logger.LogInformation(string.Format("Yoti Client SDK ID='{0}'", _clientSdkId));
}

// GET: /advanced-identity-share
[Route("advanced-identity-share")]
public IActionResult DigitalIdentity()
{
try
{
string yotiKeyFilePath = Environment.GetEnvironmentVariable("YOTI_KEY_FILE_PATH");
_logger.LogInformation(
string.Format(
"yotiKeyFilePath='{0}'",
yotiKeyFilePath));

StreamReader privateKeyStream = System.IO.File.OpenText(yotiKeyFilePath);

var yotiClient = new DigitalIdentityClient(_clientSdkId, privateKeyStream);

string advancedIdentityProfileJson = @"
{
""profiles"": [
{
""trust_framework"": ""YOTI_GLOBAL"",
""schemes"": [
{
""label"": ""identity-AL-L1"",
""type"": ""IDENTITY"",
""objective"": ""AL_L1"",

},
{
""label"": ""identity-AL-M1"",
""type"": ""IDENTITY"",
""objective"": ""AL_M1"",

}
]
}
]

}";

var advancedIdentityProfile = JsonConvert.DeserializeObject<AdvancedIdentityProfile>(advancedIdentityProfileJson);

var policy = new PolicyBuilder()
.WithAdvancedIdentityProfileRequirements(advancedIdentityProfile)
.Build();

var sessionReq = new ShareSessionRequestBuilder().WithPolicy(policy)
.WithRedirectUri("https:/www.yoti.com")
.Build();

var SessionResult = yotiClient.CreateShareSession(sessionReq);

var sharedReceiptResponse = new SharedReceiptResponse();
ViewBag.YotiClientSdkId = _clientSdkId;
ViewBag.sessionID = SessionResult.Id;

return View("AdvancedIdentityShare", sharedReceiptResponse);
}
catch (Exception e)
{
_logger.LogError(
exception: e,
message: e.Message);

TempData["Error"] = e.Message;
TempData["InnerException"] = e.InnerException?.Message;
return RedirectToAction("Error", "Success");
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
using System;
using System.IO;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Yoti.Auth;
using Yoti.Auth.DigitalIdentity;
using Yoti.Auth.DigitalIdentity.Policy;

namespace DigitalIdentityExample.Controllers
{
public class HomeController : Controller
{
private readonly string _clientSdkId;
private readonly ILogger _logger;
public HomeController(ILogger<HomeController> logger)
{
_logger = logger;

_clientSdkId = Environment.GetEnvironmentVariable("YOTI_CLIENT_SDK_ID");
_logger.LogInformation(string.Format("Yoti Client SDK ID='{0}'", _clientSdkId));
}

// GET: /generate-share
[Route("generate-share")]
public IActionResult DigitalIdentity()
{
try
{
string yotiKeyFilePath = Environment.GetEnvironmentVariable("YOTI_KEY_FILE_PATH");
_logger.LogInformation(
string.Format(
"yotiKeyFilePath='{0}'",
yotiKeyFilePath));

StreamReader privateKeyStream = System.IO.File.OpenText(yotiKeyFilePath);

var yotiClient = new DigitalIdentityClient(_clientSdkId, privateKeyStream);

var givenNamesWantedAttribute = new WantedAttributeBuilder()
.WithName("given_names")
.WithOptional(false)
.Build();

var notification = new NotificationBuilder()
.WithUrl("https://example.com/webhook")
.WithMethod("POST")
.WithVerifyTls(true)
.Build();

var policy = new PolicyBuilder()
.WithWantedAttribute(givenNamesWantedAttribute)
.WithFullName()
.WithEmail()
.WithPhoneNumber()
.WithSelfie()
.WithAgeOver(18)
.WithNationality()
.WithGender()
.WithDocumentDetails()
.WithDocumentImages()
.Build();

var sessionReq = new ShareSessionRequestBuilder().WithPolicy(policy)
.WithNotification(notification)
.WithRedirectUri("https:/www.yoti.com").WithSubject(new
{
subject_id = "some_subject_id_string"
}).Build();

var SessionResult = yotiClient.CreateShareSession(sessionReq);

var sharedReceiptResponse = new SharedReceiptResponse();
ViewBag.YotiClientSdkId = _clientSdkId;
ViewBag.sessionID = SessionResult.Id;

return View("DigitalIdentity", sharedReceiptResponse);
}
catch (Exception e)
{
_logger.LogError(
exception: e,
message: e.Message);

TempData["Error"] = e.Message;
TempData["InnerException"] = e.InnerException?.Message;
return RedirectToAction("Error", "Success");
}
}
}
}
Loading