Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HttpContext does not contain definition for GetOpenIddictServerRequest

var request = HttpContext.GetOpenIddictServerRequest();

Am I missing any namespace ?

like image 389
Lal P J Avatar asked Apr 15 '26 21:04

Lal P J


1 Answers

If you want to use GetOpenIddictServerRequest() method , you need to add NuGet Packages OpenIddict.AspNetCore.

=================

IF you want to use it in Minimal Api , you can change some code like :

using Microsoft.AspNetCore;

//.........

   app.MapPost("/connect/token", (HttpContext c) =>
   {
    var request = c.GetOpenIddictServerRequest();
     //........
   });
like image 154
Xinran Shen Avatar answered Apr 18 '26 13:04

Xinran Shen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!