Reputation: 166
I'm trying to integrate OpenIddict to my application. My target system consist of one AuthServer which should issue oidc access_token and a set of web services (Service Providers) which are hosted as independent IIS Applications and should rely on the token issued by the AuthServer.
The AuthServer uses OpenIddict Server implementation and the Service Providers use OpenIddict token validation handler implementation (which helps to sets current user pricipal based on the access_token issued by the AuthServer).
The question is the following: in the OpenIddict examples I've found 2 options of utilizing token validation logic:
OpenIddictValidationBuilder.UseLocalServer
OpenIddictValidationBuilder.UseSystemNetHttp
But I don't understand the difference between them and thus can't choose an option which would be better for my case. Comments of those extension methods are not very detailed and do not reflect the difference, and thus don't help to make a choice.
Public documentation do not say when to use what.
If anybody have experience with that part of OpenIddict, please share it, I'd appreciate.
Upvotes: 0
Views: 924
Reputation: 590
I'm basically doing the same thing. The info you want is here: https://gitter.im/openiddict/openiddict-core?at=63c677adc77d9a26d0cfa7c6
You want:
services.AddOpenIddict()
.AddValidation(options =>
{
// Set this to your auth server address
options.SetIssuer("https://localhost:44319/");
options.UseSystemNetHttp();
});
You'll need to do this too if you've not disabled encryption
Upvotes: 0