identityserver4openiddict

Is there any Authorization Request Context supported in OpenIddict


I am migrating from Identity Server 4 to OpenIddict.

In Identity Server, in order to read the original authorize request values, you can use the interaction service. It provides a GetAuthorizationContextAsync API that can extracts the information from the returnUrl and return an AuthorizationRequest.

Is there anything equivalent in OpenIddict ?


Solution

  • Is there anything equivalent in OpenIddict ?

    var request = HttpContext.GetOpenIddictServerRequest() called from your authorization endpoint action is the standard way to access the authorization request in OpenIddict.

    If you need that context to be able to resolve the Authentication Context Class requested by the client, you can use request.GetAcrValues() to resolve the individual values.