mirror of
https://github.com/ditkrg/AuthorizationServerDemos.git
synced 2026-01-25 13:33:10 +00:00
don't check ssl certs 😬
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
@@ -16,6 +16,7 @@ using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IdentityModel.Tokens.Jwt;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OidcSamples.TrafficPoliceApi
|
||||
@@ -32,6 +33,10 @@ namespace OidcSamples.TrafficPoliceApi
|
||||
// This method gets called by the runtime. Use this method to add services to the container.
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
// Dirty Hack: Disable verifying SSL certificates 😬
|
||||
ServicePointManager.ServerCertificateValidationCallback +=
|
||||
(sender, cert, chain, sslPolicyErrors) => true;
|
||||
|
||||
JwtSecurityTokenHandler.DefaultInboundClaimTypeMap["sub"] = "sub";
|
||||
|
||||
services.AddCors(options =>
|
||||
|
||||
Reference in New Issue
Block a user