Rename PostLogoutRedirectUri to avoid spec confusion
This commit is contained in:
parent
9797d4bc5f
commit
200ce72312
|
|
@ -58,7 +58,7 @@ namespace OpenIdConnect.AzureAdSample
|
||||||
o.ClientSecret = ClientSecret; // for code flow
|
o.ClientSecret = ClientSecret; // for code flow
|
||||||
o.Authority = Authority;
|
o.Authority = Authority;
|
||||||
o.ResponseType = OpenIdConnectResponseType.CodeIdToken;
|
o.ResponseType = OpenIdConnectResponseType.CodeIdToken;
|
||||||
o.PostLogoutRedirectUri = "/signed-out";
|
o.SignedOutRedirectUri = "/signed-out";
|
||||||
// GetClaimsFromUserInfoEndpoint = true,
|
// GetClaimsFromUserInfoEndpoint = true,
|
||||||
o.Events = new OpenIdConnectEvents()
|
o.Events = new OpenIdConnectEvents()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -182,7 +182,7 @@ namespace Microsoft.AspNetCore.Authentication.OpenIdConnect
|
||||||
// Get the post redirect URI.
|
// Get the post redirect URI.
|
||||||
if (string.IsNullOrEmpty(properties.RedirectUri))
|
if (string.IsNullOrEmpty(properties.RedirectUri))
|
||||||
{
|
{
|
||||||
properties.RedirectUri = BuildRedirectUriIfRelative(Options.PostLogoutRedirectUri);
|
properties.RedirectUri = BuildRedirectUriIfRelative(Options.SignedOutRedirectUri);
|
||||||
if (string.IsNullOrWhiteSpace(properties.RedirectUri))
|
if (string.IsNullOrWhiteSpace(properties.RedirectUri))
|
||||||
{
|
{
|
||||||
properties.RedirectUri = CurrentUri;
|
properties.RedirectUri = CurrentUri;
|
||||||
|
|
|
||||||
|
|
@ -167,15 +167,16 @@ namespace Microsoft.AspNetCore.Authentication.OpenIdConnect
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The request path within the application's base path where the user agent will be returned after sign out from the identity provider.
|
/// The request path within the application's base path where the user agent will be returned after sign out from the identity provider.
|
||||||
|
/// See post_logout_redirect_uri from http://openid.net/specs/openid-connect-session-1_0.html#RedirectionAfterLogout.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public PathString SignedOutCallbackPath { get; set; }
|
public PathString SignedOutCallbackPath { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The uri where the user agent will be returned to after application is signed out from the identity provider.
|
/// The uri where the user agent will be redirected to after application is signed out from the identity provider.
|
||||||
/// The redirect will happen after the SignedOutCallbackPath is invoked.
|
/// The redirect will happen after the SignedOutCallbackPath is invoked.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>This URI can be out of the application's domain. By default it points to the root.</remarks>
|
/// <remarks>This URI can be out of the application's domain. By default it points to the root.</remarks>
|
||||||
public string PostLogoutRedirectUri { get; set; } = "/";
|
public string SignedOutRedirectUri { get; set; } = "/";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets if a metadata refresh should be attempted after a SecurityTokenSignatureKeyNotFoundException. This allows for automatic
|
/// Gets or sets if a metadata refresh should be attempted after a SecurityTokenSignatureKeyNotFoundException. This allows for automatic
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@ namespace Microsoft.AspNetCore.Authentication.Test.OpenIdConnect
|
||||||
o.Configuration = configuration;
|
o.Configuration = configuration;
|
||||||
o.StateDataFormat = stateFormat;
|
o.StateDataFormat = stateFormat;
|
||||||
o.SignedOutCallbackPath = "/thelogout";
|
o.SignedOutCallbackPath = "/thelogout";
|
||||||
o.PostLogoutRedirectUri = "https://example.com/postlogout";
|
o.SignedOutRedirectUri = "https://example.com/postlogout";
|
||||||
});
|
});
|
||||||
|
|
||||||
var transaction = await server.SendAsync(DefaultHost + TestServerBuilder.Signout);
|
var transaction = await server.SendAsync(DefaultHost + TestServerBuilder.Signout);
|
||||||
|
|
@ -150,7 +150,7 @@ namespace Microsoft.AspNetCore.Authentication.Test.OpenIdConnect
|
||||||
o.StateDataFormat = stateFormat;
|
o.StateDataFormat = stateFormat;
|
||||||
o.ClientId = "Test Id";
|
o.ClientId = "Test Id";
|
||||||
o.Configuration = configuration;
|
o.Configuration = configuration;
|
||||||
o.PostLogoutRedirectUri = "https://example.com/postlogout";
|
o.SignedOutRedirectUri = "https://example.com/postlogout";
|
||||||
});
|
});
|
||||||
|
|
||||||
var transaction = await server.SendAsync("https://example.com/signout_with_specific_redirect_uri");
|
var transaction = await server.SendAsync("https://example.com/signout_with_specific_redirect_uri");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue