IMPORTANT!
This forum is now archived. Click here for the New Support Forum
AuthorizationController return error 500
Quote from Ingo on March 23, 2018, 12:31 pmHi,
I change my project "Updated all client packages and improved Swagger authentication" https://github.com/emonney/QuickApp/commit/242f5e4
services.AddSwaggerGen(c => { c.SwaggerDoc("v1", new Info { Title = "TipWeb API", Version = "v1" }); c.AddSecurityDefinition("OpenID Connect", new OAuth2Scheme { Type = "oauth2", Flow = "password", TokenUrl = "/connect/token" }); });In the AuthorizationController in the Exchange methode the program run to
[HttpPost("~/connect/token")] [Produces("application/json")] public async Task<IActionResult> Exchange(OpenIdConnectRequest request) { if (request.IsPasswordGrantType()){ ...... return SignIn(ticket.Principal, ticket.Properties, ticket.AuthenticationScheme); } }I examined the result of the method SignIn.
In the attachment you can see the content.
Can anyone help me here?
Regards Ingo
P.S.
I found the problem but I do not know how resolve it.
If I use the libraries:
<PackageReference Include="OpenIddict" Version="2.0.0-rc2-0792" />
<PackageReference Include="OpenIddict.EntityFrameworkCore" Version="2.0.0-rc2-0792" />
<PackageReference Include="OpenIddict.Mvc" Version="2.0.0-rc2-0792" />its for fine. If I change it to :
<PackageReference Include="OpenIddict" Version="2.0.0-rc2-final" /><PackageReferenceInclude="OpenIddict.EntityFrameworkCore"Version="2.0.0-rc2-final"/><PackageReferenceInclude="OpenIddict.Mvc"Version="2.0.0-rc2-final"/>I have my error.
Hi,
I change my project "Updated all client packages and improved Swagger authentication" https://github.com/emonney/QuickApp/commit/242f5e4
services.AddSwaggerGen(c => { c.SwaggerDoc("v1", new Info { Title = "TipWeb API", Version = "v1" }); c.AddSecurityDefinition("OpenID Connect", new OAuth2Scheme { Type = "oauth2", Flow = "password", TokenUrl = "/connect/token" }); });
In the AuthorizationController in the Exchange methode the program run to
[HttpPost("~/connect/token")] [Produces("application/json")] public async Task<IActionResult> Exchange(OpenIdConnectRequest request) { if (request.IsPasswordGrantType()){ ...... return SignIn(ticket.Principal, ticket.Properties, ticket.AuthenticationScheme); } }
I examined the result of the method SignIn.
In the attachment you can see the content.
Can anyone help me here?
Regards Ingo
P.S.
I found the problem but I do not know how resolve it.
If I use the libraries:
<PackageReference Include="OpenIddict" Version="2.0.0-rc2-0792" />
<PackageReference Include="OpenIddict.EntityFrameworkCore" Version="2.0.0-rc2-0792" />
<PackageReference Include="OpenIddict.Mvc" Version="2.0.0-rc2-0792" />
its for fine. If I change it to :
IMPORTANT!
This forum is now archived. Click here for the New Support Forum