Commit 3c297de
committed
Add ID token support for token exchange
Introduce support for exchanging externally-issued OIDC
ID tokens for access tokens via the OAuth 2.0 Token
Exchange Grant per RFC 8693 Section 3.
- Add urn:ietf:params:oauth:token-type:id_token as a
supported token type in the converter
- Add OAuth2TokenExchangeSubjectTokenResolver strategy
interface for resolving external subject tokens
- Add OidcIdTokenSubjectTokenResolver as the default
implementation using JwtDecoderFactory
- Modify OAuth2TokenExchangeAuthenticationProvider to
delegate to the resolver before falling back to the
authorization service
- Auto-wire the resolver bean in the configurer
Closes gh-19048
Signed-off-by: Bapuji Koraganti <bapuk.2008@gmail.com>1 parent 1455798 commit 3c297de
32 files changed
Lines changed: 1649 additions & 343 deletions
File tree
- config/src
- main
- java/org/springframework/security/config/annotation/web/configurers
- oauth2/server
- authorization
- resource
- kotlin/org/springframework/security/config/annotation/web
- oauth2/resourceserver
- test
- java/org/springframework/security/config/annotation/web/configurers
- oauth2/server
- authorization
- resource
- ott
- kotlin/org/springframework/security/config/annotation/web/oauth2/resourceserver
- crypto/src/main/java/org/springframework/security/crypto/bcrypt
- docs
- modules/ROOT/pages
- gradle
- oauth2
- oauth2-authorization-server/src
- main/java/org/springframework/security/oauth2/server/authorization
- authentication
- token
- web/authentication
- test/java/org/springframework/security/oauth2/server/authorization
- authentication
- token
- web/authentication
- oauth2-resource-server/src/main/java/org/springframework/security/oauth2/server/resource/web
- authentication
- web/src
- main/java/org/springframework/security/web
- authentication/ui
- server/ui
- test/java/org/springframework/security/web/authentication
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
176 | 177 | | |
177 | 178 | | |
178 | 179 | | |
179 | | - | |
180 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
181 | 184 | | |
182 | 185 | | |
183 | 186 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
271 | 272 | | |
272 | 273 | | |
273 | 274 | | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
274 | 280 | | |
275 | 281 | | |
276 | 282 | | |
| |||
Lines changed: 0 additions & 239 deletions
This file was deleted.
0 commit comments