dotnet / dotnet/aspnetcore

OpenIdConnectEventHandler - enable UserInfo JWT-validation.

Open
#60,048 4 comments 1 reaction 0 assignees View on GitHub
area-auth
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 5h
Merged PRs (30d)
276

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Is your feature request related to a problem? Please describe the problem.

Related to https://github.com/dotnet/aspnetcore/issues/4650 (Decrypt UserInfo-response).

I would like to validate the JWT retrieved from the UserInfo-endpoint. The response I'm dealing with is not encrypted so the payload could be read, but I would also like to validate the response before continuing.
My workaround is similar to #4650

### Describe the solution you'd like

It would be nice to be able to implement callback events from the existing handler to be able to validate the JWT (if it shouldn't be validated at all times, with an opt-out flag in Options and validation handled in the handler itself).

### Additional context

A local [keykloak server](https://quay.io/repository/keycloak/keycloak?tab=tags&tag=latest) could be configured to sign UserInfo-response JWT and I believe also encrypt the JWT if you also would like to fit #4650 into the solution when developing.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.