Comments (3)
Ok, I've got it. great idea!
from aspnet.security.openidconnect.server.
For reference, here's the commit who introduced the "destination" switch: e775161.
Here's how it works:
- for access and refresh tokens, all claims are copied from the ambient
ClaimsIdentity
unless they explicitly provide a destination that doesn't include "token". Because access and refresh tokens are most of the times opaque for the client, including all claims by default seemed a good compromise between confidentiality and usability. - for identity tokens, that's an inverse reasoning (because JWT tokens are not opaque for the clients): claims are not added to the identity token unless they explicitly specify an
id_token
destination.
Note that you can combine both switches by specifying an id_token token
destination 😃
from aspnet.security.openidconnect.server.
With access tokens now being JWT tokens by default, the behavior described in my previous post has changed:
- Refresh tokens and authorization codes: when they are not explicitly provided through the
CreateAuthorizationCode
/CreateRefreshToken
notifications, authorization codes and refresh tokens are serialized using a data protector and claims are never filtered. - Identity tokens and access tokens: these tokens can be natively created using a security token handler, a data protector or using the
CreateIdentityToken
/CreateAccessToken
notifications.- When they are created using
CreateIdentityToken
/CreateAccessToken
, it's up to the implementer to correctly filter the identities before serialization if the returned tokens are not opaque. To make it easier, newClaimsIdentity.Clone
extensions have been added to the extensions package: https://github.com/aspnet-contrib/AspNet.Security.OpenIdConnect.Server/blob/dev/src/Owin.Security.OpenIdConnect.Extensions/OpenIdConnectExtensions.cs#L305 - When they are created using a security token handler, claims are automatically excluded if they don't explicitly contain the
id_token
ortoken
destination. - When they are created using a data protector, these tokens are assumed to be opaque and claims are only excluded if they contain an explicit destination that doesn't include
id_token
ortoken
.
- When they are created using
from aspnet.security.openidconnect.server.
Related Issues (20)
- How can handle Authorize attribute on ASOS HOT 6
- Does not support Owin/Katana 3/4 HOT 1
- Plans for the aspnet-contrib introspection, validation and server middleware for ASP.NET Core 3.0 HOT 5
- Support Source Link HOT 4
- Serve ui endpoints in separate web client HOT 2
- Add no-store as part of the CacheControl headers to totally prevent response being saved HOT 3
- I am not getting useful/appropriate information while using some functionality of ASOS. HOT 1
- get userinfo HOT 3
- AllowInsecureHttp should allow onion addresses (Tor) HOT 4
- Getting 404 issue when requesting the token from postman/Restlet API
- Add support for async OnHandleTokenRequest HOT 1
- Access token generated but authorize attribute gives internal server error HOT 1
- Make ID Token signature mandatory HOT 2
- nonce (xdafadsfdsa) does not match nonce from token () HOT 1
- Support for User Managed Access (UMA)? HOT 1
- User is already not authorization at HandleLogoutRequest
- [Q]Hosting Azure Functions sample HOT 1
- open-id configuration modifications HOT 2
- Support for ASP.Net core 3.1? HOT 6
- Q: Is this still active, relevant in contemporary contexts? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aspnet.security.openidconnect.server.