diff --git a/sandbox/OpenIddict.Sandbox.Console.Client/InteractiveService.cs b/sandbox/OpenIddict.Sandbox.Console.Client/InteractiveService.cs index 6822ecdc5..a07f2b37a 100644 --- a/sandbox/OpenIddict.Sandbox.Console.Client/InteractiveService.cs +++ b/sandbox/OpenIddict.Sandbox.Console.Client/InteractiveService.cs @@ -126,6 +126,7 @@ await _service.RevokeTokenAsync(new() var nonce = (await _service.SignOutInteractivelyAsync(new() { CancellationToken = stoppingToken, + IdentityTokenHint = response.BackchannelIdentityToken ?? response.FrontchannelIdentityToken, ProviderName = provider })).Nonce; diff --git a/src/OpenIddict.Client/OpenIddictClientModels.cs b/src/OpenIddict.Client/OpenIddictClientModels.cs index 6f175514e..2498cc88e 100644 --- a/src/OpenIddict.Client/OpenIddictClientModels.cs +++ b/src/OpenIddict.Client/OpenIddictClientModels.cs @@ -165,6 +165,17 @@ public sealed record class InteractiveChallengeRequest [EditorBrowsable(EditorBrowsableState.Advanced)] public string? GrantType { get; init; } + /// + /// Gets or sets the optional identity token hint that will + /// be sent to the authorization server, if applicable. + /// + public string? IdentityTokenHint { get; set; } + + /// + /// Gets or sets the optional login hint that will be sent to the authorization server, if applicable. + /// + public string? LoginHint { get; set; } + /// /// Gets or sets the application-specific properties that will be added to the context. /// @@ -253,6 +264,17 @@ public sealed record class InteractiveSignOutRequest /// public CancellationToken CancellationToken { get; init; } + /// + /// Gets or sets the optional identity token hint that will + /// be sent to the authorization server, if applicable. + /// + public string? IdentityTokenHint { get; set; } + + /// + /// Gets or sets the optional login hint that will be sent to the authorization server, if applicable. + /// + public string? LoginHint { get; set; } + /// /// Gets or sets the application-specific properties that will be added to the context. /// diff --git a/src/OpenIddict.Client/OpenIddictClientService.cs b/src/OpenIddict.Client/OpenIddictClientService.cs index aade971e6..cad51c4e3 100644 --- a/src/OpenIddict.Client/OpenIddictClientService.cs +++ b/src/OpenIddict.Client/OpenIddictClientService.cs @@ -389,7 +389,9 @@ public async ValueTask ChallengeInteractivelyAsync(I CancellationToken = request.CancellationToken, CodeChallengeMethod = request.CodeChallengeMethod, GrantType = request.GrantType, + IdentityTokenHint = request.IdentityTokenHint, Issuer = request.Issuer, + LoginHint = request.LoginHint, Principal = new ClaimsPrincipal(new ClaimsIdentity()), ProviderName = request.ProviderName, RegistrationId = request.RegistrationId, @@ -1399,7 +1401,9 @@ public async ValueTask SignOutInteractivelyAsync(Inter var context = new ProcessSignOutContext(transaction) { CancellationToken = request.CancellationToken, + IdentityTokenHint = request.IdentityTokenHint, Issuer = request.Issuer, + LoginHint = request.LoginHint, Principal = new ClaimsPrincipal(new ClaimsIdentity()), ProviderName = request.ProviderName, RegistrationId = request.RegistrationId,