Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blazor #199

Closed
wants to merge 44 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
3616d86
Generate a new blazor interactive sample
josephdecock Apr 22, 2024
67d8238
Implement login in blazor interactive app
josephdecock Apr 25, 2024
faf08ca
Add jti to sample echo controller
josephdecock Apr 25, 2024
daa659c
Add components to blazor interactive sample showing API calls
josephdecock Apr 29, 2024
b37e565
Initial implementation of ServerSideTokenStore
josephdecock Apr 26, 2024
583acad
Improve blazor ServerSide tokens to respect more optional parameters
josephdecock Apr 29, 2024
ad627e5
Remove OidcEvents from blazor sample
josephdecock Apr 29, 2024
6811ae1
Add logout to blazor interactive sample
josephdecock May 17, 2024
65cbc8d
Move blazor helpers into new packages: Duende.Bff.Blazor.{Client,Wasm}
josephdecock Apr 29, 2024
4ffbf12
Add a constant for the server side ticket store's data protector purpose
josephdecock Apr 29, 2024
7d36ca6
Minor cleanup
josephdecock May 22, 2024
22ebace
Improve timestamps in echo controller
josephdecock May 22, 2024
cc2ea4e
Make http client base address make more sense
josephdecock May 22, 2024
77f2b23
Use typed http client for BFF auth state provider
josephdecock May 22, 2024
a9ae0e4
Add blazor wasm service registration convenience methods
josephdecock May 22, 2024
608ec73
Rework blazor logout
josephdecock May 28, 2024
94f0db9
Move blazor opts to own file
josephdecock May 28, 2024
c37e630
Resolve compiler warnings
josephdecock May 28, 2024
1f56f43
Flow server side auth state to wasm as initial auth state
josephdecock Jun 16, 2024
452e9f7
Add configuration options for state provider polling
josephdecock Jun 17, 2024
afeef33
Add authentication properties service for blazor server
josephdecock Jun 18, 2024
47af75a
Use same claims when persisting auth state as in user endpoint
josephdecock Jun 19, 2024
013270c
Rename Blazor.Client namespace
josephdecock Jun 19, 2024
38e1b09
Reorganized Blazor Samples
josephdecock Jun 19, 2024
14860f8
Rearrange samples, part 2
josephdecock Jun 19, 2024
3036393
Fix auth state when pre-rendering disabled
josephdecock Jun 19, 2024
d2556e7
Remove dead logout code
josephdecock Jun 19, 2024
9435a8d
Share startup profiles
josephdecock Jun 19, 2024
c96f808
Rename auth state providers
josephdecock Jun 28, 2024
74ad3b1
Clean up Blazor dependencies
josephdecock Aug 14, 2024
b2fff6c
Clean up sample API dependencies
josephdecock Aug 14, 2024
664633a
Rework how we handle auth properties
josephdecock Aug 15, 2024
8e79329
Clean up .run files
josephdecock Aug 16, 2024
40c7364
A better idea about auth properties
josephdecock Aug 16, 2024
2e7793e
Misc cleanup
josephdecock Aug 16, 2024
9ba34b7
Fix test builds
josephdecock Aug 16, 2024
1fb6539
Clean up some lingering TODOs
josephdecock Aug 16, 2024
1399147
Add logging to serversidetokenstore
josephdecock Aug 16, 2024
6ddb9ea
Formatting and copyright headers
josephdecock Aug 16, 2024
fe3a2f0
Remove unused usings in Blazor
josephdecock Aug 16, 2024
b3bd353
Revert minor changes not needed here
josephdecock Aug 17, 2024
e4e7730
Self-review polish
josephdecock Aug 19, 2024
f0b41cb
Add Duende.Bff.Blazor projects to build pipeline
josephdecock Aug 19, 2024
cc242ed
Misc
josephdecock Aug 20, 2024
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
17 changes: 0 additions & 17 deletions .run/API.run.xml

This file was deleted.

2 changes: 1 addition & 1 deletion .run/Infrastucture.run.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Infrastucture" type="CompoundRunConfigurationType">
<toRun name="Api" type="LaunchSettings" />
<toRun name="IdentityServer" type="LaunchSettings" />
<toRun name="API" type="LaunchSettings" />
<method v="2" />
</configuration>
</component>
17 changes: 0 additions & 17 deletions .run/JS (.NET 3.1).run.xml

This file was deleted.

17 changes: 0 additions & 17 deletions .run/JS (EF).run.xml

This file was deleted.

17 changes: 0 additions & 17 deletions .run/SPA (.NET 5).run.xml

This file was deleted.

41 changes: 31 additions & 10 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-api",
"program": "${workspaceFolder}/samples/Api/bin/Debug/net8.0/Api.dll",
"program": "${workspaceFolder}/samples/Apis/Api/bin/Debug/net8.0/Api.dll",
"args": [],
"cwd": "${workspaceFolder}/samples/Api",
"cwd": "${workspaceFolder}/samples/Apis/Api",
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
Expand All @@ -62,9 +62,9 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-api.dpop",
"program": "${workspaceFolder}/samples/Api.DPoP/bin/Debug/net8.0/Api.DPoP.dll",
"program": "${workspaceFolder}/samples/Apis/Api.DPoP/bin/Debug/net8.0/Api.DPoP.dll",
"args": [],
"cwd": "${workspaceFolder}/samples/Api.DPoP",
"cwd": "${workspaceFolder}/samples/Apis/Api.DPoP",
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
Expand All @@ -80,9 +80,9 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-api.isolated",
"program": "${workspaceFolder}/samples/Api.Isolated/bin/Debug/net8.0/Api.Isolated.dll",
"program": "${workspaceFolder}/samples/Apis/Api.Isolated/bin/Debug/net8.0/Api.Isolated.dll",
"args": [],
"cwd": "${workspaceFolder}/samples/Api.Isolated",
"cwd": "${workspaceFolder}/samples/Apis/Api.Isolated",
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
Expand Down Expand Up @@ -157,13 +157,34 @@
}
},
{
"name": "Blazor Wasm",
"name": "Blazor PerComponent",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-blazor.wasm",
"program": "${workspaceFolder}/samples/Blazor.Wasm/Blazor.Wasm.Bff/bin/Debug/net8.0/Blazor.Wasm.Bff.dll",
"preLaunchTask": "build-PerComponent",
"program": "${workspaceFolder}/samples/Blazor/PerComponent/PerComponent/bin/Debug/net8.0/PerComponent.dll",
"args": [],
"cwd": "${workspaceFolder}/samples/Blazor.Wasm/Blazor.Wasm.Bff",
"cwd": "${workspaceFolder}/samples/Blazor/PerComponent/PerComponent",
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"serverReadyAction": {
"action": "openExternally",
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
},
"console": "externalTerminal",
"presentation": {
"hidden": false,
"order": 10
}
},
{
"name": "Blazor WebAssembly",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-WebAssembly",
"program": "${workspaceFolder}/samples/Blazor/WebAssembly/WebAssembly/bin/Debug/net8.0/WebAssembly.dll",
"args": [],
"cwd": "${workspaceFolder}/samples/Blazor/WebAssembly/WebAssembly",
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
Expand Down
23 changes: 18 additions & 5 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"command": "dotnet",
"args": [
"build",
"${workspaceFolder}/samples/Api/Api.csproj",
"${workspaceFolder}/samples/Apis/Api/Api.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
Expand All @@ -43,7 +43,7 @@
"command": "dotnet",
"args": [
"build",
"${workspaceFolder}/samples/Api.DPoP/Api.DPoP.csproj",
"${workspaceFolder}/samples/Apis/Api.DPoP/Api.DPoP.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
Expand All @@ -55,7 +55,7 @@
"command": "dotnet",
"args": [
"build",
"${workspaceFolder}/samples/Api.Isolated/Api.Isolated.csproj",
"${workspaceFolder}/samples/Apis/Api.Isolated/Api.Isolated.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
Expand Down Expand Up @@ -110,12 +110,25 @@
"problemMatcher": "$msCompile"
},
{
"label": "build-blazor.wasm",
"label": "build-PerComponent",
"type": "process",
"command": "dotnet",
"args": [
"build",
"${workspaceFolder}/samples/Blazor.Wasm/Blazor.Wasm.Bff/Blazor.Wasm.Bff.csproj",
"${workspaceFolder}/samples/Blazor/PerComponent/PerComponent/PerComponent.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},

{
"label": "build-WebAssembly",
"type": "process",
"command": "dotnet",
"args": [
"build",
"${workspaceFolder}/samples/Blazor/WebAssembly/WebAssembly/WebAssembly.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
Expand Down
20 changes: 16 additions & 4 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Project>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net8.0'">
<FrameworkVersionRuntime>8.0.0</FrameworkVersionRuntime>
<FrameworkVersionTesting>8.0.0</FrameworkVersionTesting>
<FrameworkVersionTesting>8.0.8</FrameworkVersionTesting>
<WilsonVersion>7.1.2</WilsonVersion> <!-- Used in samples -->
<YarpVersion>2.1.0</YarpVersion>
<IdentityServerVersion>7.0.4</IdentityServerVersion>
<IdentityServerVersion>7.0.6</IdentityServerVersion>
</PropertyGroup>

<ItemGroup>
Expand All @@ -13,15 +14,26 @@

<!-- runtime -->
<PackageReference Update="IdentityModel" Version="7.0.0" />
<PackageReference Update="Duende.AccessTokenManagement.OpenIdConnect" Version="3.0.0-preview.3" />
<PackageReference Update="Duende.AccessTokenManagement.OpenIdConnect" Version="3.0.0" />
<PackageReference Update="Microsoft.EntityFrameworkCore.Relational" Version="$(FrameworkVersionRuntime)" />
<PackageReference Update="Microsoft.Extensions.Http" Version="$(FrameworkVersionRuntime)" />
<PackageReference Update="Microsoft.AspNetCore.Components.WebAssembly" Version="$(FrameworkVersionRuntime)" />
<PackageReference Update="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="$(FrameworkVersionRuntime)" />
<PackageReference Update="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="$(FrameworkVersionRuntime)" />
<PackageReference Update="Microsoft.AspNetCore.Components.Authorization" Version="$(FrameworkVersionRuntime)" />
<PackageReference Update="Yarp.ReverseProxy" Version="$(YarpVersion)" />

<!-- samples -->
<PackageReference Update="Serilog.AspNetCore" Version="8.0.2" />
<PackageReference Update="Microsoft.IdentityModel.JsonWebTokens" Version="$(WilsonVersion)" />
<PackageReference Update="System.IdentityModel.Tokens.Jwt" Version="$(WilsonVersion)" />

<!-- testing -->
<PackageReference Update="Microsoft.EntityFrameworkCore.InMemory" Version="$(FrameworkVersionTesting)" />
<PackageReference Update="Microsoft.AspNetCore.Authentication.JwtBearer" Version="$(FrameworkVersionTesting)" />
<PackageReference Update="Microsoft.AspNetCore.TestHost" Version="$(FrameworkVersionTesting)" />
<PackageReference Update="Microsoft.Extensions.TimeProvider.Testing" Version="$(FrameworkVersionTesting)" />
<!-- Test timeprovider is released separately from the framework, so we can't use FrameworkVersionTesting -->
<PackageReference Update="Microsoft.Extensions.TimeProvider.Testing" Version="8.8.0" />

<PackageReference Update="Duende.IdentityServer" Version="$(IdentityServerVersion)" />

Expand Down
Loading
Loading