Questions tagged [identitymodel]

77 questions
10
votes
4 answers

Endpoint belongs to different authority

trying to use Azure AD as OpenID provider with IdentityModel package However the problem is that it produces wrong endpoint configuration var client = new HttpClient(); const string identityUrl =…
oleksa
  • 3,688
  • 1
  • 29
  • 54
7
votes
3 answers

Unable to find DiscoveryClient for IdentityServer4

Trying to access discovery client for acceising other endpoints anf following with, http://docs.identityserver.io/en/aspnetcore1/endpoints/discovery.html Installed IdentityModel nuget package in .Net 7.5 MVC application. But unable to find the…
Cod29
  • 265
  • 4
  • 14
5
votes
0 answers

Could not load type 'IdentityModel.Client.DiscoveryClient'

I try to make a request to an API with methods authorized by an access token from identity server, but when I send a request using a Bearer Token in Header, my request fail and the result marks me this error: Could not load type…
5
votes
2 answers

Request Access Token using refresh token with IdentityModel 4.1.1

I am using IdentityModel 4.1.1 for OAuth2.0 Now here I stucked during create instance of TokenClient, which is used to request new access token using refresh token. Here's the my code what I am doing, TokenClientOptions clientOptions = new…
Saurabh Gadani
  • 103
  • 2
  • 9
4
votes
2 answers

Is there an issue with the custom object JSON serialization implementation of System.IdentityModel.Tokens.Jwt for .Net 6?

We migrated from .Net Core (dotnet core) 3.1 to .Net 6. We were using the System.IdentityModel.Tokens.Jwt to create a payload and generate a security token with that payload. Our application has yet to be migrated from Newtonsoft.Json to…
4
votes
1 answer

Asp.Net Core API OpenId-Connect authentication with JWT token using IdentityModel

I have an ASP.NET Core API as back-end for an Angular SPA front-end. I am using Cognito as an Identity provider and want to create an OpenId-Connect authentication using authorization code flow which would mean that all the secret credentials will…
4
votes
3 answers

What has replaced RequestResourceOwnerPasswordAsync in IdentityModel v.4.3.0?

I'm trying to get the resource owner information, but the RequestResourceOwnerPasswordAsync method is not available in the TokenClient class in v4.3.0. I've searched the documentation, but haven't found the replacement for this method. The…
3
votes
3 answers

Adding new package breaks the .NET 5 application

I've been trying to figure out why my console application fails the instant I introduce a new package. Using IdentityModel.OidcClient and Microsoft.AspNetCore.Server.Kestrel only works, but when adding Microsoft.Extensions.Configuration.Json it…
Vincent
  • 1,119
  • 11
  • 25
2
votes
1 answer

Force login when refresh token no longer works

I have an ASP.net core 3.1 MVC application that is using OpenID Connect with Identity Server 4. I am using IdentityModel to automatically refresh access tokens in my application. Configuration looks as follows: services.AddAuthentication(options…
Dismissile
  • 32,564
  • 38
  • 174
  • 263
2
votes
0 answers

How to get LoginResult by refresh_token with IdentityModel.OidcClient?

I use IdentityModel.OidcClient to get access_token. After login in browser I call OidcClient.ProcessResponseAsync() to get the LoginResult with the RefreshTokenHandler (and tokens, timestamps, user/claims). Now I create a HttpClient with the…
koalabruder
  • 2,794
  • 9
  • 33
  • 40
2
votes
1 answer

Authorization header while using IdentityModel.AspNetCore

I'm using IdentityModel.AspNetCore Package to access a protected API using client credential flow. In my startup, I have the following configuration services.AddAccessTokenManagement(options => { options.Client.Clients.Add("oauth", new…
2
votes
1 answer

Does MSAL work only with azure and Microsoft identity platform?

I'm looking for some client library that can handle OAuth requests and automatically utilize refresh tokens when access token expires to acquire new token. I found https://identitymodel.readthedocs.io/ that adds extensions to HttpClient but that's…
Konrad
  • 6,385
  • 12
  • 53
  • 96
2
votes
1 answer

How can I bypass certificate (SSL) validation in OAuth2Introspection?

I am working on an API but I get this error whenever I try to connect to it: Request starting HTTP/1.1 GET https://localhost:5061/api/machine info:…
jysummers
  • 649
  • 4
  • 16
2
votes
1 answer

netstandard sample for authorization code flow with Identitity4 and OidcClient

Is there any netstandard 2.0 sample for authorization code flow with Identitity4 and OidcClient? like SystemBrowser that is only in .net core
1
2 3 4 5 6