IdentityModel.OidcClient
IdentityModel.OidcClient copied to clipboard
Usage ACR Values
Hello I am trying to use ACR Values. But I get this error:
Cannot implicitly convert type '<anonymous type: string acr_values>' to 'System.Collections.Generic.IDictionary<string, string>'
I have searched the issues and found this:
https://github.com/IdentityModel/IdentityModel.OidcClient.Samples/issues/44
https://github.com/IdentityModel/IdentityModel.OidcClient/issues/89
both do not work. My code currently looks like this and is inspiered by the first issue:
var request = new LoginRequest();
request.FrontChannelExtraParameters = new
{
acrValues = "idp:gas:strong"
};
result = await _oidcClient.LoginAsync();
The solution of the second issue is no solution and only vague. There is also an issue referencing to some server stuff which is totally diffrent... Could someone point out my mistake?
So I changed my code to:
var request = new LoginRequest();
request.FrontChannelExtraParameters.Add("acr_values", "idp:strong");
result = await _oidcClient.LoginAsync(request);
Now I get the ACR Value, but the :
ist replaced with %3A
. Is this correct? I have no experience with OIDC, so not sure if this is wrong or the setting on the server.
Please write a test to prove that this is a library problem.