Skip to content

Commit 6df3aca

Browse files
committed
2 parents 8304f27 + 031995a commit 6df3aca

30 files changed

+422
-1641
lines changed

ExamplesAPIType.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ public enum ExamplesApiType
4949
/// </summary>
5050
[Description("web")]
5151
WebForms = 6,
52+
53+
/// <summary>
54+
/// Notary API
55+
/// </summary>
56+
[Description("neg")]
57+
Notary = 7
5258
}
5359

5460
public static class ExamplesApiTypeExtensions

ExamplesApiTypeExtensions.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ public enum ExamplesApiType
5555
/// </summary>
5656
[Description("mae")]
5757
Maestro = 7,
58+
59+
/// <summary>
60+
/// Notary API
61+
/// </summary>
62+
[Description("neg")]
63+
Notary = 8,
5864
}
5965

6066
public static class ExamplesApiTypeExtensions

Quick_ACG/Program.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ public static IWebHostBuilder CreateWebHostBuilder(string[] args)
2828
{
2929
path = Path.GetFullPath(@"..\\launcher-csharp\\appsettings.json");
3030
}
31-
31+
3232

3333
config.AddJsonFile(path,
34-
optional: false,
35-
reloadOnChange: true);
34+
optional: false,
35+
reloadOnChange: true);
3636
});
3737
return builder;
3838
}

Quick_ACG/Quick_ACG.csproj

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,17 @@
4747
</ItemGroup>
4848

4949
<ItemGroup>
50-
<PackageReference Include="DocuSign.Admin" Version="2.0.0-rc4" />
51-
<PackageReference Include="DocuSign.eSign.dll" Version="8.0.0-rc2" />
50+
<PackageReference Include="DocuSign.Admin" Version="2.0.0" />
51+
<PackageReference Include="DocuSign.eSign.dll" Version="8.0.0" />
5252
<PackageReference Include="Microsoft.AspNetCore.Session" Version="2.2.0" />
53-
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.18" />
54-
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.29">
53+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.10" />
54+
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.10">
5555
<PrivateAssets>all</PrivateAssets>
5656
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
5757
</PackageReference>
58-
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="6.0.0" />
59-
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.16" />
60-
<PackageReference Include="System.Configuration.ConfigurationManager" Version="7.0.0" />
58+
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.1" />
59+
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="8.0.6" />
60+
<PackageReference Include="System.Configuration.ConfigurationManager" Version="8.0.1" />
6161
</ItemGroup>
6262

6363
<ItemGroup>

Quick_ACG/Startup.cs

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
using Microsoft.Extensions.DependencyInjection;
1313
using Microsoft.Extensions.Hosting;
1414
using Newtonsoft.Json.Linq;
15+
16+
using System.Threading.Tasks;
1517
using System;
1618
using System.Net.Http;
1719
using System.Net.Http.Headers;
@@ -95,6 +97,12 @@ public void ConfigureServices(IServiceCollection services)
9597
options.ClaimActions.MapJsonKey("expires_in", "expires_in");
9698
options.Events = new OAuthEvents
9799
{
100+
OnRedirectToAuthorizationEndpoint = redirectContext =>
101+
{
102+
redirectContext.Options.UsePkce = this.Configuration["PkceFailed"] == null;
103+
redirectContext.HttpContext.Response.Redirect(redirectContext.RedirectUri);
104+
return Task.FromResult(0);
105+
},
98106
OnCreatingTicket = async context =>
99107
{
100108
var request = new HttpRequestMessage(HttpMethod.Get, context.Options.UserInformationEndpoint);
@@ -113,12 +121,27 @@ public void ConfigureServices(IServiceCollection services)
113121
{
114122
context.RunClaimActions(payload.RootElement);
115123
}
116-
}
124+
},
125+
OnRemoteFailure = async context =>
126+
{
127+
var redirectContext = new RedirectContext<OAuthOptions>(
128+
context.HttpContext,
129+
context.Scheme,
130+
options,
131+
context.Properties,
132+
this.Configuration["RedirectUrl"]);
133+
134+
this.Configuration["PkceFailed"] = "true";
135+
136+
await options.Events.OnRedirectToAuthorizationEndpoint(redirectContext);
137+
138+
context.HandleResponse();
139+
},
117140
};
118141
});
119142
}
120143

121-
#nullable enable
144+
#nullable enable
122145
private string? ExtractDefaultAccountValue(JsonElement obj, string key)
123146
{
124147
if (!obj.TryGetProperty("accounts", out var accounts))
@@ -166,7 +189,7 @@ public void ConfigureServices(IServiceCollection services)
166189

167190
return keyValue;
168191
}
169-
#nullable disable
192+
#nullable disable
170193

171194
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
172195
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ steps:
107107
command: build
108108
repository: 'launcher-automation-csharp'
109109
dockerfile: '$(Build.SourcesDirectory)/code-examples-csharp-private/Dockerfile'
110-
buildContext: '$(Build.SourcesDirectory)/code-examples-csharp-private '
110+
buildContext: '$(Build.SourcesDirectory)/code-examples-csharp-private'
111111
tags: |
112112
latest
113113

launcher-csharp/Common/RequestItemsService.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,10 @@ public string IdentifyApiOfCodeExample(string eg)
289289
{
290290
currentApiType = ExamplesApiType.WebForms.ToString();
291291
}
292+
else if (eg.Contains(ExamplesApiType.Notary.ToKeywordString()))
293+
{
294+
currentApiType = ExamplesApiType.Notary.ToString();
295+
}
292296
else
293297
{
294298
currentApiType = ExamplesApiType.ESignature.ToString();

launcher-csharp/Maestro/Controllers/CancelWorkflow.cs

Lines changed: 0 additions & 113 deletions
This file was deleted.

launcher-csharp/Maestro/Controllers/GetWorkflow.cs

Lines changed: 0 additions & 102 deletions
This file was deleted.

0 commit comments

Comments
 (0)