Hello to all.
I’m working with .net core 2.0 web api and web application.
My web application has been configured to login/logut using oauth. It works ok, i can loggin, view my claims, view my access token and token id but i need to consume some methods from my api
So we tried to access our api metod, for example: http://localhost:21366/api/values
passing in header the KEY=Authorization with Value=Bearer acces_token
But we always receive the following error:
IOException: IDX10804: Unable to retrieve document from: 'https:///.well-known/openid-configuration
In our api we have this config:
public void ConfigureServices(IServiceCollection services)
{
string domain = $“https://{Configuration[“Auth0:Domain”]}/”;services.AddAuthentication(options => { options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme; options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme; }).AddJwtBearer(options => { options.Authority = domain; options.Audience = Configuration["Auth0:ApiIdentifier"]; options.RequireHttpsMetadata = false; options.TokenValidationParameters = new TokenValidationParameters { RoleClaimType = "http://schemas.microsoft.com/ws/2008/06/identity/claims/roles" }; }); services.AddMvc(); }
Any idea? What i’m doing wrong?
Thank u so much