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
8 changes: 4 additions & 4 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# BUILD
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:11.0 AS build
WORKDIR /src

ENV CI=true

COPY docs/website/CodeBeam.UltimateAuth.Docs.Wasm/CodeBeam.UltimateAuth.Docs.Wasm/*.csproj CodeBeam.Website/
COPY docs/website/CodeBeam.UltimateAuth.Docs.Wasm/CodeBeam.UltimateAuth.Docs.Wasm.Client/*.csproj CodeBeam.Website.Client/

RUN dotnet restore CodeBeam.Website/CodeBeam.UltimateAuth.Docs.Wasm.csproj -p:UltimateAuthBuildTargetFrameworks=net10.0
RUN dotnet restore CodeBeam.Website/CodeBeam.UltimateAuth.Docs.Wasm.csproj -p:UltimateAuthBuildTargetFrameworks=net11.0

COPY . .

RUN dotnet publish docs/website/CodeBeam.UltimateAuth.Docs.Wasm/CodeBeam.UltimateAuth.Docs.Wasm/CodeBeam.UltimateAuth.Docs.Wasm.csproj \
-c Release -p:UltimateAuthBuildTargetFrameworks=net10.0 -o /app/publish
-c Release -p:UltimateAuthBuildTargetFrameworks=net11.0 -o /app/publish

# RUNTIME
FROM mcr.microsoft.com/dotnet/aspnet:10.0
FROM mcr.microsoft.com/dotnet/aspnet:11.0
WORKDIR /app

COPY --from=build /app/publish .
Expand Down
8 changes: 4 additions & 4 deletions .docker/Dockerfile.identitylab
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# Build
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:11.0 AS build
WORKDIR /src

COPY . .

RUN dotnet restore \
apps/identity-lab/CodeBeam.UltimateAuth.IdentityLab/CodeBeam.UltimateAuth.IdentityLab.csproj \
-p:UltimateAuthBuildTargetFrameworks=net10.0
-p:UltimateAuthBuildTargetFrameworks=net11.0

RUN dotnet publish \
apps/identity-lab/CodeBeam.UltimateAuth.IdentityLab/CodeBeam.UltimateAuth.IdentityLab.csproj \
-c Release \
-p:UltimateAuthBuildTargetFrameworks=net10.0 \
-p:UltimateAuthBuildTargetFrameworks=net11.0 \
--no-restore \
-o /app/publish

# Runtime
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS runtime
FROM mcr.microsoft.com/dotnet/aspnet:11.0 AS runtime
WORKDIR /app

ENV ASPNETCORE_HTTP_PORTS=8080
Expand Down
13 changes: 3 additions & 10 deletions .github/workflows/ultimateauth-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -259,17 +259,10 @@ jobs:
output.write("|---|---:|\n")
output.write(f"| Lines | {line_rate:.2%} |\n")
output.write(f"| Branches | {branch_rate:.2%} |\n")
output.write(
f"| Covered lines | {lines_covered:,} / {lines_valid:,} |\n"
)
output.write(
f"| Covered branches | {branches_covered:,} / {branches_valid:,} |\n"
)
output.write(f"| Covered lines | {lines_covered:,} / {lines_valid:,} |\n")
output.write(f"| Covered branches | {branches_covered:,} / {branches_valid:,} |\n")
output.write("\n")
output.write(
"Coverage is reported separately from UltimateAuth "
"framework coverage.\n"
)
output.write("Coverage is reported separately from UltimateAuth framework coverage.\n")
PY

- name: Upload Identity Lab test and coverage results
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<!-- Keep this list in ascending version order; the last entry drives regular tests. -->
<UltimateAuthTargetFrameworks>net8.0;net9.0;net10.0</UltimateAuthTargetFrameworks>
<UltimateAuthTargetFrameworks>net8.0;net9.0;net10.0;net11.0</UltimateAuthTargetFrameworks>
<UltimateAuthLatestTargetFramework>$([System.Text.RegularExpressions.Regex]::Match('$(UltimateAuthTargetFrameworks)', '[^;]+$').Value)</UltimateAuthLatestTargetFramework>
<!-- CI may build a supported subset without retargeting single-target applications. -->
<UltimateAuthBuildTargetFrameworks Condition="'$(UltimateAuthBuildTargetFrameworks)' == ''">$(UltimateAuthTargetFrameworks)</UltimateAuthBuildTargetFrameworks>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<BlazorDisableThrowNavigationException>true</BlazorDisableThrowNavigationException>
Expand All @@ -10,14 +10,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CodeBeam.MudBlazor.Extensions" Version="9.3.0" />
<PackageReference Include="MudBlazor" Version="9.12.0" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.14">
<PackageReference Include="CodeBeam.MudBlazor.Extensions" Version="9.14.0" />
<PackageReference Include="MudBlazor" Version="9.14.0" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="11.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="11.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="10.0.14">
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="11.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<NoDefaultLaunchSettingsFile>true</NoDefaultLaunchSettingsFile>
Expand All @@ -11,10 +11,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CodeBeam.MudBlazor.Extensions" Version="9.3.0" />
<PackageReference Include="CodeBeam.MudBlazor.Extensions.Code" Version="9.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.0.14" />
<PackageReference Include="MudBlazor" Version="9.12.0" />
<PackageReference Include="CodeBeam.MudBlazor.Extensions" Version="9.14.0" />
<PackageReference Include="CodeBeam.MudBlazor.Extensions.Code" Version="9.14.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="11.0.0" />
<PackageReference Include="MudBlazor" Version="9.14.0" />
</ItemGroup>

<Target Name="BuildDocs" BeforeTargets="Build">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,15 @@
if (_ref == null && PageState.Headings.Count > 0)
{
_ref = DotNetObjectReference.Create(this);
await JS.InvokeVoidAsync("uaDocsScrollSpy.start", _ref);
try
{
await JS.InvokeVoidAsync("uaDocsScrollSpy.start", _ref);
}
catch (Exception)
{
throw;
}

}
}

Expand All @@ -58,14 +66,33 @@
private async Task OnClick(string id)
{
PageState.SetActiveHeading(id);
await JS.InvokeVoidAsync("uaDocsScrollSpy.scrollTo", id);

try
{
await JS.InvokeVoidAsync("uaDocsScrollSpy.scrollTo", id);
}
catch (Exception)
{
throw;
}
}

private string GetClass(DocsHeadingItem item)
=> item.Id == PageState.ActiveHeadingId ? "active toc-active" : "";

private Task ScrollTo(string id)
=> JS.InvokeVoidAsync("uaDocsScrollSpy.scrollTo", id).AsTask();
{
try
{
JS.InvokeVoidAsync("uaDocsScrollSpy.scrollTo", id).AsTask();
}
catch (Exception)
{
throw;
}

return Task.CompletedTask;
}

public void Dispose()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<BlazorDisableThrowNavigationException>true</BlazorDisableThrowNavigationException>
Expand All @@ -10,7 +10,7 @@

<ItemGroup>
<ProjectReference Include="..\CodeBeam.UltimateAuth.Docs.Wasm.Client\CodeBeam.UltimateAuth.Docs.Wasm.Client.csproj" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="10.0.14" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="11.0.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

if (app.Environment.IsDevelopment())
{
app.UseWebAssemblyDebugging();

}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "http://localhost:5086",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
Expand All @@ -15,7 +14,6 @@
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "https://localhost:7287;http://localhost:5086",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
Expand All @@ -12,11 +12,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CodeBeam.MudBlazor.Extensions" Version="9.3.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.0.15" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="10.0.15" />
<PackageReference Include="Microsoft.Extensions.Http" Version="10.0.15" />
<PackageReference Include="MudBlazor" Version="9.12.0" />
<PackageReference Include="CodeBeam.MudBlazor.Extensions" Version="9.14.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="11.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="11.0.0" />
<PackageReference Include="MudBlazor" Version="9.14.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
using CodeBeam.UltimateAuth.Core.Defaults;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Authorization;

namespace CodeBeam.UltimateAuth.Sample.Shared.Components.Page;

public partial class SampleLandingPage
{
[CascadingParameter]
private Task<AuthenticationState> AuthenticationStateTask { get; set; } = default!;

protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (!firstRender)
return;

var state = await AuthProvider.GetAuthenticationStateAsync();
var isAuthenticated = state.User.Identity?.IsAuthenticated == true;
var authState = await AuthenticationStateTask;
var isAuthenticated = authState.User.Identity?.IsAuthenticated == true;

Nav.NavigateTo(isAuthenticated ? "/home" : $"{UAuthConstants.Routes.LoginRedirect}?fresh=true");
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
<BlazorDisableThrowNavigationException>true</BlazorDisableThrowNavigationException>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.14">
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="11.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="11.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="10.0.14">
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="11.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="11.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Scalar.AspNetCore" Version="2.19.0" />
<PackageReference Include="Scalar.AspNetCore" Version="3.2.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
<BlazorDisableThrowNavigationException>true</BlazorDisableThrowNavigationException>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.14" />
<PackageReference Include="Scalar.AspNetCore.Microsoft" Version="2.19.0" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="11.0.0" />
<PackageReference Include="Scalar.AspNetCore.Microsoft" Version="3.2.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
<BlazorDisableThrowNavigationException>true</BlazorDisableThrowNavigationException>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.14">
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="11.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="11.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="10.0.14">
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="11.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="11.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Scalar.AspNetCore" Version="2.19.0" />
<PackageReference Include="Scalar.AspNetCore" Version="3.2.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.14" />
<PackageReference Include="Scalar.AspNetCore" Version="2.19.0" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="11.0.0" />
<PackageReference Include="Scalar.AspNetCore" Version="3.2.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading
Loading