Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,6 @@ Thumbs.db
celerybeat-schedule
*.sqlite3
*.db
sdk/java/target/
bin/
obj/
4 changes: 2 additions & 2 deletions sdk/dotnet/src/IdentityCore/IdentityCoreClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public sealed class VerificationsResource(IdentityCoreClient client)
public Task<JsonElement> ListCursorAsync(string? status = null, string? externalReference = null, string? cursor = null, int? limit = null, CancellationToken token = default) => client.SendAsync(HttpMethod.Get, "/verifications/" + Query(new() { ["status"] = status, ["external_reference"] = externalReference, ["cursor"] = cursor, ["limit"] = limit }), cancellationToken: token);
public async IAsyncEnumerable<JsonElement> IterateAsync(string? status = null, string? externalReference = null, int pageSize = 100, [EnumeratorCancellation] CancellationToken token = default)
{
string? cursor=null; do { var result=await ListCursorAsync(status,externalReference,cursor,pageSize,token); foreach(var item in result.GetProperty("results").EnumerateArray()) yield return item.Clone(); cursor=result.GetProperty("pagination").GetProperty("next_cursor").GetString(); } while(!string.IsNullOrEmpty(cursor));
string? cursor = null; do { var result = await ListCursorAsync(status, externalReference, cursor, pageSize, token); foreach (var item in result.GetProperty("results").EnumerateArray()) yield return item.Clone(); cursor = result.GetProperty("pagination").GetProperty("next_cursor").GetString(); } while (!string.IsNullOrEmpty(cursor));
}
public Task<JsonElement> RetrieveAsync(string id, CancellationToken token = default) => client.SendAsync(HttpMethod.Get, "/verifications/" + Segment(id), cancellationToken: token);
public Task<JsonElement> ResultAsync(string id, CancellationToken token = default) => client.SendAsync(HttpMethod.Get, "/verifications/" + Segment(id) + "/result", cancellationToken: token);
Expand All @@ -116,5 +116,5 @@ public async IAsyncEnumerable<JsonElement> IterateAsync(string? status = null, s
public Task<JsonElement> EvidenceReportAsync(string id, CancellationToken token = default) => client.SendAsync(HttpMethod.Get, "/verifications/" + Segment(id) + "/evidence-report", cancellationToken: token);
}
private static string Segment(string value) => Uri.EscapeDataString(value);
private static string Query(Dictionary<string,object?> values) { var parts=values.Where(x=>x.Value is not null && !string.IsNullOrWhiteSpace(x.Value.ToString())).Select(x=>$"{Uri.EscapeDataString(x.Key)}={Uri.EscapeDataString(x.Value!.ToString()!)}"); var q=string.Join("&",parts); return q.Length==0?"":"?"+q; }
private static string Query(Dictionary<string, object?> values) { var parts = values.Where(x => x.Value is not null && !string.IsNullOrWhiteSpace(x.Value.ToString())).Select(x => $"{Uri.EscapeDataString(x.Key)}={Uri.EscapeDataString(x.Value!.ToString()!)}"); var q = string.Join("&", parts); return q.Length == 0 ? "" : "?" + q; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")]
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Reflection;

[assembly: System.Reflection.AssemblyCompanyAttribute("IdentityCore")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyDescriptionAttribute("Server-side .NET SDK for the IdentityCore REST API.")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.2.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("0.2.0+1d978a7d4e368f59a9d516ad09a0ff8cb1a4ad45")]
[assembly: System.Reflection.AssemblyProductAttribute("IdentityCore")]
[assembly: System.Reflection.AssemblyTitleAttribute("IdentityCore")]
[assembly: System.Reflection.AssemblyVersionAttribute("0.2.0.0")]

// Generated by the MSBuild WriteCodeFragment class.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
36bef0f3dbe058e5b24a7540e2f113b231fbefbdf0223e4573fafee512e4552b
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
is_global = true
build_property.TargetFramework = net8.0
build_property.TargetFrameworkIdentifier = .NETCoreApp
build_property.TargetFrameworkVersion = v8.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = IdentityCore
build_property.ProjectDir = /home/quarjo/IdentityCore/sdk/dotnet/src/IdentityCore/
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.EffectiveAnalysisLevelStyle = 8.0
build_property.EnableCodeStyleSeverity =
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// <auto-generated/>
global using System;
global using System.Collections.Generic;
global using System.IO;
global using System.Linq;
global using System.Net.Http;
global using System.Threading;
global using System.Threading.Tasks;
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"format": 1,
"restore": {
"/home/quarjo/IdentityCore/sdk/dotnet/src/IdentityCore/IdentityCore.csproj": {}
},
"projects": {
"/home/quarjo/IdentityCore/sdk/dotnet/src/IdentityCore/IdentityCore.csproj": {
"version": "0.2.0",
"restore": {
"projectUniqueName": "/home/quarjo/IdentityCore/sdk/dotnet/src/IdentityCore/IdentityCore.csproj",
"projectName": "IdentityCore",
"projectPath": "/home/quarjo/IdentityCore/sdk/dotnet/src/IdentityCore/IdentityCore.csproj",
"packagesPath": "/home/quarjo/.nuget/packages/",
"outputPath": "/home/quarjo/IdentityCore/sdk/dotnet/src/IdentityCore/obj/",
"projectStyle": "PackageReference",
"configFilePaths": [
"/home/quarjo/.nuget/NuGet/NuGet.Config"
],
"originalTargetFrameworks": [
"net8.0"
],
"sources": {
"/usr/lib/dotnet/library-packs": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net8.0": {
"targetAlias": "net8.0",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
},
"restoreAuditProperties": {
"enableAudit": "true",
"auditLevel": "low",
"auditMode": "direct"
},
"SdkAnalysisLevel": "10.0.100"
},
"frameworks": {
"net8.0": {
"targetAlias": "net8.0",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"downloadDependencies": [
{
"name": "Microsoft.AspNetCore.App.Ref",
"version": "[8.0.29, 8.0.29]"
},
{
"name": "Microsoft.NETCore.App.Ref",
"version": "[8.0.29, 8.0.29]"
}
],
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "/usr/lib/dotnet/sdk/10.0.110/PortableRuntimeIdentifierGraph.json"
}
}
}
}
}
15 changes: 15 additions & 0 deletions sdk/dotnet/src/IdentityCore/obj/IdentityCore.csproj.nuget.g.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/home/quarjo/.nuget/packages/</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/home/quarjo/.nuget/packages/</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">7.0.0</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="/home/quarjo/.nuget/packages/" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
83 changes: 83 additions & 0 deletions sdk/dotnet/src/IdentityCore/obj/project.assets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"version": 3,
"targets": {
"net8.0": {}
},
"libraries": {},
"projectFileDependencyGroups": {
"net8.0": []
},
"packageFolders": {
"/home/quarjo/.nuget/packages/": {}
},
"project": {
"version": "0.2.0",
"restore": {
"projectUniqueName": "/home/quarjo/IdentityCore/sdk/dotnet/src/IdentityCore/IdentityCore.csproj",
"projectName": "IdentityCore",
"projectPath": "/home/quarjo/IdentityCore/sdk/dotnet/src/IdentityCore/IdentityCore.csproj",
"packagesPath": "/home/quarjo/.nuget/packages/",
"outputPath": "/home/quarjo/IdentityCore/sdk/dotnet/src/IdentityCore/obj/",
"projectStyle": "PackageReference",
"configFilePaths": [
"/home/quarjo/.nuget/NuGet/NuGet.Config"
],
"originalTargetFrameworks": [
"net8.0"
],
"sources": {
"/usr/lib/dotnet/library-packs": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net8.0": {
"targetAlias": "net8.0",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
},
"restoreAuditProperties": {
"enableAudit": "true",
"auditLevel": "low",
"auditMode": "direct"
},
"SdkAnalysisLevel": "10.0.100"
},
"frameworks": {
"net8.0": {
"targetAlias": "net8.0",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"downloadDependencies": [
{
"name": "Microsoft.AspNetCore.App.Ref",
"version": "[8.0.29, 8.0.29]"
},
{
"name": "Microsoft.NETCore.App.Ref",
"version": "[8.0.29, 8.0.29]"
}
],
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "/usr/lib/dotnet/sdk/10.0.110/PortableRuntimeIdentifierGraph.json"
}
}
}
}
11 changes: 11 additions & 0 deletions sdk/dotnet/src/IdentityCore/obj/project.nuget.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": 2,
"dgSpecHash": "yoxIosX4mdI=",
"success": true,
"projectFilePath": "/home/quarjo/IdentityCore/sdk/dotnet/src/IdentityCore/IdentityCore.csproj",
"expectedPackageFiles": [
"/home/quarjo/.nuget/packages/microsoft.netcore.app.ref/8.0.29/microsoft.netcore.app.ref.8.0.29.nupkg.sha512",
"/home/quarjo/.nuget/packages/microsoft.aspnetcore.app.ref/8.0.29/microsoft.aspnetcore.app.ref.8.0.29.nupkg.sha512"
],
"logs": []
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")]
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Reflection;

[assembly: System.Reflection.AssemblyCompanyAttribute("IdentityCore.Tests")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+1d978a7d4e368f59a9d516ad09a0ff8cb1a4ad45")]
[assembly: System.Reflection.AssemblyProductAttribute("IdentityCore.Tests")]
[assembly: System.Reflection.AssemblyTitleAttribute("IdentityCore.Tests")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

// Generated by the MSBuild WriteCodeFragment class.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
028c661352dff2b730c947216f80910343d71bea93f0fe018e3a3faf03f3d712
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
is_global = true
build_property.TargetFramework = net8.0
build_property.TargetFrameworkIdentifier = .NETCoreApp
build_property.TargetFrameworkVersion = v8.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = IdentityCore.Tests
build_property.ProjectDir = /home/quarjo/IdentityCore/sdk/dotnet/tests/IdentityCore.Tests/
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.EffectiveAnalysisLevelStyle = 8.0
build_property.EnableCodeStyleSeverity =
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// <auto-generated/>
global using System;
global using System.Collections.Generic;
global using System.IO;
global using System.Linq;
global using System.Net.Http;
global using System.Threading;
global using System.Threading.Tasks;
Binary file not shown.
Binary file not shown.
Loading
Loading