Skip to content

Commit 7cfe256

Browse files
authored
Merge pull request #111 from ITfoxtec/development
Development
2 parents 2785d3a + 4762077 commit 7cfe256

File tree

13 files changed

+19
-9
lines changed

13 files changed

+19
-9
lines changed

src/AspNetCoreOidcAuthCodeAllUpPartiesSample/AspNetCoreOidcAuthCodeAllUpPartiesSample.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<Version>1.4.9</Version>
66
<Nullable>disable</Nullable>
77
<ImplicitUsings>enable</ImplicitUsings>
8+
<UserSecretsId>a28eb258-4dba-4ab8-8b7a-bdc5b00663df</UserSecretsId>
89
</PropertyGroup>
910

1011
<ItemGroup>

src/AspNetCoreOidcAuthCodeAllUpPartiesSample/Models/IdentitySettings.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ public class IdentitySettings : LibrarySettings
99
public string DownParty { get; set; }
1010
public string ClientSecret { get; set; }
1111

12+
public bool IncludeApiScope { get; set; }
13+
1214
public string RequestApi1Scope { get; set; }
1315
public string RequestApi2Scope { get; set; }
1416
}

src/AspNetCoreOidcAuthCodeAllUpPartiesSample/Program.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,10 @@
112112

113113
// Scope to the application it self, used to do token exchange.
114114
options.Scope.Add(identitySettings.DownParty);
115-
options.Scope.Add(identitySettings.RequestApi1Scope);
115+
if (identitySettings.IncludeApiScope)
116+
{
117+
options.Scope.Add(identitySettings.RequestApi1Scope);
118+
}
116119
options.Scope.Add("offline_access");
117120
options.Scope.Add("profile");
118121
options.Scope.Add("email");

src/AspNetCoreOidcAuthCodeAllUpPartiesSample/appsettings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"FoxIDsAuthority": "https://localhost:44330/xxx/xxx/aspnet_oidc_allup_sample(*)/",
2121
*/
2222

23+
"IncludeApiScope": true,
2324
"RequestApi1Scope": "aspnetcore_api1_sample:some_access",
2425
"RequestApi2Scope": "aspnetcore_api2_sample:some_2_access"
2526
},

src/AspNetCoreSamlIdPSample/Controllers/SamlController.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ private IEnumerable<Claim> GetClaims(IdPSession idPSession)
139139
yield return new Claim("http://schemas.test.org/claims/CustomID", idPSession.CustomId);
140140
yield return new Claim("http://schemas.test.org/claims/customname", idPSession.CustomName);
141141

142+
yield return new Claim("space claim test", "Test value");
143+
142144
yield return new Claim(Saml2ClaimTypes.NameId, idPSession.NameIdentifier);
143145
yield return new Claim(Saml2ClaimTypes.SessionIndex, idPSession.SessionIndex);
144146
}

src/AspNetCoreSamlIdPSample/Startup.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
using ITfoxtec.Identity.Saml2.Util;
1717
using Microsoft.IdentityModel.Logging;
1818
using FoxIDs.SampleHelperLibrary.Infrastructure.Hosting;
19-
using FoxIDs.SampleHelperLibrary.Models;
2019

2120
namespace AspNetCoreSamlIdPSample
2221
{

src/BlazorBFFAspNetOidcSample.Client/BlazorBFFAspNetOidcSample.Client.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.0" PrivateAssets="all" />
1010
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.0" />
1111
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="9.0.0" />
12-
<PackageReference Include="ITfoxtec.Identity" Version="2.13.6" />
12+
<PackageReference Include="ITfoxtec.Identity" Version="2.13.9" />
1313
</ItemGroup>
1414

1515
</Project>

src/ExternalClaimsApiSample/Controllers/HomeController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public ActionResult Index()
1414
var hrml =
1515
@$"ExternalClaimsApiSample</br>
1616
The API endpoint is: {endpoint}<br>
17-
- with authentication action: {endpoint}/Authentication ";
17+
- with 'claims' action: {endpoint}/Claims ";
1818

1919
return Content(hrml, "text/html");
2020
}

src/ExternalLoginApiSample/Controllers/HomeController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public ActionResult Index()
1414
var hrml =
1515
@$"ExternalLoginApiSample</br>
1616
The API endpoint is: {endpoint}<br>
17-
- with authentication action: {endpoint}/Authentication ";
17+
- with 'authentication' action: {endpoint}/Authentication ";
1818

1919
return Content(hrml, "text/html");
2020
}

src/FoxIDs.ControlApiSample/FoxIDs.ControlApiSample.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<ItemGroup>
1313
<FrameworkReference Include="Microsoft.AspNetCore.App" />
14-
<PackageReference Include="ITfoxtec.Identity" Version="2.13.6" />
14+
<PackageReference Include="ITfoxtec.Identity" Version="2.13.9" />
1515
<PackageReference Include="NJsonSchema.CodeGeneration.CSharp" Version="11.1.0" />
1616
<PackageReference Include="NSwag.MSBuild" Version="14.2.0">
1717
<PrivateAssets>all</PrivateAssets>

0 commit comments

Comments
 (0)