Update project reference and cleanup code
A reference to Elsa.EntityFrameworkCore.Sqlite.csproj was added in the Elsa.Samples.AspNet.DynamicActivityProvider.csproj, providing SQLite support. The Add method in ExpressionDescriptorRegistry.cs was reformatted for better readability. In the Program.cs file, the signing key was updated to meet the minimum length requirement and some unnecessary comments were removed.
This commit is contained in:
parent
099f87c1ad
commit
0ecc09438e
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\src\bundles\Elsa\Elsa.csproj" />
|
||||
<ProjectReference Include="..\..\..\src\modules\Elsa.EntityFrameworkCore.Sqlite\Elsa.EntityFrameworkCore.Sqlite.csproj" />
|
||||
<ProjectReference Include="..\..\..\src\modules\Elsa.Http\Elsa.Http.csproj" />
|
||||
<ProjectReference Include="..\..\..\src\modules\Elsa.Identity\Elsa.Identity.csproj" />
|
||||
<ProjectReference Include="..\..\..\src\modules\Elsa.JavaScript\Elsa.JavaScript.csproj" />
|
||||
|
|
|
|||
|
|
@ -22,15 +22,12 @@ services.AddElsa(elsa => elsa
|
|||
identity.UseEntityFrameworkCore();
|
||||
identity.TokenOptions = options =>
|
||||
{
|
||||
options.SigningKey = "secret-token-signing-key";
|
||||
options.SigningKey = "secret-token-signing-key-with-a-minimum-length-of-256-bits";
|
||||
options.AccessTokenLifetime = TimeSpan.FromDays(1);
|
||||
};
|
||||
})
|
||||
|
||||
// HTTP workflows.
|
||||
.UseJavaScript()
|
||||
.UseHttp()
|
||||
|
||||
// Use default authentication (JWT).
|
||||
.UseDefaultAuthentication(auth => auth.UseAdminApiKey())
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,10 @@ public class ExpressionDescriptorRegistry : IExpressionDescriptorRegistry
|
|||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void Add(ExpressionDescriptor descriptor) => _expressionSyntaxDescriptors[descriptor.Type] = descriptor;
|
||||
public void Add(ExpressionDescriptor descriptor)
|
||||
{
|
||||
_expressionSyntaxDescriptors[descriptor.Type] = descriptor;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void AddRange(IEnumerable<ExpressionDescriptor> descriptors)
|
||||
|
|
@ -35,5 +38,5 @@ public class ExpressionDescriptorRegistry : IExpressionDescriptorRegistry
|
|||
public ExpressionDescriptor? Find(Func<ExpressionDescriptor, bool> predicate) => _expressionSyntaxDescriptors.Values.FirstOrDefault(predicate);
|
||||
|
||||
/// <inheritdoc />
|
||||
public ExpressionDescriptor? Find(string type) => _expressionSyntaxDescriptors.TryGetValue(type, out var descriptor) ? descriptor : default!;
|
||||
public ExpressionDescriptor? Find(string type) => _expressionSyntaxDescriptors.TryGetValue(type, out var descriptor) ? descriptor : default;
|
||||
}
|
||||
Loading…
Reference in a new issue