Skip to content
This repository was archived by the owner on Dec 13, 2018. It is now read-only.

Commit 200ce72

Browse files
committed
Rename PostLogoutRedirectUri to avoid spec confusion
1 parent 9797d4b commit 200ce72

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

samples/OpenIdConnect.AzureAdSample/Startup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public void ConfigureServices(IServiceCollection services)
5858
o.ClientSecret = ClientSecret; // for code flow
5959
o.Authority = Authority;
6060
o.ResponseType = OpenIdConnectResponseType.CodeIdToken;
61-
o.PostLogoutRedirectUri = "/signed-out";
61+
o.SignedOutRedirectUri = "/signed-out";
6262
// GetClaimsFromUserInfoEndpoint = true,
6363
o.Events = new OpenIdConnectEvents()
6464
{

src/Microsoft.AspNetCore.Authentication.OpenIdConnect/OpenIdConnectHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ protected override async Task HandleSignOutAsync(AuthenticationProperties proper
182182
// Get the post redirect URI.
183183
if (string.IsNullOrEmpty(properties.RedirectUri))
184184
{
185-
properties.RedirectUri = BuildRedirectUriIfRelative(Options.PostLogoutRedirectUri);
185+
properties.RedirectUri = BuildRedirectUriIfRelative(Options.SignedOutRedirectUri);
186186
if (string.IsNullOrWhiteSpace(properties.RedirectUri))
187187
{
188188
properties.RedirectUri = CurrentUri;

src/Microsoft.AspNetCore.Authentication.OpenIdConnect/OpenIdConnectOptions.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,15 +167,16 @@ public override void Validate()
167167

168168
/// <summary>
169169
/// The request path within the application's base path where the user agent will be returned after sign out from the identity provider.
170+
/// See post_logout_redirect_uri from http://openid.net/specs/openid-connect-session-1_0.html#RedirectionAfterLogout.
170171
/// </summary>
171172
public PathString SignedOutCallbackPath { get; set; }
172173

173174
/// <summary>
174-
/// The uri where the user agent will be returned to after application is signed out from the identity provider.
175+
/// The uri where the user agent will be redirected to after application is signed out from the identity provider.
175176
/// The redirect will happen after the SignedOutCallbackPath is invoked.
176177
/// </summary>
177178
/// <remarks>This URI can be out of the application's domain. By default it points to the root.</remarks>
178-
public string PostLogoutRedirectUri { get; set; } = "/";
179+
public string SignedOutRedirectUri { get; set; } = "/";
179180

180181
/// <summary>
181182
/// Gets or sets if a metadata refresh should be attempted after a SecurityTokenSignatureKeyNotFoundException. This allows for automatic

test/Microsoft.AspNetCore.Authentication.Test/OpenIdConnect/OpenIdConnectTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public async Task SignOutWithCustomRedirectUri()
119119
o.Configuration = configuration;
120120
o.StateDataFormat = stateFormat;
121121
o.SignedOutCallbackPath = "/thelogout";
122-
o.PostLogoutRedirectUri = "https://example.com/postlogout";
122+
o.SignedOutRedirectUri = "https://example.com/postlogout";
123123
});
124124

125125
var transaction = await server.SendAsync(DefaultHost + TestServerBuilder.Signout);
@@ -150,7 +150,7 @@ public async Task SignOutWith_Specific_RedirectUri_From_Authentication_Properite
150150
o.StateDataFormat = stateFormat;
151151
o.ClientId = "Test Id";
152152
o.Configuration = configuration;
153-
o.PostLogoutRedirectUri = "https://example.com/postlogout";
153+
o.SignedOutRedirectUri = "https://example.com/postlogout";
154154
});
155155

156156
var transaction = await server.SendAsync("https://example.com/signout_with_specific_redirect_uri");

0 commit comments

Comments
 (0)