IdentityModel.OidcClient icon indicating copy to clipboard operation
IdentityModel.OidcClient copied to clipboard

StepUp Auth, Claim and FrontChannelExtraParameters

Open saltzman007 opened this issue 10 months ago • 0 comments

I just wrote a StepUp Auth for different Levels of Auth (LOA)

        private async void Login(string LOA)
        {
            LoginResult loginResult;

            try
            {
                LoginRequest loginRequest = new  LoginRequest();
                loginRequest.FrontChannelExtraParameters.Add("response_mode", "query");
                loginRequest.FrontChannelExtraParameters.Add("nonce", "exg16fxdjcu");

                string claim = "{\"id_token\":{\"acr\":{\"essential\":true,\"values\":[\"***LOA***\"]}}}";
                claim = claim.Replace("***LOA***", LOA);
                loginRequest.FrontChannelExtraParameters.Add("claims",claim);

                loginResult = await _oidcClient.LoginAsync(loginRequest);

Is it a good idea to rely on the undocumented FrontChannelExtraParameters or is there another official way to pass the claim params? Are these FrontChannelExtraParameters intended stay in the lib for a longer time?

Gr8 lib, thx!

saltzman007 avatar Apr 11 '24 12:04 saltzman007