Skip to content
This repository was archived by the owner on Feb 23, 2025. It is now read-only.

Commit b4987ad

Browse files
authored
Support post logout redirect state parameter (#193)
Expose post logout redirect state parameter. Already supported by IdentityModel.
1 parent d6cc637 commit b4987ad

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/AuthorizeClient.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ internal string CreateEndSessionUrl(string endpoint, LogoutRequest request)
119119

120120
return new RequestUrl(endpoint).CreateEndSessionUrl(
121121
idTokenHint: request.IdTokenHint,
122-
postLogoutRedirectUri: _options.PostLogoutRedirectUri);
122+
postLogoutRedirectUri: _options.PostLogoutRedirectUri,
123+
state: request.State);
123124
}
124125

125126
internal Dictionary<string, string> CreateAuthorizeParameters(string state, string nonce, string codeChallenge, IDictionary<string, string> extraParameters)

src/Requests/LogoutRequest.cs

+8
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,13 @@ public class LogoutRequest
3434
/// The identifier token hint.
3535
/// </value>
3636
public string IdTokenHint { get; set; }
37+
38+
/// <summary>
39+
/// Gets or sets the state.
40+
/// </summary>
41+
/// <value>
42+
/// The state value passed back to client as query string on post_logout_redirect_uri
43+
/// </value>
44+
public string State { get; set; }
3745
}
3846
}

0 commit comments

Comments
 (0)