Skip to content
Open
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
1 change: 1 addition & 0 deletions UltimateAuth.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<Project Path="samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/CodeBeam.UltimateAuth.Sample.BlazorServer.csproj" />
<Project Path="samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm.csproj" Id="27bd3c4d-65a9-4c70-a6c9-4178b1897730" />
<Project Path="samples/CodeBeam.UltimateAuth.Sample.Seed/CodeBeam.UltimateAuth.Sample.Seed.csproj" Id="c79b227b-409e-439d-97df-8979a3dc1a60" />
<Project Path="samples/CodeBeam.UltimateAuth.Sample.Shared/CodeBeam.UltimateAuth.Sample.Shared.csproj" Id="9edb3d33-3814-4c95-88b0-488c5b4fa25c" />
<Project Path="samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/CodeBeam.UAuth.Sample.IntWasm.Client.csproj" Id="f17355ac-c53c-44e8-b372-a258493bf950" />
<Project Path="samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.csproj" Id="65386675-4cf7-4745-b4d7-544b6404e0c3" />
<Project Path="samples/resource-api/CodeBeam.UltimateAuth.Sample.ResourceApi.EfCore/CodeBeam.UltimateAuth.Sample.ResourceApi.EfCore.csproj" Id="ac247836-455a-4a71-9a52-73587c2393f3" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CodeBeam.MudBlazor.Extensions" Version="9.0.4" />
<PackageReference Include="CodeBeam.MudBlazor.Extensions.Code" Version="9.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.0.5" />
<PackageReference Include="MudBlazor" Version="9.3.0" />
<PackageReference Include="CodeBeam.MudBlazor.Extensions" Version="9.2.0" />
<PackageReference Include="CodeBeam.MudBlazor.Extensions.Code" Version="9.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.0.13" />
<PackageReference Include="MudBlazor" Version="9.11.0" />
</ItemGroup>

<Target Name="BuildDocs" BeforeTargets="Build">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<MudStack Spacing="4" Class="text-center">
<MudText Typo="Typo.h3"><b>Samples</b></MudText>
<MudText Typo="Typo.subtitle2">Explore working examples and see UltimateAuth in action.</MudText>
<MudText Typo="Typo.caption">Interactive online samples are coming soon.</MudText>
<MudText Typo="Typo.caption">Identity Lab (hosted live demo) is coming soon.</MudText>

<MudDivider />

Expand All @@ -15,6 +15,14 @@
</MudText>

<MudGrid>
<MudItem xs="12">
<MudPaper Class="pa-4 d-flex flex-column align-center justify-center" Style="background: transparent; min-height: 200px" Outlined="true" Elevation="0">
<MudText Typo="Typo.h6">Sample.Shared</MudText>
<MudText Typo="Typo.subtitle2">Shared component designs across all modern .NET platforms.</MudText>
<MudButton Class="mt-4" Variant="Variant.Filled" Href="https://github.com/CodeBeamOrg/UltimateAuth/tree/dev/samples/shared" Target="_blank" StartIcon="@Icons.Material.Outlined.OpenInNew">View Source Code on GitHub</MudButton>
</MudPaper>
</MudItem>

<MudItem xs="12" md="6">
<MudPaper Class="pa-4 d-flex flex-column align-center justify-center" Style="background: transparent; min-height: 200px" Outlined="true" Elevation="0">
<MudText Typo="Typo.h6">Blazor Server (EF Core)</MudText>
Expand All @@ -31,17 +39,33 @@
</MudPaper>
</MudItem>

<MudItem xs="12">
<MudItem xs="12" md="6">
<MudPaper Class="pa-4 d-flex flex-column align-center justify-center" Style="background: transparent; min-height: 200px" Outlined="true" Elevation="0">
<MudText Typo="Typo.h6">Blazor WASM (Standalone)</MudText>
<MudText Typo="Typo.h6">Blazor Standalone WASM</MudText>
<MudText Typo="Typo.subtitle2">Client-side sample using Hybrid authentication model.</MudText>
<MudButton Class="mt-4" Variant="Variant.Filled" Href="https://github.com/CodeBeamOrg/UltimateAuth/tree/dev/samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm" Target="_blank" StartIcon="@Icons.Material.Outlined.OpenInNew">View Source Code on GitHub</MudButton>
</MudPaper>
</MudItem>

<MudItem xs="12" md="6">
<MudPaper Class="pa-4 d-flex flex-column align-center justify-center" Style="background: transparent; min-height: 200px" Outlined="true" Elevation="0">
<MudText Typo="Typo.h6">UAuthHub</MudText>
<MudText Typo="Typo.h6">Blazor Interactive WASM</MudText>
<MudText Typo="Typo.subtitle2">Client-side interactive render mode sample using Hybrid authentication model.</MudText>
<MudButton Class="mt-4" Variant="Variant.Filled" Href="https://github.com/CodeBeamOrg/UltimateAuth/tree/dev/samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm" Target="_blank" StartIcon="@Icons.Material.Outlined.OpenInNew">View Source Code on GitHub</MudButton>
</MudPaper>
</MudItem>

<MudItem xs="12" md="6">
<MudPaper Class="pa-4 d-flex flex-column align-center justify-center" Style="background: transparent; min-height: 200px" Outlined="true" Elevation="0">
<MudText Typo="Typo.h6">UAuthHub (EF Core)</MudText>
<MudText Typo="Typo.subtitle2">Complete Auth server with UI, working together with WASM client and EF Core.</MudText>
<MudButton Class="mt-4" Variant="Variant.Filled" Href="https://github.com/CodeBeamOrg/UltimateAuth/tree/dev/samples/UAuthHub/CodeBeam.UltimateAuth.Sample.UAuthHub.EFCore" Target="_blank" StartIcon="@Icons.Material.Outlined.OpenInNew">View Source Code on GitHub</MudButton>
</MudPaper>
</MudItem>

<MudItem xs="12" md="6">
<MudPaper Class="pa-4 d-flex flex-column align-center justify-center" Style="background: transparent; min-height: 200px" Outlined="true" Elevation="0">
<MudText Typo="Typo.h6">UAuthHub (InMemory)</MudText>
<MudText Typo="Typo.subtitle2">Complete Auth server with UI, working together with WASM client.</MudText>
<MudButton Class="mt-4" Variant="Variant.Filled" Href="https://github.com/CodeBeamOrg/UltimateAuth/tree/dev/samples/UAuthHub/CodeBeam.UltimateAuth.Sample.UAuthHub" Target="_blank" StartIcon="@Icons.Material.Outlined.OpenInNew">View Source Code on GitHub</MudButton>
</MudPaper>
Expand All @@ -54,20 +78,91 @@
<MudButton Class="mt-4" Variant="Variant.Filled" Href="https://github.com/CodeBeamOrg/UltimateAuth/tree/dev/samples/resource-api/CodeBeam.UltimateAuth.Sample.ResourceApi" Target="_blank" StartIcon="@Icons.Material.Outlined.OpenInNew">View Source Code on GitHub</MudButton>
</MudPaper>
</MudItem>
</MudGrid>

<MudAlert Severity="Severity.Info" Class="mt-6" ContentAlignment="HorizontalAlignment.Center">
<b>WASM Sample Setup:</b><br />
Start the following projects together:<br />
(1) UAuthHub<br />
(2) ResourceApi<br />
(3) BlazorStandaloneWasm<br />
After opening the solution, configure multiple startup projects in Visual Studio.
</MudAlert>

<MudAlert Severity="Severity.Info" Class="my-6">
Each sample refreshes (clear + seed) it's data on each restart. When you close application it will be reset.
</MudAlert>
</MudGrid>


<MudDivider Class="my-6" />

<MudStack Spacing="3" Class="text-start">

<MudText Typo="Typo.h5" Align="Align.Center">
<b>Running the Samples</b>
</MudText>

<MudText Typo="Typo.body2" Align="Align.Center">
The samples are preconfigured with different hosting and storage setups.
Follow the project combinations below to run them locally.
</MudText>

<MudPaper Outlined="true" Elevation="0" Class="pa-4">
<MudStack Spacing="2">
<MudStack Row="true" AlignItems="AlignItems.Center" Justify="Justify.SpaceBetween">
<MudText Typo="Typo.h6">Blazor Server</MudText>
<MudChip T="string" Color="Color.Success" Variant="Variant.Outlined" Size="Size.Small">Standalone</MudChip>
</MudStack>

<MudText Typo="Typo.body2">
Run either Blazor Server (InMemory) or Blazor Server (EF Core) independently.
No additional projects are required.
</MudText>
</MudStack>
</MudPaper>

<MudPaper Outlined="true" Elevation="0" Class="pa-4">
<MudStack Spacing="2">
<MudStack Row="true"AlignItems="AlignItems.Center" Justify="Justify.SpaceBetween">
<MudText Typo="Typo.h6">Blazor Standalone WASM</MudText>
<MudChip T="string" Variant="Variant.Outlined" Size="Size.Small">3 Projects</MudChip>
</MudStack>

<MudText Typo="Typo.body2">Start these projects together:</MudText>

<MudStack Spacing="1" Class="pl-3">
<MudText Typo="Typo.body2">1. UAuthHub</MudText>
<MudText Typo="Typo.body2">2. ResourceApi</MudText>
<MudText Typo="Typo.body2">3. BlazorStandaloneWasm</MudText>
</MudStack>

<MudText Typo="Typo.caption" Color="Color.Info">Preconfigured with InMemory storage.</MudText>
</MudStack>
</MudPaper>

<MudPaper Outlined="true" Elevation="0" Class="pa-4">
<MudStack Spacing="2">
<MudStack Row="true" AlignItems="AlignItems.Center" Justify="Justify.SpaceBetween">
<MudText Typo="Typo.h6">Blazor Interactive WASM</MudText>
<MudChip T="string" Variant="Variant.Outlined" Size="Size.Small">3 Projects</MudChip>
</MudStack>

<MudText Typo="Typo.body2">Start these projects together:</MudText>

<MudStack Spacing="1" Class="pl-3">
<MudText Typo="Typo.body2">1. UAuthHub EF Core</MudText>
<MudText Typo="Typo.body2">2. Resource API EF Core</MudText>
<MudText Typo="Typo.body2">3. Blazor Interactive WASM</MudText>
</MudStack>

<MudText Typo="Typo.caption" Color="Color.Info">Preconfigured with EF Core storage.</MudText>
</MudStack>
</MudPaper>

<MudAlert Severity="Severity.Info" Variant="Variant.Text">
<b>Storage flexibility:</b>
These are sample configurations, not framework limitations.
Both WASM hosting models can use InMemory or EF Core backends.
The combinations above are simply the preconfigured examples provided in this repository.
</MudAlert>

<MudText Typo="Typo.body2" Align="Align.Center">
In Visual Studio, open <b>Configure Startup Projects</b>, select <b>Multiple startup projects</b>, and set the required projects to <b>Start</b>.
</MudText>

<MudAlert Severity="Severity.Info" Variant="Variant.Text">
<b>Sample Data:</b>
Sample data is reset and seeded again on each restart in the provided demo configurations.
</MudAlert>
</MudStack>

</MudStack>
</MudContainer>
</MudPage>
Original file line number Diff line number Diff line change
Expand Up @@ -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.5" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="10.0.13" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@namespace CodeBeam.UltimateAuth.Sample
@namespace CodeBeam.UltimateAuth.Sample.Shared
@inherits ComponentBase

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 240" width="@Size" height="@Size" style="@BuildStyle()" class="@Class">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Web;

namespace CodeBeam.UltimateAuth.Sample;
namespace CodeBeam.UltimateAuth.Sample.Shared;

public partial class UAuthLogo : ComponentBase
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace CodeBeam.UltimateAuth.Sample;
namespace CodeBeam.UltimateAuth.Sample.Shared;

public enum UAuthLogoVariant
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

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


<ItemGroup>
<SupportedPlatform Include="browser" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="CodeBeam.MudBlazor.Extensions" Version="9.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="10.0.13" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.0.13" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="10.0.5" />
<PackageReference Include="Microsoft.Extensions.Http" Version="10.0.13" />
<PackageReference Include="MudBlazor" Version="9.11.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\client\CodeBeam.UltimateAuth.Client.Blazor\CodeBeam.UltimateAuth.Client.Blazor.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using CodeBeam.UltimateAuth.Core.Domain;
using MudBlazor;

namespace CodeBeam.UAuth.Sample.IntWasm.Client.Common;
namespace CodeBeam.UltimateAuth.Sample.Shared.Common;

public static class UAuthDialog
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Microsoft.AspNetCore.Components;
using MudBlazor;

namespace CodeBeam.UAuth.Sample.IntWasm.Client.Components.Dialogs;
namespace CodeBeam.UltimateAuth.Sample.Shared.Components.Dialogs;

public partial class AccountStatusDialog
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
@using CodeBeam.UltimateAuth.Credentials.Contracts
@using CodeBeam.UltimateAuth.Users.Contracts
@inject IUAuthClient UAuthClient
@inject IUAuthClient UAuthClient
@inject ISnackbar Snackbar

<MudDialog>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Microsoft.AspNetCore.Components;
using MudBlazor;

namespace CodeBeam.UAuth.Sample.IntWasm.Client.Components.Dialogs;
namespace CodeBeam.UltimateAuth.Sample.Shared.Components.Dialogs;

public partial class CreateUserDialog
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Microsoft.AspNetCore.Components;
using MudBlazor;

namespace CodeBeam.UAuth.Sample.IntWasm.Client.Components.Dialogs;
namespace CodeBeam.UltimateAuth.Sample.Shared.Components.Dialogs;

public partial class CredentialDialog
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Microsoft.AspNetCore.Components;
using MudBlazor;

namespace CodeBeam.UltimateAuth.Sample.BlazorServer.Components.Dialogs;
namespace CodeBeam.UltimateAuth.Sample.Shared.Components.Dialogs;

public partial class IdentifierDialog
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Microsoft.AspNetCore.Components;
using MudBlazor;

namespace CodeBeam.UAuth.Sample.IntWasm.Client.Components.Dialogs;
namespace CodeBeam.UltimateAuth.Sample.Shared.Components.Dialogs;

public partial class PermissionDialog
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Microsoft.AspNetCore.Components;
using MudBlazor;

namespace CodeBeam.UltimateAuth.Sample.BlazorServer.Components.Dialogs;
namespace CodeBeam.UltimateAuth.Sample.Shared.Components.Dialogs;

public partial class ProfileDialog
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Microsoft.AspNetCore.Components;
using MudBlazor;

namespace CodeBeam.UAuth.Sample.IntWasm.Client.Components.Dialogs;
namespace CodeBeam.UltimateAuth.Sample.Shared.Components.Dialogs;

public partial class ResetDialog
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@using CodeBeam.UAuth.Sample.IntWasm.Client.ResourceApi
@inject ProductApiService Api
@using CodeBeam.UltimateAuth.Sample.Shared.ResourceApi
@inject SampleProductApiService Api
@inject ISnackbar Snackbar

<MudDialog Class="mud-width-full" ContentClass="uauth-dialog">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
using CodeBeam.UltimateAuth.Client;
using CodeBeam.UltimateAuth.Core.Contracts;
using CodeBeam.UltimateAuth.Core.Domain;
using CodeBeam.UAuth.Sample.IntWasm.Client.ResourceApi;
using CodeBeam.UltimateAuth.Users.Contracts;
using CodeBeam.UltimateAuth.Sample.Shared.ResourceApi;
using Microsoft.AspNetCore.Components;
using MudBlazor;

namespace CodeBeam.UAuth.Sample.IntWasm.Client.Components.Dialogs;
namespace CodeBeam.UltimateAuth.Sample.Shared.Components.Dialogs;

public partial class ResourceApiDialog
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Microsoft.AspNetCore.Components;
using MudBlazor;

namespace CodeBeam.UltimateAuth.Sample.BlazorServer.Components.Dialogs;
namespace CodeBeam.UltimateAuth.Sample.Shared.Components.Dialogs;

public partial class RoleDialog
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@using CodeBeam.UltimateAuth.Core.Contracts
@using CodeBeam.UltimateAuth.Users.Contracts
@inject IUAuthClient UAuthClient
@inject ISnackbar Snackbar
@inject IDialogService DialogService
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Microsoft.AspNetCore.Components;
using MudBlazor;

namespace CodeBeam.UltimateAuth.Sample.BlazorServer.Components.Dialogs;
namespace CodeBeam.UltimateAuth.Sample.Shared.Components.Dialogs;

public partial class SessionDialog
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
@using CodeBeam.UltimateAuth.Core.Contracts
@using CodeBeam.UAuth.Sample.IntWasm.Client.Common
@using CodeBeam.UltimateAuth.Users.Contracts
@using CodeBeam.UltimateAuth.Users.Contracts
@inject IUAuthClient UAuthClient
@inject IDialogService DialogService
@inject ISnackbar Snackbar
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using CodeBeam.UltimateAuth.Client;
using CodeBeam.UltimateAuth.Core.Contracts;
using CodeBeam.UltimateAuth.Core.Domain;
using CodeBeam.UltimateAuth.Sample.BlazorServer.Common;
using CodeBeam.UltimateAuth.Sample.Shared.Common;
using CodeBeam.UltimateAuth.Users.Contracts;
using Microsoft.AspNetCore.Components;
using MudBlazor;

namespace CodeBeam.UltimateAuth.Sample.BlazorServer.Components.Dialogs;
namespace CodeBeam.UltimateAuth.Sample.Shared.Components.Dialogs;

public partial class UserDetailDialog
{
Expand Down
Loading
Loading