in Education by
Is there any way to add a custom parameter to identityserver auth request. I tried this way. but it will add parameters return URL, not as auth request query strings. Events = new OpenIdConnectEvents { OnRedirectToIdentityProvider = context => { if (context.Properties.Items.ContainsKey("connection")) context.ProtocolMessage.SetParameter("connection", context.Properties.Items["connection"]); return Task.FromResult(0); } } but I need to have those parameters on request URL not a parameter of return url.. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
The request url looks like: https://login.dev.domain.com/connect/authorize?client_id=657ce44e-10a2-4b66-9078-7f1acf92811f&redirect_uri=https%3A%2F%2Fmyapp.dev.domain.com%2Fsignin-oidc&response_type=code&scope=openid%20email&response_mode=form_post&nonce=636888568253105245.ODY4MzNjNGMtZDQxYi00YTkzLTg5OTctNTJkZGRjM2IwNGRjMjEwMWEzZGQtYWY1Mi00ODQ0LWE0ZGYtZTAxOWU0YjQyODkz&ui_locales=en&state=CfDJ8F-9xHJQT19NjH-KMvnd4SnuYPsaINrq_yn6DAfN8Y6h5aHBoukF0TPqZHOYk0mroCw4tz-03ajp6cgaomZ8HnrE6Or6ZzzNdfUqzDpDNH4VwWCax8JwtsRreob9j-nsOnttzDkRVTCzVEjjHpR__OR498c-kVXf-RjudGPghE0K&x-client-SKU=ID_NETSTANDARD1_4&x-client-ver=5.2.0.0 where, in my case ui_locales=en is my custom parameter. It's not a part of redirect_uri, just one more query parameter, separated by & signs. That works when you need to pass some data to your IdP. When you need just to keep some data during the request and get it back with authorization response, you can involve the State pre-defined parameter. services.AddAuthentication().AddOpenIdConnect(Constants.MyIdpName, Constants.MyIdpName, options => { *** options.Events = new OpenIdConnectEvents { OnRedirectToIdentityProvider = ctx => { var rcf = ctx.HttpContext.Features.Get(); if (rcf.Provider != null) { string lng = rcf.RequestCulture.Culture.TwoLetterISOLanguageName; ctx.ProtocolMessage.Parameters.Add("ui_locales", lng == "nn" || lng == "nb" ? "no" : lng); } return Task.CompletedTask; } } }

Related questions

0 votes
    Department and store model. They are a one to one relationship. when I do the (Include) only some ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 7, 2022 in Education by JackTerrance
0 votes
    Pulling my hair out here. All was working fine, and then out of the blue, I started to get some ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 21, 2022 in Education by JackTerrance
0 votes
    I've got a Sharepoint WebPart which loads a custom User Control. The user control contains a Repeater which ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 22, 2022 in Education by JackTerrance
0 votes
    I've got a Sharepoint WebPart which loads a custom User Control. The user control contains a Repeater which ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 21, 2022 in Education by JackTerrance
0 votes
    I've got a Sharepoint WebPart which loads a custom User Control. The user control contains a Repeater which ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 21, 2022 in Education by JackTerrance
0 votes
    I've got a Sharepoint WebPart which loads a custom User Control. The user control contains a Repeater which ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 21, 2022 in Education by JackTerrance
0 votes
    I have an AWS Lambda function built in .NET Core 2.1. Which is triggered by a SQS Queue. This ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 3, 2022 in Education by JackTerrance
0 votes
    I create a project with "dotnet new angular". When a breakpoint is set on a Typescript instruction, it ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 2, 2022 in Education by JackTerrance
0 votes
    i am using serilog in asp net core application and using a json formatter to create a daily log file ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 1, 2022 in Education by JackTerrance
0 votes
    I'm doing a simple dotnet restoreon my mac. I'm using the (for now) latest dotnet CLI version 2. ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 24, 2022 in Education by JackTerrance
0 votes
    I have an AWS Lambda function built in .NET Core 2.1. Which is triggered by a SQS Queue. This ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 22, 2022 in Education by JackTerrance
0 votes
    F# allows constraining generic types on the type's members, similar to: type ClassWithMemberConstraint = class end ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 4, 2022 in Education by JackTerrance
0 votes
    I'm new to React with Redux and I've been working on a new web application that has some basic ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 29, 2022 in Education by JackTerrance
0 votes
    I created a sample web application with ASP.NET Core to test the storage and retrieval of the cookie. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 26, 2022 in Education by JackTerrance
0 votes
    I am developing a .NET core application with Identity login which provides a Bootstrap form In the /Identity ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 23, 2022 in Education by JackTerrance
...