1
0
mirror of synced 2026-05-22 21:33:16 +00:00

322 Commits

Author SHA1 Message Date
Josh Cummings 7c11ada795 Merge branch '7.0.x' 2026-05-21 10:48:51 -06:00
Josh Cummings 944149ba71 Merge branch '6.5.x' into 7.0.x 2026-05-21 10:37:30 -06:00
Josh Cummings 9b14465243 Align Assertions in Builder with Deprecated Constructor
The deprecated (introspectionUri, clientId, clientSecret) constructors
that the builders replaced explicitly asserted non-null clientId and
clientSecret. Bring the builder's build() in line with that contract by
asserting at the API boundary rather than relying on downstream classes
to enforce it.

Closes gh-19201

Signed-off-by: Josh Cummings <3627351+jzheaux@users.noreply.github.com>
2026-05-21 10:36:10 -06:00
Joe Grandja f8359ef619 Polish gh-17202 2026-04-10 07:40:34 -04:00
Max Batischev fc6a4c8220 Add Support DPoP Customization
Closes gh-16940

Signed-off-by: Max Batischev <mblancer@mail.ru>
2026-04-10 07:09:24 -04:00
Josh Cummings 5b8d81828a Add serialVersionUID
This commit gives a serialVersionUID to the private adapter class for the Jwt
authentication principal. It also adds a SuppressWarnings annotation so that
it doesn't get picked up by config's serialization tests. This is needed since
the test cannot construct a serialization sample for a private class

Issue gh-6237

Signed-off-by: Josh Cummings <3627351+jzheaux@users.noreply.github.com>
2026-03-31 16:19:41 -06:00
Josh Cummings 95b6dc753a Merge branch '7.0.x' 2026-03-27 12:14:47 -06:00
Josh Cummings 9fb3e14989 Merge branch '6.5.x' into 7.0.x 2026-03-27 12:14:41 -06:00
Josh Cummings 95b2cdf7f4 Clarify JavaDoc
Removed note about DelegatingJwtGrantedAuthoritiesConverter from
ExpressionJwtGrantedAuthoritiesConverter and further explained in
DelegatingJwtGrantedAuthoritiesConverter where it comes in handy.

Issue gh-18300

Signed-off-by: Josh Cummings <3627351+jzheaux@users.noreply.github.com>
2026-03-27 11:48:56 -06:00
Joe Grandja 09ce639c4b Enable null-safety in spring-security-oauth2-resource-server
Closes gh-17822
2026-03-19 06:21:08 -04:00
Josh Cummings c342b89760 Remove setRequestEntityConverter
Given that RestClient does not read RequestEntity objects, let's
leave it out of a class built around using RestClient

Issue gh-18745

Signed-off-by: Josh Cummings <3627351+jzheaux@users.noreply.github.com>
2026-03-11 15:15:15 -06:00
Josh Cummings 498b0cb59c Make RestClientOpaqueTokenIntrospector final
Issue gh-18745

Signed-off-by: Josh Cummings <3627351+jzheaux@users.noreply.github.com>
2026-03-02 16:20:22 -07:00
Andrey Litvitski a5c0113ff0 Add postProcessr support to RestClientOpaqueTokenIntrospector
Signed-off-by: Andrey Litvitski <andrey1010102008@gmail.com>
2026-03-02 16:20:22 -07:00
Andrey Litvitski bafd4034a0 Provide RestClientSpringOpaqueTokenIntrospector
Since similar classes have alternative versions using RestClient instead
of RestTemplate, I think we should do the same with this class.

Closes: gh-18745

Signed-off-by: Andrey Litvitski <andrey1010102008@gmail.com>
2026-03-02 16:20:22 -07:00
Josh Cummings c208410a91 Polish Jwt Authentication Converter
- Replace conditional logic with adapter class
- Added tests

Issue gh-6237

Signed-off-by: Josh Cummings <3627351+jzheaux@users.noreply.github.com>
2026-02-26 12:28:50 -07:00
Andrey Litvitski aabc9fc1cc Support Custom Principal in Jwt Authentication Flow
Closes gh-6237

Signed-off-by: Andrey Litvitski <andrey1010102008@gmail.com>
2026-02-26 12:28:50 -07:00
Josh Cummings fc48088759 Polish
- Add @since version
- Change variable name to match method name

Issue gh-18623

Signed-off-by: Josh Cummings <3627351+jzheaux@users.noreply.github.com>
2026-02-17 17:19:42 -07:00
itsmevichu d528be38bb Add postProcessor to Introspector Builder
Closes gh-18623

Signed-off-by: itsmevichu <vishnutheep@gmail.com>
2026-02-17 17:19:42 -07:00
Joe Grandja 0496c02c30 Polish gh-18542 2026-02-02 12:43:19 -05:00
Daniel Garnier-Moiroux 4957c5a7e9 Add BearerTokenAuthenticationEntryPoint#setResourceMetadataParameterResolver
Closes gh-18542

Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-02-02 12:40:03 -05:00
Joe Grandja db5310bee8 Enable null-safety in spring-security-oauth2-core
Closes gh-17820
2026-02-02 09:00:40 -06:00
Joe Grandja fc5194d78b Merge branch '7.0.x' 2026-01-23 06:43:14 -05:00
Daniel Garnier-Moiroux 7cfcfaefae BearerTokenAuthenticationEntryPoint uses context path
Closes gh-18528

Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-01-23 06:27:26 -05:00
zoo-code cd2be2fc1c Enable javadoc-warnings-error for oauth2-resource-server
Closes gh-18463

Signed-off-by: zoo-code <kyj20908@naver.com>
2026-01-21 15:49:55 -06:00
Rob Winch a181733365 Encapsulate GenericHttpMessageConverterAdapter
This will allow its removal in gh-18073
2025-10-19 17:03:19 -05:00
Sébastien Deleuze 137f8fd670 Add support for JacksonJsonHttpMessageConverter
This commit introduces classpath checks and instantiation of
JacksonJsonHttpMessageConverter (based on Jackson 3) leveraging
a new GenericHttpMessageConverterAdapter which allows to adapt
SmartHttpMessageConverter to GenericHttpMessageConverter.

See gh-17832
Signed-off-by: Sébastien Deleuze <sdeleuze@users.noreply.github.com>
2025-10-19 17:03:19 -05:00
Sébastien Deleuze 65a14d6c6d Add Jackson 3 support
This commit adds support for Jackson 3 which has the following
major differences with the Jackson 2 one:
 - jackson subpackage instead of jackson2
 - Jackson type prefix instead of Jackson2
 - JsonMapper instead of ObjectMapper
 - For configuration, JsonMapper.Builder instead of ObjectMapper
   since the latter is now immutable
 - Remove custom support for unmodifiable collections
 - Use safe default typing via a PolymorphicTypeValidator

Jackson 3 changes compared to Jackson 2 are documented in
https://cowtowncoder.medium.com/jackson-3-0-0-ga-released-1f669cda529a
and
https://github.com/FasterXML/jackson/blob/main/jackson3/MIGRATING_TO_JACKSON_3.md.

This commit does not cover webauthn which is a special case (uses
jackson sub-package for Jackson 2 support) which will be handled in
a distinct commit.

See gh-17832
Signed-off-by: Sébastien Deleuze <sdeleuze@users.noreply.github.com>
2025-10-19 17:03:19 -05:00
Josh Cummings b1a50a25b6 Check If toBuilder Is Implemented
Since RC1 is right around the corner, let's change the API
footprint as little as possible by using reflection to check
if a class has declared toBuilder themselves. If they have, we
can assume that that class's builder will produce that class.

Issue gh-18052
2025-10-16 13:41:45 -06:00
Josh Cummings 4281f6b00b Prevent Duplicate Authorities
Issue gh-17981
2025-10-16 13:41:45 -06:00
Josh Cummings 0fcef6dca2 Add Missing Mock Configuration 2025-10-16 13:41:45 -06:00
Josh Cummings 2e7cdd7b14 Revert "Merge branch 'builder-enhancements'"
This reverts commit 95644fb73c, reversing
changes made to fbf7bb3be1.

Reverting this commit will allow us more time to
consider the ideal way to add this support to the public API.
2025-10-16 13:41:45 -06:00
Josh Cummings 4102007119 Add Builder#authentication
This commit consolidates logic common to applying one
authenticaiton to another. Specifically, it will copy the
authorities in one authentication into the builder instance
of another.

Closes gh-18053
2025-10-15 12:01:11 -06:00
Josh Cummings e535e61c8b Move toBuilder to BuildableAuthentication
Closes gh-18052
2025-10-15 12:01:11 -06:00
Rob Winch d18431a78d Move FACTOR_ constants to FactorGrantedAuthority
Previously GrantedAuthorities had an implicit package tangle because it
was located in ~.core and FactorGrantedAuthority is in ~.core.authority
and FactorGrantedAuthority's authority property was implicitly expected
to be constants found in `GrantedAuthorities`.

This commit moves the constants to the FactorGrantedAuthority which
resolves this tangle. It wasn't initially done because
FactorGrantedAuthority did not exist at that time.

Closes gh-18030
2025-10-10 16:24:46 -05:00
Rob Winch 3f74991ce9 Authentication adds FactorGrantedAuthority
Closes gh-18001
2025-10-03 15:20:03 -05:00
Joe Grandja 54aae36f98 Add support for OAuth 2.0 Protected Resource Metadata
Closes gh-17244
2025-10-02 14:50:17 -04:00
Rob Winch b2d76dfe66 Add GrantedAuthorities.FACTOR_*_AUTHORITY
Closes gh-17952
2025-09-24 09:53:56 -05:00
Josh Cummings 758b35df9c Add Factor Tests for Authentication Providers
Issue gh-17933
2025-09-19 11:32:27 -06:00
Josh Cummings e8accd0499 Add Factory Authority When Authentication Succeeds
Issue gh-17933
2025-09-19 11:32:26 -06:00
Rob Winch 093e930c32 Merge branch '6.5.x' 2025-09-10 12:00:31 -05:00
Rob Winch ab634d1099 Merge branch '6.4.x' into 6.5.x 2025-09-10 11:58:55 -05:00
Rob Winch a79a2b031a Remove MockWebServer from JwtIssuerAuthenticationManagerResolverTests
This prevents timeouts on GitHub Windows runners due to overtaxed
systems.

Closes gh-17869
2025-09-10 11:56:07 -05:00
Josh Cummings 69ee8d9aec Polish OAuth 2.0 Authentication Builders
Issue gh-17861
2025-09-09 14:59:14 -06:00
Josh Cummings dd50dc0c40 Remove Generic Typing From Authentication.Builder
It would be better to introduce parameter types for
principal and credentials into Authentication.Builder
at the same time as doing so for Authentication

Issue gh-17861
2025-09-09 14:49:13 -06:00
Josh Cummings a0fe6a5fee Polish Builders
- Added remaining properties
- Removed apply method since Spring Security isn't using
it right now
- Made builders extensible since the authentications are
extensible

Issue gh-17861
2025-09-09 14:49:13 -06:00
Josh Cummings a201a2b862 Add Authentication.Builder
This commit adds a new default method to Authentication
for the purposes of creating a Builder based on the current
authentication, allowing other authentications to be
applied to it as a composite.

It also adds Builders for each one of the authentication
result classes.

Issue gh-17861
2025-09-09 14:49:13 -06:00
Josh Cummings c64b086878 Add SecurityAssertions
This commit introduces a simple, internal test API for
verifying aspects of an Authentication, like its name
and authorities.

Closes gh-17844
2025-09-03 17:53:42 -06:00
chanbinme 08fa272749 Remove authoritiesClaimName Field
This commit simplfies the logic in JwtGrantedAuthoritiesConverter
to no longer need the authoritiesClaimName field.

Signed-off-by: chanbinme <gksmfcksqls@gmail.com>
2025-08-13 10:57:15 -06:00
Josh Cummings eeb383ac46 Fix Checkstyle
Issue gh-17623
2025-08-07 14:32:18 -06:00
Josh Cummings 6d1a886f92 Deprecate SERIAL_VERSION_UID
Closes gh-17623
2025-08-07 11:09:35 -06:00