Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/nuget/src/LtiAdvantage.AspNetCo…
Browse files Browse the repository at this point in the history
…re/MinVer-6.0.0
  • Loading branch information
srijken authored Oct 18, 2024
2 parents 9dc0402 + 63f9ad0 commit 0a0ef89
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 48 deletions.
11 changes: 2 additions & 9 deletions src/LtiAdvantage.AspNetCore/LtiAdvantage.AspNetCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<Description>ASP.NET Core library with IMS LTIAdvantage support for Tool Consumer and Tool Provider applications.</Description>
<AssemblyTitle>LtiAdvantage.AspNetCore</AssemblyTitle>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>LtiAdvantage.AspNetCore</AssemblyName>
<PackageId>LtiAdvantage.AspNetCore</PackageId>
<PackageTags>IMS;LTI;LTIAdvantage;.NET Core</PackageTags>
Expand All @@ -23,14 +23,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BouncyCastle.NetCore" Version="2.2.1" />
<PackageReference Include="MinVer" Version="6.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='netstandard2.0'">
<PackageReference Include="Microsoft.AspNetCore" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.24" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Api.Analyzers" Version="2.2.6">
Expand All @@ -39,10 +36,6 @@
</PackageReference>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='net6.0'">
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.24" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\LtiAdvantage\LtiAdvantage.csproj" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/LtiAdvantage.AspNetCore/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# LtiAdvantage.AspNetCore

This library provides ASP.NET Core controller implementations to support platform development.
It targets `netstandard2.0` and `net6.0`
It targets `net8.0`
It uses BouncyCastle.NetCore to read and write PEM formatted keys
for compatibility with the [IMS LTI Reference Implementation](https://github.com/IMSGlobal/lti-reference-implementation).
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<Description>.NET Core library with IMS LTIAdvantage support for Tool Consumer and Tool Provider applications.</Description>
<AssemblyTitle>LtiAdvantage.IdentityModel</AssemblyTitle>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>LtiAdvantage.IdentityModel</AssemblyName>
<PackageId>LtiAdvantage.IdentityModel</PackageId>
<PackageTags>IMS;LTI;LTIAdvantage;.NET Core</PackageTags>
Expand All @@ -17,11 +17,11 @@
<ItemGroup>
<PackageReference Include="BouncyCastle.NetCore" Version="2.2.1" />
<PackageReference Include="IdentityModel" Version="6.2.0" />
<PackageReference Include="MinVer" Version="4.3.0">
<PackageReference Include="MinVer" Version="6.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.1.2" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.1.2" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<Description>.NET Core library with IMS LTIAdvantage support for Tool Consumer and Tool Provider applications.</Description>
<AssemblyTitle>LtiAdvantage.IdentityServer4</AssemblyTitle>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>LtiAdvantage.IdentityServer4</AssemblyName>
<PackageId>LtiAdvantage.IdentityServer4</PackageId>
<PackageTags>IMS;LTI;LTIAdvantage;.NET Core</PackageTags>
Expand All @@ -17,7 +17,7 @@
<ItemGroup>
<PackageReference Include="BouncyCastle.NetCore" Version="2.2.1" />
<PackageReference Include="IdentityServer4" Version="4.1.2" />
<PackageReference Include="MinVer" Version="4.3.0">
<PackageReference Include="MinVer" Version="6.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
3 changes: 1 addition & 2 deletions src/LtiAdvantage/Lti/ContextClaimValueType.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;

namespace LtiAdvantage.Lti
Expand Down
23 changes: 5 additions & 18 deletions src/LtiAdvantage/LtiAdvantage.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<Description>.NET Core library with IMS LTIAdvantage support for Tool Consumer and Tool Provider applications.</Description>
<AssemblyTitle>LtiAdvantage</AssemblyTitle>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>LtiAdvantage</AssemblyName>
<PackageId>LtiAdvantage</PackageId>
<PackageTags>IMS;LTI;LTIAdvantage;.NET Core</PackageTags>
Expand All @@ -12,6 +12,7 @@
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/LtiLibrary/LtiAdvantage</RepositoryUrl>
<MinVerTagPrefix>v</MinVerTagPrefix>
<LangVersion>10.0</LangVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand All @@ -23,27 +24,13 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BouncyCastle.NetCore" Version="2.2.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.1" />
<PackageReference Include="MinVer" Version="6.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='netstandard2.0'">
<PackageReference Include="Microsoft.AspNetCore" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.24" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Api.Analyzers" Version="2.2.6">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.1.2" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='net6.0'">
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.24" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.1.2" />
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.1.2" />
</ItemGroup>

</Project>
31 changes: 23 additions & 8 deletions src/LtiAdvantage/LtiAdvantage.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/LtiAdvantage/Utilities/JsonElementExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public static class JsonElementExtensions
/// </summary>
/// <param name="source"></param>
/// <param name="propertyName"></param>
/// <param name="id"></param>
/// <param name="item"></param>
/// <returns></returns>
public static bool TryGetString(this JsonElement source, string propertyName, out string item)
{
Expand Down
5 changes: 5 additions & 0 deletions src/LtiAdvantage/Utilities/JsonOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

namespace LtiAdvantage.Utilities
{
/// <summary>
/// Converts an ISO DateTime to/from JSON.
/// </summary>
public class IsoDateTimeConverter : JsonConverter<DateTime>
{
private const string Iso8601Format = "yyyy-MM-ddTHH:mm:ss.fffZ";
Expand All @@ -19,6 +22,7 @@ public class IsoDateTimeConverter : JsonConverter<DateTime>
// Add more formats to handle here if needed
};

/// <inheritdoc />
public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
var dateString = reader.GetString();
Expand All @@ -41,6 +45,7 @@ public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, Jso
throw new JsonException("Unable to parse date time value.");
}

/// <inheritdoc />
public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options)
{
writer.WriteStringValue(value.ToUniversalTime().ToString(Iso8601Format, CultureInfo.InvariantCulture));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFramework>net8.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
3 changes: 1 addition & 2 deletions test/LtiAdvantage.UnitTests/JsonAssertions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Microsoft.Extensions.Options;
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
Expand Down
2 changes: 1 addition & 1 deletion test/LtiAdvantage.UnitTests/LtiAdvantage.UnitTests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFramework>net8.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down

0 comments on commit 0a0ef89

Please sign in to comment.