Skip to content

Commit

Permalink
Still more XML DOC
Browse files Browse the repository at this point in the history
  • Loading branch information
josephdecock committed Aug 26, 2024
1 parent 4504958 commit 3c7293d
Show file tree
Hide file tree
Showing 9 changed files with 84 additions and 30 deletions.
33 changes: 31 additions & 2 deletions Duende.Bff.sln
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.9.34414.90
Expand Down Expand Up @@ -43,11 +43,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Duende.Bff.Blazor", "src\Du
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Duende.Bff.Blazor.Client", "src\Duende.Bff.Blazor.Client\Duende.Bff.Blazor.Client.csproj", "{DDB9C401-6B1F-4727-A4CB-932034FBF94E}"
EndProject
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blazor.Wasm.Bff", "samples\Blazor.Wasm\Blazor.Wasm.Bff\Blazor.Wasm.Bff.csproj", "{BC21ADB7-F2CA-44F0-B6ED-0405E1EFFFA3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blazor.Wasm.Client", "samples\Blazor.Wasm\Blazor.Wasm.Client\Blazor.Wasm.Client.csproj", "{4E69FCF6-AE76-4F6D-98B8-969E9D244AE4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Duende.Bff.Blazor.Client.UnitTests", "test\Duende.Bff.Blazor.Client.UnitTests\Duende.Bff.Blazor.Client.UnitTests.csproj", "{001840D4-8B83-4A8C-AF2C-5429D4F9A370}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Duende.Bff.Blazor.UnitTests", "test\Duende.Bff.Blazor.UnitTests\Duende.Bff.Blazor.UnitTests.csproj", "{2A04808A-A06C-4F10-87B9-2D12E065F729}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -250,6 +253,30 @@ Global
{DDB9C401-6B1F-4727-A4CB-932034FBF94E}.Release|x64.Build.0 = Release|Any CPU
{DDB9C401-6B1F-4727-A4CB-932034FBF94E}.Release|x86.ActiveCfg = Release|Any CPU
{DDB9C401-6B1F-4727-A4CB-932034FBF94E}.Release|x86.Build.0 = Release|Any CPU
{001840D4-8B83-4A8C-AF2C-5429D4F9A370}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{001840D4-8B83-4A8C-AF2C-5429D4F9A370}.Debug|Any CPU.Build.0 = Debug|Any CPU
{001840D4-8B83-4A8C-AF2C-5429D4F9A370}.Debug|x64.ActiveCfg = Debug|Any CPU
{001840D4-8B83-4A8C-AF2C-5429D4F9A370}.Debug|x64.Build.0 = Debug|Any CPU
{001840D4-8B83-4A8C-AF2C-5429D4F9A370}.Debug|x86.ActiveCfg = Debug|Any CPU
{001840D4-8B83-4A8C-AF2C-5429D4F9A370}.Debug|x86.Build.0 = Debug|Any CPU
{001840D4-8B83-4A8C-AF2C-5429D4F9A370}.Release|Any CPU.ActiveCfg = Release|Any CPU
{001840D4-8B83-4A8C-AF2C-5429D4F9A370}.Release|Any CPU.Build.0 = Release|Any CPU
{001840D4-8B83-4A8C-AF2C-5429D4F9A370}.Release|x64.ActiveCfg = Release|Any CPU
{001840D4-8B83-4A8C-AF2C-5429D4F9A370}.Release|x64.Build.0 = Release|Any CPU
{001840D4-8B83-4A8C-AF2C-5429D4F9A370}.Release|x86.ActiveCfg = Release|Any CPU
{001840D4-8B83-4A8C-AF2C-5429D4F9A370}.Release|x86.Build.0 = Release|Any CPU
{2A04808A-A06C-4F10-87B9-2D12E065F729}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2A04808A-A06C-4F10-87B9-2D12E065F729}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2A04808A-A06C-4F10-87B9-2D12E065F729}.Debug|x64.ActiveCfg = Debug|Any CPU
{2A04808A-A06C-4F10-87B9-2D12E065F729}.Debug|x64.Build.0 = Debug|Any CPU
{2A04808A-A06C-4F10-87B9-2D12E065F729}.Debug|x86.ActiveCfg = Debug|Any CPU
{2A04808A-A06C-4F10-87B9-2D12E065F729}.Debug|x86.Build.0 = Debug|Any CPU
{2A04808A-A06C-4F10-87B9-2D12E065F729}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2A04808A-A06C-4F10-87B9-2D12E065F729}.Release|Any CPU.Build.0 = Release|Any CPU
{2A04808A-A06C-4F10-87B9-2D12E065F729}.Release|x64.ActiveCfg = Release|Any CPU
{2A04808A-A06C-4F10-87B9-2D12E065F729}.Release|x64.Build.0 = Release|Any CPU
{2A04808A-A06C-4F10-87B9-2D12E065F729}.Release|x86.ActiveCfg = Release|Any CPU
{2A04808A-A06C-4F10-87B9-2D12E065F729}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -271,6 +298,8 @@ Global
{CBB98134-92F5-487D-8CA3-84C19FF46775} = {E14F66D1-EA3E-40C6-835A-91A4382D4646}
{E02DF032-C17F-4D0C-9CAA-3BD3CC9E4F84} = {3C549079-A502-4B40-B051-5278915AE91B}
{DDB9C401-6B1F-4727-A4CB-932034FBF94E} = {3C549079-A502-4B40-B051-5278915AE91B}
{001840D4-8B83-4A8C-AF2C-5429D4F9A370} = {B2A776DB-385B-4AD4-96A5-61746FD909C3}
{2A04808A-A06C-4F10-87B9-2D12E065F729} = {B2A776DB-385B-4AD4-96A5-61746FD909C3}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3DAD5980-4688-4794-9CF0-6F3CB67194E7}
Expand Down
24 changes: 12 additions & 12 deletions src/Duende.Bff.Blazor.Client/BffBlazorOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,38 @@
namespace Duende.Bff.Blazor.Client;

/// <summary>
/// Options for Blazor BFF
/// Options for Blazor BFF
/// </summary>
public class BffBlazorOptions
{
/// <summary>
/// The base path to use for remote APIs.
/// The base path to use for remote APIs.
/// </summary>
public string RemoteApiPath { get; set; } = "remote-apis/";

/// <summary>
/// The base address to use for remote APIs. If unset (the default), the
/// blazor hosting environment's base address is used.
/// The base address to use for remote APIs. If unset (the default), the
/// blazor hosting environment's base address is used.
/// </summary>
public string? RemoteApiBaseAddress { get; set; } = null;

/// <summary>
/// The base address to use for the state provider's calls to the
/// /bff/user endpoint. If unset (the default), the blazor hosting
/// environment's base address is used.
/// The base address to use for the state provider's calls to the /bff/user
/// endpoint. If unset (the default), the blazor hosting environment's base
/// address is used.
/// </summary>
public string? StateProviderBaseAddress { get; set; } = null;

/// <summary>
/// The delay, in milliseconds, before the AuthenticationStateProvider
/// will start polling the /bff/user endpoint. Defaults to 1000 ms.
/// The delay, in milliseconds, before the AuthenticationStateProvider will
/// start polling the /bff/user endpoint. Defaults to 1000 ms.
/// </summary>
public int StateProviderPollingDelay { get; set; } = 1000;

/// <summary>
/// The delay, in milliseconds, between polling requests by the
/// AuthenticationStateProvider to the /bff/user endpoint. Defaults to
/// 5000 ms.
/// The delay, in milliseconds, between polling requests by the
/// AuthenticationStateProvider to the /bff/user endpoint. Defaults to 5000
/// ms.
/// </summary>
public int StateProviderPollingInterval { get; set; } = 5000;
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ public class BffClientAuthenticationStateProvider : AuthenticationStateProvider
private ClaimsPrincipal _cachedUser = new(new ClaimsIdentity());

/// <summary>
/// An <see cref="AuthenticationStateProvider"/> intended for use in
/// Blazor WASM. It polls the /bff/user endpoint to monitor session
/// state.
/// An <see cref="AuthenticationStateProvider"/> intended for use in Blazor
/// WASM. It polls the /bff/user endpoint to monitor session state.
/// </summary>
public BffClientAuthenticationStateProvider(
PersistentComponentState state,
Expand All @@ -48,7 +47,6 @@ public override async Task<AuthenticationState> GetAuthenticationStateAsync()
var user = await GetUser();
var state = new AuthenticationState(user);

// Periodically
if (user.Identity is { IsAuthenticated: true })
{
_logger.LogInformation("starting background check..");
Expand Down
4 changes: 4 additions & 0 deletions src/Duende.Bff.Blazor.Client/ServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ namespace Duende.Bff.Blazor.Client;

public static class ServiceCollectionExtensions
{
/// <summary>
/// Adds Duende.BFF services to a Blazor Client (wasm) application.
/// </summary>
/// <param name="configureAction">A callback used to set <see cref="BffBlazorOptions"/>.</param>
public static IServiceCollection AddBffBlazorClient(this IServiceCollection services,
Action<BffBlazorOptions>? configureAction = null)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Duende.Bff.Blazor/ServerSideTokenStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace Duende.Bff.Blazor;

/// <summary>
/// A token store that retrieves tokens from server side sessions.
/// A token store that retrieves tokens from server side sessions.
/// </summary>
public class ServerSideTokenStore(
IStoreTokensInAuthenticationProperties tokensInAuthProperties,
Expand Down
8 changes: 4 additions & 4 deletions src/Duende.Bff.Shared/ClaimLite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@
namespace Duende.Bff;

/// <summary>
/// Serialization friendly claim
/// Serialization friendly claim
/// </summary>
public class ClaimLite
{
/// <summary>
/// The type
/// The type
/// </summary>
public string Type { get; init; } = default!;

/// <summary>
/// The value
/// The value
/// </summary>
public string Value { get; init; } = default!;

/// <summary>
/// The value type
/// The value type
/// </summary>
public string? ValueType { get; init; }
}
4 changes: 2 additions & 2 deletions src/Duende.Bff.Shared/ClaimsLiteExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Duende.Bff;
public static class ClaimsLiteExtensions
{
/// <summary>
/// Converts a ClaimsPrincipalLite to ClaimsPrincipal
/// Converts a ClaimsPrincipalLite to ClaimsPrincipal
/// </summary>
public static ClaimsPrincipal ToClaimsPrincipal(this ClaimsPrincipalLite principal)
{
Expand All @@ -21,7 +21,7 @@ public static ClaimsPrincipal ToClaimsPrincipal(this ClaimsPrincipalLite princip
}

/// <summary>
/// Converts a ClaimsPrincipal to ClaimsPrincipalLite
/// Converts a ClaimsPrincipal to ClaimsPrincipalLite
/// </summary>
public static ClaimsPrincipalLite ToClaimsPrincipalLite(this ClaimsPrincipal principal)
{
Expand Down
10 changes: 5 additions & 5 deletions src/Duende.Bff.Shared/ClaimsPrincipalLite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,27 @@
namespace Duende.Bff;

/// <summary>
/// Serialization friendly ClaimsPrincipal
/// Serialization friendly ClaimsPrincipal
/// </summary>
public class ClaimsPrincipalLite
{
/// <summary>
/// The authentication type
/// The authentication type
/// </summary>
public string? AuthenticationType { get; init; }

/// <summary>
/// The name claim type
/// The name claim type
/// </summary>
public string? NameClaimType { get; init; }

/// <summary>
/// The role claim type
/// The role claim type
/// </summary>
public string? RoleClaimType { get; init; }

/// <summary>
/// The claims
/// The claims
/// </summary>
public ClaimLite[] Claims { get; init; } = default!;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" />
</ItemGroup>

<ItemGroup>
<Using Include="Xunit" />
</ItemGroup>

</Project>

0 comments on commit 3c7293d

Please sign in to comment.