Questions tagged [identityserver4]

OpenID Connect Provider and OAuth 2.0 Authorization Server Framework based on ASP.NET Core

IdentityServer4 is an OpenID Connect Provider and OAuth 2.0 Authorization Server Framework built on ASP.NET Core.

Allows for the implementation of single sign-on and access control for modern web applications and APIs using protocols such as OpenID Connect and OAuth2. It supports a wide range of clients like mobile, web, SPAs and desktop applications and is extensible to allow integration in new and existing architectures.

IdentityServer4 is officially certified by the OpenID Foundation and thus spec-compliant and interoperable. It is part of the .NET Foundation, and operates under their code of conduct. It is licensed under Apache 2 (an OSI approved license).

For the .NET 4.x, katana based version see Identity Server 3

5377 questions
18
votes
3 answers

ICustomAuthorizeRequestValidator isn't being called?

I'm trying to use AddCustomAuthorizeRequestValidator method to provide custom claims validation. I can't even get a breakpoint to be hit in the ICustomAuthorizeRequestValidator implementation. Have I missing something? My…
developer
  • 377
  • 1
  • 3
  • 13
18
votes
2 answers

IdentityServer4 - ApiResource and Client, how are they tied together

I am trying to determine how ApiResource and Client are tied together. How do I go about ensuring that someone requesting a token from a Client is requesting it for a particular ApiResource has access to that ApiResource? Are tried tied together by…
blgrnboy
  • 4,877
  • 10
  • 43
  • 94
18
votes
1 answer

How to Configure login UI for IdentityServer4?

Examples I find for IdentityServer4 use MVC for login UI. When a OpenIdConnect implicit client hits the 'authorization_endpoint' (example 'http://localhost:5000/connect/authorize') it gets redirected to the AccountController Login action. How would…
Wilhelmina Lohan
  • 2,803
  • 2
  • 29
  • 58
18
votes
1 answer

How to get id_token along with access_token from identityserver4 via "password" grant_type?

I am trying to build an identity provider application using identityserver4; Currently, I am using "Resource Owner Password Credentials" flow and it returns access_token and refresh_token from token endpoint. Code Snippet for calling TokenEndpoint…
codeninja.sj
  • 3,452
  • 1
  • 20
  • 37
17
votes
12 answers

System.InvalidOperationException: IDX20803: Unable to obtain configuration from: 'System.String' with .NET 5

I've been implementing IdentityServer4 to provide authorization for my React application. I have this working in my local dev environment, but am running into issues after deployed to IIS in Windows Server 2016. I am able to generate an access token…
Rayan
  • 181
  • 1
  • 1
  • 4
17
votes
2 answers

Should I dispose of X509Certificate2?

I'm using IdentityServer4 and I want to load signing certificate from file. For example, var certificate = new X509Certificate2( path, password, X509KeyStorageFlags.EphemeralKeySet); services.AddIdentityServer() …
qwermike
  • 1,446
  • 2
  • 12
  • 24
17
votes
3 answers

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 tokens, It works and tokens are generated…
17
votes
1 answer

“error:23076071:PKCS12 routines:PKCS12_parse:mac verify failure” when generating self signed certificate for Identity Server 4

We're developing a microservices app on Kubernetes. One of the microservices is IdentityServer instance. Initially, I want to test the solution locally on Docker to make sure it works. For this purpose, I want to copy the certificate to…
skyrunner
  • 460
  • 1
  • 7
  • 18
17
votes
1 answer

.NET Core X509Certificate2 usage (under Windows/IIS, Docker, Linux)

I am really trying a long time to use certificates in .NET Core API. Basically where I need to use them is in a .NET Core web api running on IIS and docker. Certificates I need to use are for: Microsoft.AspNetCore.DataProtection public void…
monty
  • 7,888
  • 16
  • 63
  • 100
17
votes
1 answer

ASP Identity Core GeneratePasswordResetTokenAsync expired

I have set up an Identity Server 4 project in .NET Core 2.1, I have everything working but when I use the user manager to generate the reset password token, the token expires after 24 hours, can I change this so it's 48 hours? My code to send the…
Scott L
  • 647
  • 3
  • 8
  • 21
17
votes
3 answers

How can I setup SwashBuckle.AspNetCore.Swagger to use Authorization?

I have documented my api using Swashbuckle.AspNetCore.Swagger and I want to test some resources that have Authorize attribute on them using swagger ui. api using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using…
S.Anaconda
  • 309
  • 1
  • 2
  • 13
17
votes
3 answers

Adding external login with Identity Server 4 and ASP.NET Identity

After adding Authentication functionality using Identity Server 4 with ASP.NET Identity, I'm planning to add the Google Provider so users can also login with their google+ account. I'm using Angular as my front-end and ASP.NET Web Api (Core) as…
Sam
  • 1,303
  • 3
  • 23
  • 41
17
votes
1 answer

How to use 'refresh_token' in IdentityServer 4?

I'm using .net core with IdentityServer 4. I have a Web api, and an MVC app which accesses secure endpoints on the api. It's very similar in setup to the IdentityServer quickstart:…
Stephen Ellis
  • 2,561
  • 2
  • 24
  • 47
17
votes
3 answers

IdentityServer4 - Redirect to MVC client after Logout

I am using IdenetityServer4 and Redirecting to MVC client after Logout is not working. Following is my MVC client controller Logout action: public async Task Logout() { await HttpContext.Authentication.SignOutAsync("Cookies"); await…
Sandeep
  • 1,182
  • 3
  • 11
  • 26
17
votes
6 answers

IdentityServer4 - Using Refresh Tokens after following the Quickstart for Hybrid MVC

I've followed the Quickstart in the documentation page and have a working configuration of three services (IdentityServer, one Api service, one ASPNET MVC application) using IdentityServer for authentication. Everything works perfectly (login,…
Carlos G.
  • 4,564
  • 4
  • 34
  • 57