2811 Commits

Author SHA1 Message Date
Phillip Webb
8866fa6fb0 Always use 'this.' when accessing fields
Apply an Eclipse cleanup rules to ensure that fields are always accessed
using `this.`. This aligns with the style used by Spring Framework and
helps users quickly see the difference between a local and member
variable.

Issue gh-8945
2020-08-24 17:33:07 -05:00
Phillip Webb
6894ff5d12 Make classes final where possible
Update classes that have private constructors so that they are also
declared final. In a few cases, inner-classes used private constructors
but were subclassed. These have now been changed to have package-private
constructors.

Issue gh-8945
2020-08-24 17:33:07 -05:00
Phillip Webb
37fa94fafc Organize imports
Use "organize imports" from Eclipse to cleanup import statements so
that they appear in a consistent and well defined order.

Issue gh-8945
2020-08-24 17:33:07 -05:00
Phillip Webb
5f64f53c3f Use consistent "@" tag order in Javadoc
Ensure that Javadoc "@" tags appear in a consistent and well defined
order.

Issue gh-8945
2020-08-24 17:33:07 -05:00
Phillip Webb
71bc145ae4 Remove superfluous comments
Use '^\s+//\ \~\ .*$' and '^\s+//\ ============+$' regular expression
searches to remove superfluous comments.

Prior to this commit, many classes would have comments to indicate
blocks of code (such as constructors/methods/instance fields). These
added a lot of noise and weren't all that helpful, especially given
the outline views available in most modern IDEs.

Issue gh-8945
2020-08-24 17:33:07 -05:00
Phillip Webb
b7fc18262d Reformat code using spring-javaformat
Run `./gradlew format` to reformat all java files.

Issue gh-8945
2020-08-24 17:32:56 -05:00
Phillip Webb
6979125ccf Add noformat blocks around User.withUsername
Find `User.withUsername` calls and protect them against formatting.

Issue gh-8945
2020-08-10 16:24:44 -05:00
Phillip Webb
27ac046d8a Rename *Test.java -> *Tests.java
Rename a few test classes that accidentally ended in `Test` instead of
`Tests`.

Issue gh-8945
2020-08-10 16:24:44 -05:00
Hurelhuyag
833151ce71
Mongolian translation for messages.properties
Closes gh-8778
2020-07-10 04:27:51 -04:00
wangsong
4269cb0d26 update comments 2020-07-07 17:11:47 -05:00
yukihane
c177b391d4
Polish ProviderManagerTests
- Renamed test to follow naming convention
- Simplified mock with Mockito
- Added note regarding related ticket

Issue gh-8689
2020-06-16 15:56:04 -06:00
yukihane
5302fb776c
ProviderManager Uses CollectionUtils#contains
Closes gh-8689
2020-06-16 15:56:04 -06:00
Rob Winch
ca1252be94 Replace whitelist with allowlist
Issue gh-8676
2020-06-10 11:49:21 -05:00
Rob Winch
bb05603b3c AbstractUserDetailsReactiveAuthenticationManager uses boundidElastic()
Some JVMs have blocking operations when accessing SecureRandom and thus
this needs to be performed in a pool that is larger than the number of
CPUs

Closes gh-7522
2020-05-12 13:07:24 -05:00
Pei-Tang Huang
9dcdae3269 Update Traditional Chinese translation.
Align with commit f7b33da5775d2bef504c1671a83a52e48759d13b.
2020-05-06 17:07:57 -05:00
Dávid Kovács
f7b33da577 ActiveDirectoryLdapAuthenticationProvider uses InternalAuthenticationServiceException
Closes gh-2884
2020-04-24 10:15:48 -05:00
Maksim Mednik
eacd212a5a Adding Map support to DefaultMethodSecurityExpressionHandler 2020-04-04 15:46:07 -04:00
Markus Engelbrecht
d81321bc29
Fix typo 'properites' in documentation
Fixes gh-8095
2020-03-11 10:54:14 -06:00
Eleftheria Stein
5850a4cd73 Fix security version test 2020-03-06 18:46:00 -05:00
Eleftheria Stein
b2ea0ba775 Polish SessionIdChangedEvent
Add AbstractSessionEvent; clean up license headers and Javadocs

Fixes: gh-5438
2020-03-06 12:04:49 -05:00
Venkata Jaswanth
5fc6414377 SessionRegistryImpl is now aware of SessionIdChangedEvent 2020-03-06 12:04:01 -05:00
Josh Cummings
1b68cdb650
Polish DefaultAuthenticationEventPublisherTests
Fixed checkstyle violation

Issue gh-7824
2020-02-21 12:59:44 -07:00
Attoumane AHAMADI
bfc2832c6c
Authentication Event Publisher Mappings
Fixes gh-7824
2020-02-21 12:49:04 -07:00
Josh Cummings
653400edfa
Polish DefaultAuthenticationEventPublisher
Simplified the constructor selection logic.

Issue gh-7825
2020-02-06 14:13:05 -07:00
Zeeshan Adnan
51b9b2f693
DefaultAuthenticationEventPublisher Default Event
Fixes gh-7825
2020-02-06 14:13:04 -07:00
Josh Cummings
fbdecdafb8
Add Mapping to Invalid Bearer Token
Fixes gh-7793
2020-02-04 17:33:08 -07:00
Joe Grandja
04f3fe8af9 Add Jackson support for oauth2-client session related classes
Fixes gh-4886
2020-02-04 09:01:12 -05:00
Josh Cummings
d22b476983
Polish ProviderManager
Updated copyright date range and adjusted constructor order to better
match DelegatingReactiveAuthenticationManager

Fixes gh-7713
2020-01-30 16:08:01 -07:00
Thomas Vitale
ace89e12f2 Make code cleaner in ProviderManagerTests 2020-01-30 16:07:24 -07:00
Thomas Vitale
5ce60022d3 ProviderManager should have a varargs constructor
- Added varargs constructor to ProviderManager.
- Added check for null values in AuthenticationProvider list.
- Updated ProviderManagerTests to test for null values using both constructors.

Fixes gh-7713
2020-01-30 16:07:24 -07:00
Daniel Bustamante Ospina
150b66824d Make MethodSecurityEvaluationContext Delegate to MethodBasedEvaluationContext
Spring Security's MethodSecurityEvaluationContext should delegate to Spring Framework's
MethodBasedEvaluationContext

Fixes: gh-6224
2020-01-03 19:49:41 -05:00
Matthias Stock
5fde3044f7 Resolve JavaType only once for whitelisted class 2020-01-02 10:30:51 -05:00
Tao Sun
f18d0fd1a7 Test details using isEqualTo 2019-12-18 17:35:51 +01:00
Tao Sun
6b0981549b Add test for details deserialization 2019-12-18 17:35:51 +01:00
Tao Sun
156fc294bf Deserialize details field in UsernamePasswordAuthenticationToken
Before this commit, the details field was set to a JsonNode, but now it is deserialized correctly.

Fixes gh-7482
2019-12-18 17:35:51 +01:00
Rob Winch
17449cbf60 Fix next development version 2019-11-27 08:16:23 -06:00
LeeHainie
4b4c6e612b Remove unnecessary instantiation in root
Fixes: gh-7635
2019-11-07 10:26:02 +01:00
Josh Cummings
5f17032ffd Restore Removed Throws Clauses
In a recent clean-up, certain exceptions were removed from various
throws clauses.

This PR re-introduces throws clauses that are important for one of the
following reasons:

1. It's a method on a public interface
2. It's a method clearly designed for inheritance, for example, a
method stub, an abstract method, or indicated as such in the docs.

Fixes gh-7541
2019-10-30 12:13:54 -06:00
Isaac Cummings
1081066d60 Polish AuthorityUtils
Changed parameter name to authorities
Added JavaDoc

Fixes gh-4805

Co-authored-by: Everett Irwin <everettirwin77@gmail.com>
2019-10-16 10:44:00 -06:00
Rob Winch
b29106ea31 Use deamon thread for Schedulers.newParallel
Fixes gh-7492
2019-09-30 15:19:31 -05:00
Rob Winch
1bf0e70bd0 Revert "Dispose default Scheduler"
This reverts commit 39600b901f25b545b57a66129848b1641215de2e.
2019-09-30 15:19:31 -05:00
Rob Winch
fc8a0184b0 Polish Dispose default Scheduler 2019-09-30 14:42:28 -05:00
Rob Winch
e0414e5cbe Merge pull request #7493 from robotmrv/gh-7492
Dispose default Scheduler
2019-09-30 14:40:28 -05:00
Filip Hanik
f832d08814 Upgrade Jackson JSON library to 2.10.0 2019-09-29 18:23:32 -07:00
Roman Matiushchenko
39600b901f Dispose default Scheduler
AbstractUserDetailsReactiveAuthenticationManager creates parallel
Scheduler with daemon=false Threads. It is recommended to dispose such
Schedulers to be able exit the VM

Fixes gh-7492
2019-09-29 20:23:05 +03:00
Josh Cummings
1630b3b1f3
CurrentSecurityContext JavaDoc
Fixes gh-7489
2019-09-27 16:23:33 -06:00
Rob Winch
ff54eb878a Use Schedulers.boundedElastic()
Fixes gh-7457
2019-09-19 13:51:06 -05:00
Rob Winch
cb5c58eeaa AbstractUserDetailsReactiveAuthenticationManager uses newParallel
It is recommended to use newParallel to avoid impacting the timed
operations which all use parallel()

Fixes gh-7456
2019-09-19 13:43:25 -05:00
Rob Winch
00f8991fac Merge Remove Redudant Throws
Fixes gh-7301
2019-09-19 11:04:53 -05:00
Onur Kagan Ozcan
034b5e9e93 Introduce LogoutSuccessEvent
LogoutSuccessEvent is a simple AbstractAuthenticationEvent implementation which indicates successful logout.

By default, LogoutConfigurer will add a new LogoutHandler called LogoutSuccessEventPublishingLogoutHandler to publish this event.

This PR will also fix ConcurrentSessionFilter's composite logoutHandler, now will get LogoutHandler instances from LogoutConfigurer for consistency.

Fixes gh-2900
2019-09-18 10:57:16 -05:00