Passing parameters to Azure Active Directory authentication

后端 未结 3 1133
广开言路
广开言路 2021-01-01 01:31

I have an ASP.Net MVC Application, Owin, and I\'m using Azure Active Directory authentication as well.

I want to pass a parameter when the user is redirected to the

3条回答
  •  感动是毒
    2021-01-01 02:00

    Just add context.ProtocolMessage.SetParameter(, ); in RedirectToIdentityProvider

    Notifications = new OpenIdConnectAuthenticationNotifications()
                {
                    RedirectToIdentityProvider = context =>
                        {
                            context.ProtocolMessage.SetParameter("prompt", "login");
                            return Task.FromResult(0);
                        },
                    
                }
            };
    

提交回复
热议问题