Skip to content

Commit b7e743d

Browse files
authored
Merge pull request #115 from ITfoxtec/development
online sample config
2 parents e7e6705 + db73200 commit b7e743d

File tree

9 files changed

+39
-21
lines changed

9 files changed

+39
-21
lines changed

src/AspNetCoreApi1Sample/AspNetCoreApi1Sample.csproj

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

33
<PropertyGroup>
44
<TargetFramework>net9.0</TargetFramework>
5-
<Version>1.4.11</Version>
5+
<Version>1.4.12</Version>
66
</PropertyGroup>
77

88
<ItemGroup>

src/AspNetCoreApi2Sample/AspNetCoreApi2Sample.csproj

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

33
<PropertyGroup>
44
<TargetFramework>net9.0</TargetFramework>
5-
<Version>1.4.11</Version>
5+
<Version>1.4.12</Version>
66
<Nullable>disable</Nullable>
77
<ImplicitUsings>enable</ImplicitUsings>
88
</PropertyGroup>

src/AspNetCoreOidcAuthCodeAllUpPartiesSample/AspNetCoreOidcAuthCodeAllUpPartiesSample.csproj

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

33
<PropertyGroup>
44
<TargetFramework>net9.0</TargetFramework>
5-
<Version>1.4.11</Version>
5+
<Version>1.4.12</Version>
66
<Nullable>disable</Nullable>
77
<ImplicitUsings>enable</ImplicitUsings>
88
<UserSecretsId>a28eb258-4dba-4ab8-8b7a-bdc5b00663df</UserSecretsId>

src/AspNetCoreSamlIdPSample/AspNetCoreSamlIdPSample.csproj

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

33
<PropertyGroup>
44
<TargetFramework>net9.0</TargetFramework>
5-
<Version>1.4.11</Version>
5+
<Version>1.4.12</Version>
66
</PropertyGroup>
77

88
<ItemGroup>

src/AspNetCoreSamlIdPSample/Controllers/SamlController.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public async Task<IActionResult> Login()
103103
[Route("IdPInitiated")]
104104
public IActionResult IdPInitiated()
105105
{
106-
return base.View(new IdPInitiatedViewModel { RelyingPartyIssuers = GetRelyingPartyListItems() });
106+
return base.View(new IdPInitiatedViewModel { RelyingPartyIssuers = GetRelyingPartyListItems(), OnlineSample = settings.OnlineSample });
107107
}
108108

109109
[HttpPost("IdPInitiated")]
@@ -117,6 +117,7 @@ public async Task<IActionResult> IdPInitiated(IdPInitiatedViewModel idPInitiated
117117
if (!ModelState.IsValid)
118118
{
119119
idPInitiatedViewModel.RelyingPartyIssuers = GetRelyingPartyListItems();
120+
idPInitiatedViewModel.OnlineSample = settings.OnlineSample;
120121
return View(idPInitiatedViewModel);
121122
}
122123

src/AspNetCoreSamlIdPSample/Models/IdPInitiatedViewModel.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ public class IdPInitiatedViewModel
2525
[Display(Name = "Application type ('oidc' or 'saml2')")]
2626
[Required]
2727
[MaxLength(10)]
28-
public string ApplicationType { get; set; }
28+
public string ApplicationType { get; set; }
29+
30+
public bool OnlineSample { get; set; }
2931
}
3032
}

src/AspNetCoreSamlIdPSample/Models/Settings.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ namespace AspNetCoreSamlIdPSample.Models
55
{
66
public class Settings : LibrarySettings
77
{
8-
public List<RelyingParty> RelyingParties { get; set; }
8+
public List<RelyingParty> RelyingParties { get; set; }
9+
10+
public bool OnlineSample { get; set; }
911
}
1012
}

src/AspNetCoreSamlIdPSample/Views/Saml/IdPInitiated.cshtml

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,32 @@
1010
<blockquote>
1111
<p>Select the authentication method and fill in the name of the application that the request should be redirected to after successful login.</p>
1212
<h3>Test data</h3>
13-
<p>
14-
<strong>SAML 2.0 sample application</strong>
15-
<div>Application: aspnetcore_saml_sample</div>
16-
<i>The application redirect URL is optional</i>
17-
<div>Application type: saml2</div>
18-
</p>
19-
<p>
20-
<strong>OpenID Connect sample application</strong>
21-
<div>Application: aspnet_oidc_allup_sample</div>
22-
<div>Application redirect URL local: https://localhost:44349/home/secure and online: https://aspnetoidcsample.itfoxtec.com/home/secure</div>
23-
<i>The redirect URL need to be configured as a redirect URL for the application.</i>
24-
<div>Application type: oidc</div>
25-
</p>
13+
@if (Model.OnlineSample)
14+
{
15+
<p>
16+
<strong>OpenID Connect sample application</strong>
17+
<div>Application: aspnet_oidc_allup_online_sample</div>
18+
<div>Application redirect URL: https://aspnetoidcsample.itfoxtec.com/home/secure</div>
19+
<i>The redirect URL need to be configured as a redirect URL for the application.</i>
20+
<div>Application type: oidc</div>
21+
</p>
22+
}
23+
else
24+
{
25+
<p>
26+
<strong>SAML 2.0 sample application</strong>
27+
<div>Application: aspnetcore_saml_sample</div>
28+
<i>The application redirect URL is optional</i>
29+
<div>Application type: saml2</div>
30+
</p>
31+
<p>
32+
<strong>OpenID Connect sample application</strong>
33+
<div>Application: aspnet_oidc_allup_sample</div>
34+
<div>Application redirect URL: https://localhost:44349/home/secure</div>
35+
<i>The redirect URL need to be configured as a redirect URL for the application.</i>
36+
<div>Application type: oidc</div>
37+
</p>
38+
}
2639
</blockquote>
2740
</div>
2841
</div>

src/ExternalLoginApiSample/ExternalLoginApiSample.csproj

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

33
<PropertyGroup>
44
<TargetFramework>net9.0</TargetFramework>
5-
<Version>1.4.11</Version>
5+
<Version>1.4.12</Version>
66
<ImplicitUsings>enable</ImplicitUsings>
77
</PropertyGroup>
88

0 commit comments

Comments
 (0)