Skip to content

Commit

Permalink
bump libraries, in particular upgrading identity server to v7
Browse files Browse the repository at this point in the history
  • Loading branch information
AerisG222 committed Feb 23, 2024
1 parent 263ae34 commit f1e6a95
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 68 deletions.
2 changes: 1 addition & 1 deletion src/Maw.Cache/Maw.Cache.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="StackExchange.Redis" Version="2.7.10" />
<PackageReference Include="StackExchange.Redis" Version="2.7.20" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/Maw.Data/Maw.Data.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Dapper" Version="2.1.24" />
<PackageReference Include="Dapper" Version="2.1.28" />
<PackageReference Include="MiniProfiler.AspNetCore.Mvc" Version="4.3.8" />
<PackageReference Include="Npgsql" Version="8.0.1" />
<PackageReference Include="Npgsql" Version="8.0.2" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/Maw.Domain/Maw.Domain.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Google.Apis.Gmail.v1" Version="1.64.0.3231" />
<PackageReference Include="Google.Apis.Gmail.v1" Version="1.67.0.3287" />
<PackageReference Include="IdentityModel" Version="6.2.0" />
<PackageReference Include="MailKit" Version="4.3.0" />
<PackageReference Include="MedallionShell" Version="1.6.2" />
<PackageReference Include="Microsoft.FeatureManagement" Version="3.1.1" />
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.1" />
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.2" />
<PackageReference Include="SolrNet.Core" Version="1.1.1" />
</ItemGroup>

Expand Down
6 changes: 3 additions & 3 deletions src/api/api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.2" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.Hosting.Systemd" Version="8.0.0" />
<PackageReference Include="NSwag.AspNetCore" Version="14.0.0-preview012" />
<PackageReference Include="NSwag.AspNetCore" Version="14.0.3" />
<PackageReference Include="NWebsec.AspNetCore.Middleware" Version="3.0.0" />
<PackageReference Include="SolrNet.Core" Version="1.1.1" />
<PackageReference Include="SolrNet.Microsoft.DependencyInjection" Version="1.1.1" />
Expand Down
41 changes: 3 additions & 38 deletions src/auth/Models/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,18 @@ public class Config

readonly string _wwwUrl;
readonly string _wwwSecret;
readonly string _photosUrl;
readonly string _filesUrl;
readonly string _photosSolidUrl;

public Config(string wwwUrl, string wwwSecret, string photosUrl, string filesUrl, string photosSolidUrl)
public Config(string wwwUrl, string wwwSecret, string filesUrl, string photosSolidUrl)
{
ArgumentNullException.ThrowIfNull(wwwUrl);
ArgumentNullException.ThrowIfNull(wwwSecret);
ArgumentNullException.ThrowIfNull(photosUrl);
ArgumentNullException.ThrowIfNull(filesUrl);
ArgumentNullException.ThrowIfNull(photosSolidUrl);

_wwwUrl = wwwUrl;
_wwwSecret = wwwSecret;
_photosUrl = photosUrl;
_filesUrl = filesUrl;
_photosSolidUrl = photosSolidUrl;
}
Expand Down Expand Up @@ -125,47 +122,14 @@ public IEnumerable<Client> GetClients()
// AbsoluteRefreshTokenLifetime = 20
},
new Client
{
ClientId = "maw-photos",
ClientName = "mikeandwan.us Photo Application",
AllowedGrantTypes = GrantTypes.Code,
RequireClientSecret = false,
AllowAccessTokensViaBrowser = true,
AllowOfflineAccess = true,
RedirectUris = new List<string>
{
$"{_photosUrl}/login",
$"{_photosUrl}/silent-refresh.html"
},
PostLogoutRedirectUris = new List<string>
{
$"{_photosUrl}/signout-callback.html"
},
AllowedCorsOrigins = new List<string>
{
_photosUrl
},
AllowedScopes = new List<string>
{
IdentityServerConstants.StandardScopes.OfflineAccess,
IdentityServerConstants.StandardScopes.OpenId,
IdentityServerConstants.StandardScopes.Profile,

// apis
"maw_api",

// identity resources
JwtClaimTypes.Role
}
},
new Client
{
ClientId = "maw-photos-solid",
ClientName = "mikeandwan.us Photo Application",
AllowedGrantTypes = GrantTypes.Code,
RequireClientSecret = false,
AllowAccessTokensViaBrowser = true,
AllowOfflineAccess = true,
RefreshTokenUsage = TokenUsage.ReUse,
RedirectUris = new List<string>
{
$"{_photosSolidUrl}/login/handle-response"
Expand Down Expand Up @@ -199,6 +163,7 @@ public IEnumerable<Client> GetClients()
RequireClientSecret = false,
AllowAccessTokensViaBrowser = true,
AllowOfflineAccess = true,
RefreshTokenUsage = TokenUsage.ReUse,
RedirectUris = new List<string>
{
$"{_filesUrl}/login",
Expand Down
1 change: 0 additions & 1 deletion src/auth/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public void ConfigureServices(IServiceCollection services)
var config = new Config(
_config["Environment:WwwUrl"] ?? throw new InvalidOperationException("www url cannot be null!"),
_config["Environment:WwwClientSecret"] ?? throw new InvalidOperationException("www client secret cannot be null!"),
_config["Environment:PhotosUrl"] ?? throw new InvalidOperationException("photos url cannot be null!"),
_config["Environment:FilesUrl"] ?? throw new InvalidOperationException("files url cannot be null!"),
_config["Environment:PhotosSolidUrl"] ?? throw new InvalidOperationException("photos-solid url cannot be null!"));

Expand Down
14 changes: 7 additions & 7 deletions src/auth/auth.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Duende.IdentityServer" Version="6.3.7" />
<PackageReference Include="Duende.IdentityServer.AspNetIdentity" Version="6.3.7" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Google" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Twitter" Version="8.0.0" />
<PackageReference Include="Duende.IdentityServer" Version="7.0.1" />
<PackageReference Include="Duende.IdentityServer.AspNetIdentity" Version="7.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Google" Version="8.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="8.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Twitter" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.Hosting.Systemd" Version="8.0.0" />
<PackageReference Include="AspNet.Security.OAuth.GitHub" Version="8.0.0" />
<PackageReference Include="Dapper" Version="2.1.24" />
<PackageReference Include="Npgsql" Version="8.0.1" />
<PackageReference Include="Dapper" Version="2.1.28" />
<PackageReference Include="Npgsql" Version="8.0.2" />
<PackageReference Include="NWebsec.AspNetCore.Middleware" Version="3.0.0" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/www/www.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.Hosting.Systemd" Version="8.0.0" />
<PackageReference Include="IdentityModel" Version="6.2.0" />
<PackageReference Include="Microsoft.FeatureManagement.AspNetCore" Version="3.1.1" />
Expand Down
10 changes: 5 additions & 5 deletions tests/Maw.Cache.Tests/Maw.Cache.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="StackExchange.Redis" Version="2.7.10" />
<PackageReference Include="xunit" Version="2.6.4" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="StackExchange.Redis" Version="2.7.20" />
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PackageReference Include="coverlet.collector" Version="6.0.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
8 changes: 4 additions & 4 deletions tests/Maw.Data.Tests/Maw.Data.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.4" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<PackageReference Include="xunit.analyzers" Version="1.8.0" />
<PackageReference Include="xunit.analyzers" Version="1.11.0" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions tests/Maw.Domain.Models.Tests/Maw.Domain.Models.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.4" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PackageReference Include="coverlet.collector" Version="6.0.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down

0 comments on commit f1e6a95

Please sign in to comment.