IdentityServer / IdentityServer3

OpenID Connect Provider and OAuth 2.0 Authorization Server Framework for ASP.NET 4.x/Katana
https://identityserver.github.io/Documentation/
Apache License 2.0
2.01k stars 763 forks source link

Adding Prompt to SignInMessage so it can be propagated #3876

Open PhilipSkinner opened 7 years ago

PhilipSkinner commented 7 years ago

I have a need to be able to propagate the prompt parameter from a client to an upstream IDP. This wasn't possible as it wasn't included in the sign in message.

I've added a new property to the sign in message and set the prompt value in the appropriate place.

alaincroisetiere commented 7 years ago

I use the acr_values parameter in the redirect to idp notification.

var acrValues = signInMessage.AcrValues.ToDictionary(v => v.Split(':')[0], v => v.Split(':')[1]);
if (acrValues.ContainsKey(Constants.AuthorizeRequest.Prompt)) notification.ProtocolMessage.Prompt = acrValues[Constants.AuthorizeRequest.Prompt];