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
2 changes: 2 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
<NoWarn>$(NoWarn);NU1507</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Altinn.ApiClients.Maskinporten" Version="9.2.1" />
<PackageVersion Include="coverlet.collector" Version="6.0.4" />
<PackageVersion Include="Duende.AccessTokenManagement" Version="4.0.1" />
<PackageVersion Include="Duende.AccessTokenManagement.OpenIdConnect" Version="4.0.1" />
<PackageVersion Include="Duende.AspNetCore.Authentication.JwtBearer" Version="0.2.0" />
<PackageVersion Include="Duende.IdentityModel" Version="7.1.0" />
<PackageVersion Include="Microsoft.AspNetCore.Authorization" Version="9.0.9" />
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="9.0.5" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="9.0.8" />
Expand Down
100 changes: 67 additions & 33 deletions Fhi.AuthExtensions.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 18
VisualStudioVersion = 18.0.11018.127 d18.0
# Visual Studio Version 17
VisualStudioVersion = 17.14.36616.10
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{02410E46-D7E9-4870-8BEE-2667E121C388}"
ProjectSection(SolutionItems) = preProject
Expand All @@ -20,8 +20,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
fhi.png = fhi.png
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Client", "Client", "{95D7F6A2-3153-4DEA-A5B2-99FB116ECED7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Fhi.Authentication.Extensions", "src\Fhi.Authentication.Extensions\Fhi.Authentication.Extensions.csproj", "{3D40162D-4861-1586-9DF4-29AC796D09D7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Fhi.Authorization.Extensions", "src\Fhi.Authorization.Extensions\Fhi.Authorization.Extensions.csproj", "{E895929D-F0B6-46CC-A8DA-4CDCBD0E813F}"
Expand All @@ -37,15 +35,29 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Fhi.Authorization.Extension
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Fhi.Auth.IntegrationTests", "tests\Fhi.Auth.IntegrationTests\Fhi.Auth.IntegrationTests.csproj", "{50310A01-6FFB-48FD-8036-2884D8003D21}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Client.BlazorInteractiveServer", "samples\Fhi.Samples.BlazorInteractiveServer\Client.BlazorInteractiveServer.csproj", "{D6DF8F04-3458-ECA8-244B-F678F02283B9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Api.WebApi", "samples\Fhi.Samples.WebApi\Api.WebApi.csproj", "{01B67BBE-6A7D-D850-E162-18DBE690CC22}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Client.ClientCredentialsWorkers", "samples\Fhi.Samples.ClientCredentialsWorker\Client.ClientCredentialsWorkers.csproj", "{A60812FD-3201-987D-6E83-AEB5344B6582}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "M2M.Manuel", "samples\Fhi.Samples.M2M.Manuel\M2M.Manuel.csproj", "{E59E1D43-9DAB-43D6-B8FA-6FADA143E09D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Clients", "Clients", "{EA8AA50F-AE10-290C-ABE9-07EF3D2129A5}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Apis", "Apis", "{EABD670A-AAEF-5194-AABE-BF5B7070E21E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "M2M.Host.Maskinporten", "samples\Fhi.Samples.M2M.Maskinporten\M2M.Host.Maskinporten.csproj", "{20E756C5-D704-4CCD-95FF-AAD77DD63F70}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Fhi.Auth.EndToEndTests", "tests\Fhi.Auth.EndToEndTests\Fhi.Auth.EndToEndTests.csproj", "{7A95307A-BF60-6E79-68A1-0D890946C304}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "M2M.Host.MultipleClients", "samples\Fhi.Samples.M2M.MultipleClients\M2M.Host.MultipleClients.csproj", "{A0E96F9C-A762-CC57-89D1-3E282BEBB719}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "M2M.Host.HelseID", "samples\Fhi.Samples.M2M.HelseID\M2M.Host.HelseID.csproj", "{CF962E72-C511-653D-D4DA-E84EA732ADD9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EndUser.BlazorInteractiveServer", "samples\Fhi.Samples.EndUser.BlazorInteractiveServer\EndUser.BlazorInteractiveServer.csproj", "{86C843B8-A173-873B-D4D6-4004C852DFEC}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "EndUser.Angular", "EndUser.Angular", "{1E7B8F3D-0617-8A9E-DCF4-EFF245D35583}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Fhi.Samples.Angular.BFFApi", "samples\Fhi.Samples.AngularBFF\Fhi.Samples.Angular.BFFApi\Fhi.Samples.Angular.BFFApi.csproj", "{4BD31A58-9C65-1A32-D54F-FAA2868BC0D3}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Fhi.Samples.Angular.BFFApi", "samples\Fhi.Samples.EndUser.AngularBFF\Fhi.Samples.Angular.EndUser.BFFApi\Fhi.Samples.Angular.BFFApi.csproj", "{51511375-7BC3-214E-F679-94106FBFDE96}"
EndProject
Project("{54A90642-561A-4BB1-A94E-469ADEE60C69}") = "Fhi.Samples.Angular.Client", "samples\Fhi.Samples.AngularBFF\Fhi.Samples.Angular.Client\Fhi.Samples.Angular.Client.esproj", "{0C1902EB-9D39-D424-4D5A-6F842490C576}"
Project("{54A90642-561A-4BB1-A94E-469ADEE60C69}") = "Fhi.Samples.Angular.Client", "samples\Fhi.Samples.EndUser.AngularBFF\Fhi.Samples.Angular.EndUser.Client\Fhi.Samples.Angular.Client.esproj", "{06358B45-EFD0-FD65-D50D-DF4C93B679FB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -73,44 +85,66 @@ Global
{50310A01-6FFB-48FD-8036-2884D8003D21}.Debug|Any CPU.Build.0 = Debug|Any CPU
{50310A01-6FFB-48FD-8036-2884D8003D21}.Release|Any CPU.ActiveCfg = Release|Any CPU
{50310A01-6FFB-48FD-8036-2884D8003D21}.Release|Any CPU.Build.0 = Release|Any CPU
{D6DF8F04-3458-ECA8-244B-F678F02283B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D6DF8F04-3458-ECA8-244B-F678F02283B9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D6DF8F04-3458-ECA8-244B-F678F02283B9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D6DF8F04-3458-ECA8-244B-F678F02283B9}.Release|Any CPU.Build.0 = Release|Any CPU
{01B67BBE-6A7D-D850-E162-18DBE690CC22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{01B67BBE-6A7D-D850-E162-18DBE690CC22}.Debug|Any CPU.Build.0 = Debug|Any CPU
{01B67BBE-6A7D-D850-E162-18DBE690CC22}.Release|Any CPU.ActiveCfg = Release|Any CPU
{01B67BBE-6A7D-D850-E162-18DBE690CC22}.Release|Any CPU.Build.0 = Release|Any CPU
{A60812FD-3201-987D-6E83-AEB5344B6582}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A60812FD-3201-987D-6E83-AEB5344B6582}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A60812FD-3201-987D-6E83-AEB5344B6582}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A60812FD-3201-987D-6E83-AEB5344B6582}.Release|Any CPU.Build.0 = Release|Any CPU
{4BD31A58-9C65-1A32-D54F-FAA2868BC0D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4BD31A58-9C65-1A32-D54F-FAA2868BC0D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4BD31A58-9C65-1A32-D54F-FAA2868BC0D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4BD31A58-9C65-1A32-D54F-FAA2868BC0D3}.Release|Any CPU.Build.0 = Release|Any CPU
{0C1902EB-9D39-D424-4D5A-6F842490C576}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0C1902EB-9D39-D424-4D5A-6F842490C576}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0C1902EB-9D39-D424-4D5A-6F842490C576}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{0C1902EB-9D39-D424-4D5A-6F842490C576}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0C1902EB-9D39-D424-4D5A-6F842490C576}.Release|Any CPU.Build.0 = Release|Any CPU
{0C1902EB-9D39-D424-4D5A-6F842490C576}.Release|Any CPU.Deploy.0 = Release|Any CPU
{E59E1D43-9DAB-43D6-B8FA-6FADA143E09D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E59E1D43-9DAB-43D6-B8FA-6FADA143E09D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E59E1D43-9DAB-43D6-B8FA-6FADA143E09D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E59E1D43-9DAB-43D6-B8FA-6FADA143E09D}.Release|Any CPU.Build.0 = Release|Any CPU
{20E756C5-D704-4CCD-95FF-AAD77DD63F70}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{20E756C5-D704-4CCD-95FF-AAD77DD63F70}.Debug|Any CPU.Build.0 = Debug|Any CPU
{20E756C5-D704-4CCD-95FF-AAD77DD63F70}.Release|Any CPU.ActiveCfg = Release|Any CPU
{20E756C5-D704-4CCD-95FF-AAD77DD63F70}.Release|Any CPU.Build.0 = Release|Any CPU
{7A95307A-BF60-6E79-68A1-0D890946C304}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7A95307A-BF60-6E79-68A1-0D890946C304}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7A95307A-BF60-6E79-68A1-0D890946C304}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7A95307A-BF60-6E79-68A1-0D890946C304}.Release|Any CPU.Build.0 = Release|Any CPU
{A0E96F9C-A762-CC57-89D1-3E282BEBB719}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A0E96F9C-A762-CC57-89D1-3E282BEBB719}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A0E96F9C-A762-CC57-89D1-3E282BEBB719}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A0E96F9C-A762-CC57-89D1-3E282BEBB719}.Release|Any CPU.Build.0 = Release|Any CPU
{CF962E72-C511-653D-D4DA-E84EA732ADD9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CF962E72-C511-653D-D4DA-E84EA732ADD9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CF962E72-C511-653D-D4DA-E84EA732ADD9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CF962E72-C511-653D-D4DA-E84EA732ADD9}.Release|Any CPU.Build.0 = Release|Any CPU
{86C843B8-A173-873B-D4D6-4004C852DFEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{86C843B8-A173-873B-D4D6-4004C852DFEC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{86C843B8-A173-873B-D4D6-4004C852DFEC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{86C843B8-A173-873B-D4D6-4004C852DFEC}.Release|Any CPU.Build.0 = Release|Any CPU
{51511375-7BC3-214E-F679-94106FBFDE96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{51511375-7BC3-214E-F679-94106FBFDE96}.Debug|Any CPU.Build.0 = Debug|Any CPU
{51511375-7BC3-214E-F679-94106FBFDE96}.Release|Any CPU.ActiveCfg = Release|Any CPU
{51511375-7BC3-214E-F679-94106FBFDE96}.Release|Any CPU.Build.0 = Release|Any CPU
{06358B45-EFD0-FD65-D50D-DF4C93B679FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{06358B45-EFD0-FD65-D50D-DF4C93B679FB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{06358B45-EFD0-FD65-D50D-DF4C93B679FB}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{06358B45-EFD0-FD65-D50D-DF4C93B679FB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{06358B45-EFD0-FD65-D50D-DF4C93B679FB}.Release|Any CPU.Build.0 = Release|Any CPU
{06358B45-EFD0-FD65-D50D-DF4C93B679FB}.Release|Any CPU.Deploy.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{95D7F6A2-3153-4DEA-A5B2-99FB116ECED7} = {E1C34547-3ACD-4E54-BB6A-3E5DCBFFFF02}
{3D40162D-4861-1586-9DF4-29AC796D09D7} = {02410E46-D7E9-4870-8BEE-2667E121C388}
{E895929D-F0B6-46CC-A8DA-4CDCBD0E813F} = {02410E46-D7E9-4870-8BEE-2667E121C388}
{74FE561C-B596-014B-90CE-501DD27B2A90} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
{80A70E21-66EC-41F3-B5BA-EB6F38275AE3} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
{50310A01-6FFB-48FD-8036-2884D8003D21} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
{D6DF8F04-3458-ECA8-244B-F678F02283B9} = {E1C34547-3ACD-4E54-BB6A-3E5DCBFFFF02}
{01B67BBE-6A7D-D850-E162-18DBE690CC22} = {E1C34547-3ACD-4E54-BB6A-3E5DCBFFFF02}
{A60812FD-3201-987D-6E83-AEB5344B6582} = {E1C34547-3ACD-4E54-BB6A-3E5DCBFFFF02}
{4BD31A58-9C65-1A32-D54F-FAA2868BC0D3} = {95D7F6A2-3153-4DEA-A5B2-99FB116ECED7}
{0C1902EB-9D39-D424-4D5A-6F842490C576} = {95D7F6A2-3153-4DEA-A5B2-99FB116ECED7}
{01B67BBE-6A7D-D850-E162-18DBE690CC22} = {EABD670A-AAEF-5194-AABE-BF5B7070E21E}
{E59E1D43-9DAB-43D6-B8FA-6FADA143E09D} = {EA8AA50F-AE10-290C-ABE9-07EF3D2129A5}
{EA8AA50F-AE10-290C-ABE9-07EF3D2129A5} = {E1C34547-3ACD-4E54-BB6A-3E5DCBFFFF02}
{EABD670A-AAEF-5194-AABE-BF5B7070E21E} = {E1C34547-3ACD-4E54-BB6A-3E5DCBFFFF02}
{20E756C5-D704-4CCD-95FF-AAD77DD63F70} = {EA8AA50F-AE10-290C-ABE9-07EF3D2129A5}
{7A95307A-BF60-6E79-68A1-0D890946C304} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
{A0E96F9C-A762-CC57-89D1-3E282BEBB719} = {EA8AA50F-AE10-290C-ABE9-07EF3D2129A5}
{CF962E72-C511-653D-D4DA-E84EA732ADD9} = {EA8AA50F-AE10-290C-ABE9-07EF3D2129A5}
{86C843B8-A173-873B-D4D6-4004C852DFEC} = {EA8AA50F-AE10-290C-ABE9-07EF3D2129A5}
{1E7B8F3D-0617-8A9E-DCF4-EFF245D35583} = {EA8AA50F-AE10-290C-ABE9-07EF3D2129A5}
{51511375-7BC3-214E-F679-94106FBFDE96} = {1E7B8F3D-0617-8A9E-DCF4-EFF245D35583}
{06358B45-EFD0-FD65-D50D-DF4C93B679FB} = {1E7B8F3D-0617-8A9E-DCF4-EFF245D35583}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {113A468C-B364-454A-BDF5-BE678F61C31A}
Expand Down
2 changes: 1 addition & 1 deletion Fhi.AuthExtensions.slnLaunch
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"Action": "Start"
},
{
"Path": "samples\\Fhi.Samples.ClientCredentialsWorker\\Client.ClientCredentialsWorkers.csproj",
"Path": "samples\\Fhi.Samples.ClientCredentialsWorker\\M2M.Host.MultipleClients.csproj",
"Action": "Start",
"DebugTarget": "MultipleClientVariant1"
}
Expand Down
155 changes: 11 additions & 144 deletions docs/code-lab/client-credentials/webserver-host-sample.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"id": "9d4568fc",
"metadata": {
"language_info": {
Expand All @@ -181,147 +181,7 @@
"kernelName": "csharp"
}
},
"outputs": [
{
"data": {
"text/html": [
"\r\n",
"<div>\r\n",
" <div id='dotnet-interactive-this-cell-$CACHE_BUSTER$' style='display: none'>\r\n",
" The below script needs to be able to find the current output cell; this is an easy method to get it.\r\n",
" </div>\r\n",
" <script type='text/javascript'>\r\n",
"async function probeAddresses(probingAddresses) {\r\n",
" function timeout(ms, promise) {\r\n",
" return new Promise(function (resolve, reject) {\r\n",
" setTimeout(function () {\r\n",
" reject(new Error('timeout'))\r\n",
" }, ms)\r\n",
" promise.then(resolve, reject)\r\n",
" })\r\n",
" }\r\n",
"\r\n",
" if (Array.isArray(probingAddresses)) {\r\n",
" for (let i = 0; i < probingAddresses.length; i++) {\r\n",
"\r\n",
" let rootUrl = probingAddresses[i];\r\n",
"\r\n",
" if (!rootUrl.endsWith('/')) {\r\n",
" rootUrl = `${rootUrl}/`;\r\n",
" }\r\n",
"\r\n",
" try {\r\n",
" let response = await timeout(1000, fetch(`${rootUrl}discovery`, {\r\n",
" method: 'POST',\r\n",
" cache: 'no-cache',\r\n",
" mode: 'cors',\r\n",
" timeout: 1000,\r\n",
" headers: {\r\n",
" 'Content-Type': 'text/plain'\r\n",
" },\r\n",
" body: probingAddresses[i]\r\n",
" }));\r\n",
"\r\n",
" if (response.status == 200) {\r\n",
" return rootUrl;\r\n",
" }\r\n",
" }\r\n",
" catch (e) { }\r\n",
" }\r\n",
" }\r\n",
"}\r\n",
"\r\n",
"function loadDotnetInteractiveApi() {\r\n",
" probeAddresses([\"http://10.97.150.117:2048/\",\"http://10.97.150.3:2048/\",\"http://fe80::4fc6:8044:f092:cbaf%44:2048/\",\"http://172.30.0.1:2048/\",\"http://fe80::887f:3646:8312:9c10%12:2048/\",\"http://192.168.86.40:2048/\",\"http://::1:2048/\",\"http://127.0.0.1:2048/\"])\r\n",
" .then((root) => {\r\n",
" // use probing to find host url and api resources\r\n",
" // load interactive helpers and language services\r\n",
" let dotnetInteractiveRequire = require.config({\r\n",
" context: '30824.Microsoft.DotNet.Interactive.Http.HttpPort',\r\n",
" paths:\r\n",
" {\r\n",
" 'dotnet-interactive': `${root}resources`\r\n",
" }\r\n",
" }) || require;\r\n",
"\r\n",
" window.dotnetInteractiveRequire = dotnetInteractiveRequire;\r\n",
"\r\n",
" window.configureRequireFromExtension = function(extensionName, extensionCacheBuster) {\r\n",
" let paths = {};\r\n",
" paths[extensionName] = `${root}extensions/${extensionName}/resources/`;\r\n",
" \r\n",
" let internalRequire = require.config({\r\n",
" context: extensionCacheBuster,\r\n",
" paths: paths,\r\n",
" urlArgs: `cacheBuster=${extensionCacheBuster}`\r\n",
" }) || require;\r\n",
"\r\n",
" return internalRequire\r\n",
" };\r\n",
" \r\n",
" dotnetInteractiveRequire([\r\n",
" 'dotnet-interactive/dotnet-interactive'\r\n",
" ],\r\n",
" function (dotnet) {\r\n",
" dotnet.init(window);\r\n",
" },\r\n",
" function (error) {\r\n",
" console.log(error);\r\n",
" }\r\n",
" );\r\n",
" })\r\n",
" .catch(error => {console.log(error);});\r\n",
" }\r\n",
"\r\n",
"// ensure `require` is available globally\r\n",
"if ((typeof(require) !== typeof(Function)) || (typeof(require.config) !== typeof(Function))) {\r\n",
" let require_script = document.createElement('script');\r\n",
" require_script.setAttribute('src', 'https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js');\r\n",
" require_script.setAttribute('type', 'text/javascript');\r\n",
" \r\n",
" \r\n",
" require_script.onload = function() {\r\n",
" loadDotnetInteractiveApi();\r\n",
" };\r\n",
"\r\n",
" document.getElementsByTagName('head')[0].appendChild(require_script);\r\n",
"}\r\n",
"else {\r\n",
" loadDotnetInteractiveApi();\r\n",
"}\r\n",
"\r\n",
" </script>\r\n",
"</div>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<div><div></div><div></div><div><strong>Installed Packages</strong><ul><li><span>Duende.AccessTokenManagement, 4.0.1</span></li><li><span>Fhi.Authentication.Extensions, 3.0.0</span></li><li><span>Microsoft.Extensions.Caching.Memory, 9.0.5</span></li><li><span>Microsoft.Extensions.Hosting, 9.0.8</span></li><li><span>Microsoft.Extensions.Http, 9.0.0</span></li><li><span>Refit, 8.0.0</span></li><li><span>Refit.HttpClientFactory, 8.0.0</span></li></ul></div></div>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"\n",
"(59,10): error CS1061: 'IHttpClientBuilder' does not contain a definition for 'AddTypedClient' and no accessible extension method 'AddTypedClient' accepting a first argument of type 'IHttpClientBuilder' could be found (are you missing a using directive or an assembly reference?)\n",
"\n"
]
},
{
"ename": "Error",
"evalue": "compilation error",
"output_type": "error",
"traceback": []
}
],
"outputs": [],
"source": [
"#!csharp\n",
"#r \"nuget: Duende.AccessTokenManagement, 4.0.1\"\n",
Expand Down Expand Up @@ -441,7 +301,14 @@
"cell_type": "code",
"execution_count": null,
"id": "79bef8f8-0b89-4ca9-ac7a-2ba1dab7ffca",
"metadata": {},
"metadata": {
"language_info": {
"name": "polyglot-notebook"
},
"polyglot_notebook": {
"kernelName": "csharp"
}
},
"outputs": [],
"source": []
}
Expand All @@ -455,7 +322,7 @@
"language_info": {
"file_extension": ".cs",
"mimetype": "text/x-csharp",
"name": "C#",
"name": "polyglot-notebook",
"pygments_lexer": "csharp",
"version": "13.0"
},
Expand Down
Loading