Skip to content

Commit

Permalink
Merge pull request #1001 from ITfoxtec/test
Browse files Browse the repository at this point in the history
Test
  • Loading branch information
Revsgaard authored Oct 31, 2024
2 parents f63cb44 + 7aab07e commit 6689afc
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/FoxIDs.Control/FoxIDs.Control.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Version>1.10.14</Version>
<Version>1.10.15</Version>
<RootNamespace>FoxIDs</RootNamespace>
<Authors>Anders Revsgaard</Authors>
<Company>ITfoxtec</Company>
Expand Down
2 changes: 1 addition & 1 deletion src/FoxIDs.ControlClient/FoxIDs.ControlClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Version>1.10.14</Version>
<Version>1.10.15</Version>
<RootNamespace>FoxIDs.Client</RootNamespace>
<Authors>Anders Revsgaard</Authors>
<Company>ITfoxtec</Company>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ namespace FoxIDs.Client.Models.ViewModels
{
public interface ILinkExternalUser : IOAuthClaimTransformViewModel, IDynamicElementsViewModel
{
[Display(Name = "Automatically create/provision users")]
[Display(Name = "Optional create/provision external users automatically")]
public bool AutoCreateUser { get; set; }

[Display(Name = "Require a user")]
[Display(Name = "Optional require external user")]
public bool RequireUser { get; set; }

[Required]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
<div class="info-text">
The external user is linked after the claim transformation on the authentication method has been executed.
<br />
Claims on the external user can optionally override revived and transformed claims.
</div>
<div class="info-text">The external users are linked with a claim type (e.g. <code>sub</code> or <code>email</code>) after the claim transformation on the authentication method has been performed.</div>
<FInputText @bind-Value="Model.LinkClaimType" For="@(() => Model.LinkClaimType)" />

<FInputToggle @bind-Value="Model.AutoCreateUser" For="@(() => Model.AutoCreateUser)" TextType="y.n" />
<FInputToggle @bind-Value="Model.RequireUser" For="@(() => Model.RequireUser)" TextType="y.n" />
<div class="info-text">The external user is linked with a claim type (e.g., 'sub' or 'email'). Each user has a unique claim value.</div>
<FInputText @bind-Value="Model.LinkClaimType" For="@(() => Model.LinkClaimType)" />

<div class="info-text">By default, claims on external users are added to the revived claims with the exception of the <code>sub</code> claim, which overrides the revived <code>sub</code> claim.</div>
<div class="info-text">
By default, claims on external users are added to the revived claims with the exception of the <code>sub</code> claim, which overrides the revived <code>sub</code> claim.
<br />
Claims on external users can optionally override revived and transformed claims.
</div>

<FInputToggle @bind-Value="Model.OverwriteClaims" For="@(() => Model.OverwriteClaims)" TextType="y.n" />
<DynamicElements Model="Model" IncludeEmailElement=true />
Expand Down
2 changes: 1 addition & 1 deletion src/FoxIDs.ControlShared/FoxIDs.ControlShared.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Version>1.10.14</Version>
<Version>1.10.15</Version>
<RootNamespace>FoxIDs</RootNamespace>
<Authors>Anders Revsgaard</Authors>
<Company>ITfoxtec</Company>
Expand Down
2 changes: 1 addition & 1 deletion src/FoxIDs.Shared/FoxIDs.Shared.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Version>1.10.14</Version>
<Version>1.10.15</Version>
<RootNamespace>FoxIDs</RootNamespace>
<Authors>Anders Revsgaard</Authors>
<Company>ITfoxtec</Company>
Expand Down
2 changes: 1 addition & 1 deletion src/FoxIDs.Shared/Models/Parties/LinkExternalUser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public virtual IEnumerable<ValidationResult> Validate(ValidationContext validati
var results = new List<ValidationResult>();
if (AutoCreateUser && RequireUser)
{
results.Add(new ValidationResult($"Both the {nameof(AutoCreateUser)} and the {nameof(RequireUser)} can not be enabled at the same time.", new[] { nameof(AutoCreateUser), nameof(RequireUser) }));
results.Add(new ValidationResult($"Both the {nameof(AutoCreateUser)} and the {nameof(RequireUser)} can not be enabled at the same time.", [nameof(AutoCreateUser), nameof(RequireUser)]));
}
return results;
}
Expand Down
2 changes: 1 addition & 1 deletion src/FoxIDs.SharedBase/FoxIDs.SharedBase.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Version>1.10.14</Version>
<Version>1.10.15</Version>
<RootNamespace>FoxIDs</RootNamespace>
<Authors>Anders Revsgaard</Authors>
<Company>ITfoxtec</Company>
Expand Down
2 changes: 1 addition & 1 deletion src/FoxIDs/FoxIDs.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Version>1.10.14</Version>
<Version>1.10.15</Version>
<RootNamespace>FoxIDs</RootNamespace>
<Authors>Anders Revsgaard</Authors>
<Company>ITfoxtec</Company>
Expand Down
4 changes: 4 additions & 0 deletions src/FoxIDs/Logic/Tracks/ExternalUserLogic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ public ExternalUserLogic(TelemetryScopedLogger logger, ITenantDataRepository ten
logger.ScopeTrace(() => $"AuthMethod, External user output JWT claims '{externalUserClaims.ToFormattedString()}'", traceType: TraceTypes.Claim);
return (null, externalUserClaims);
}
else
{
requireUserExceptionAction($"External user is disabled for link claim type '{party.LinkExternalUser.LinkClaimType}' and value '{linkClaimValue}'.");
}
}
else if (party.LinkExternalUser.AutoCreateUser)
{
Expand Down

0 comments on commit 6689afc

Please sign in to comment.