Skip to content

Commit

Permalink
fix: Add yt01 token exchange, revert .NET 8 upgrade (#46)
Browse files Browse the repository at this point in the history
* Revert "Update to .NET 8 (#40)"

This reverts commit 8e7a5e7.

* add yt01 token exchange
  • Loading branch information
knuhau authored Oct 22, 2024
1 parent 8e7a5e7 commit 7319e73
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 22 deletions.
12 changes: 6 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore

# JetBrains IDEs
.idea/

# macOS
.DS_Store

# Secrets
Certs/

Expand Down Expand Up @@ -34,12 +40,6 @@ bld/
[Ll]og/
[Ll]ogs/

# JetBrains IDEs
.idea/

#MacOS
.DS_Store

# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
Expand Down
9 changes: 5 additions & 4 deletions samples/SampleWebApp/SampleWebApp.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

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

<ItemGroup>
<PackageReference Include="Azure.Identity" Version="1.12.0" />
<PackageReference Include="Azure.Security.KeyVault.Secrets" Version="4.6.0" />
<PackageReference Include="Azure.Identity" Version="1.10.2" />
<PackageReference Include="Azure.Security.KeyVault.Secrets" Version="4.5.0" />
</ItemGroup>

<ItemGroup>
Expand All @@ -19,4 +19,5 @@
</None>
</ItemGroup>

</Project>

</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

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

<PropertyGroup>
Expand All @@ -14,17 +14,17 @@
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/Altinn/altinn-apiclient-maskinporten</RepositoryUrl>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0" />
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="8.0.1" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
<PackageReference Include="Microsoft.Extensions.Options" Version="7.0.1" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="7.0.0" />
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="7.0.2" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.0.2" />
</ItemGroup>

</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ private string GetTokenExchangeEndpoint(string environment)
"at22" => "https://platform.at22.altinn.cloud/authentication/api/v1/exchange/maskinporten",
"at23" => "https://platform.at23.altinn.cloud/authentication/api/v1/exchange/maskinporten",
"at24" => "https://platform.at24.altinn.cloud/authentication/api/v1/exchange/maskinporten",
"yt01" => "https://platform.yt01.altinn.cloud/authentication/api/v1/exchange/maskinporten",
// Supported for backward compatibility
"ver1" => "https://platform.tt02.altinn.no/authentication/api/v1/exchange/maskinporten",
"ver2" => "https://platform.tt02.altinn.no/authentication/api/v1/exchange/maskinporten",
Expand Down

0 comments on commit 7319e73

Please sign in to comment.