All Questions
Tagged with asp.net-core identityserver4
188
questions
18
votes
3
answers
18k
views
IdentityServer4 Role Based Authorization for Web API with ASP.NET Core Identity
I am using IdentityServer4 with .Net Core 2.1 and Asp.Net Core Identity. I have two projects in my Solution.
IdentityServer
Web API
I want to Protect my Web APIs, I use postman for requesting new ...
92
votes
3
answers
77k
views
IdentityServer4 register UserService and get users from database in asp.net core
I've searched all over on how to register a UserService with IdentityServer4 in asp.net core, but I cant seem to find the right way to do it.
This is the code to register InMemoryUsers found here, ...
88
votes
21
answers
212k
views
"InvalidOperationException: IDX20803: Unable to obtain configuration from: '[PII is hidden]'"
I've deployed my API and Client app on Docker, but for the life of me, the web app cannot call the API, I keep getting an exception.
I added the following line suggested in other posts, but it did not ...
78
votes
1
answer
35k
views
What is the point of configuring DefaultScheme and DefaultChallengeScheme on ASP.NET Core?
I am learning how security works in ASP.NET Core 2.0 and IdentityServer4. I set up the projects with IdentityServer, API and ASP.NET Core MVC Client App.
The ConfigureService method in the Client App ...
31
votes
5
answers
29k
views
Generate access token with IdentityServer4 without password
I have created ASP.NET Core WebApi protected with IdentityServer4 using ROPC flow (using this example: https://github.com/robisim74/AngularSPAWebAPI).
How to manually generate access_token from the ...
33
votes
7
answers
34k
views
WindowsCryptographicException: Keyset does not exist
I want to create or obtain a certificate, create a pfx-file, load it and have IdentityServer use it. However, IdentityServer is not able to use my pfx.
How to successfully create a pfx and have ...
16
votes
2
answers
7k
views
HttpContext is NULL when running web app in IIS
I have two application, both running on the same Windows machine. One application is IdentityServer4, and the other is my own web application (Server side Blazor app).
Both web apps are build with ....
83
votes
4
answers
83k
views
How to add custom claims to access token in IdentityServer4? [closed]
I am using IdentityServer4.
I want to add other custom claims to access token but I'm unable to do this. I have modified Quickstart5 and added ASP.NET Identity Core and the custom claims via ...
9
votes
1
answer
5k
views
Asp.net Core 2 enable multi tenancy using Identity Server 4
I have an IDP (Identity Server 4) hosted with multiple bindings: auth.company1.com and auth.company2.com
I also have an API protected from that IDP. So in order to access the API I need to get the ...
21
votes
2
answers
12k
views
ASP .NET Core Identity custom ApiAuthorizationDbContext
I'm working with ASP .NET Core 3.0 with Angular project. I see this new ApiAuthorizationDbContext and I wanted to override the table name and user id (to int) but there is no way I can do it. Does any ...
13
votes
1
answer
10k
views
How to add additional claims to be included in the access_token using ASP.Net Identity with IdentityServer4
How to add additional claims to be included within the token?
As soon as the API receives the bearer token, the User.Identity object gets populated with the following claims.
[
{
"key": "nbf",
...
4
votes
1
answer
7k
views
How to redirect user to client app after logging out from identity server?
I want to redirect user to the same client after he logged out from that client. So if i have lets say 5 clients on one identity server, i want users to be able to log out from one client and be on ...
44
votes
5
answers
31k
views
Why is ClaimTypes.NameIdentifier not mapping to 'sub'?
Using ASP.NET Core 2.2 and Identity Server 4 I have the following controller:
[HttpGet("posts"), Authorize]
public async Task<IActionResult> GetPosts() {
var authenticated = this.User....
35
votes
4
answers
40k
views
Role based authorization with IdentityServer4
I am trying to implement "Role Based Authorization" using IdentityServer4 to give access to my API based on the user roles.
For example , I want to have two roles for the user i.e. FreeUser and ...
29
votes
2
answers
15k
views
Identity server is keep showing "Showing login: User is not authenticated" in /connect/authorize/callback
Using IdentityServer4, I'm implementing Code flow authorization on an existing system which supports only ResourceOwnerPassword grant type in IdentityServer and works well.
I got into a stage where ...