84 Commits

Author SHA1 Message Date
Rob Winch
71f40f2bc4 Merge branch '6.3.x'
Use explicit types instead of var

Closes gh-155537
2024-08-08 15:30:16 -05:00
Daniel Garnier-Moiroux
109da2719f Use explicit types everywhere instead of var 2024-08-08 15:29:41 -05:00
Josh Cummings
55895f3b08
Update Deprecated Usage
Issue gh-3834
2024-06-21 12:42:06 -06:00
Josh Cummings
ef5c1a72db
Support Handling Javax-based Bind Exceptions
Closes gh-3834
2024-06-21 12:42:06 -06:00
Josh Cummings
92da6b143f
Restore Acegi Copyright
Issue gh-2083
2024-02-28 17:00:13 -07:00
Roman Zabaluev
1509a987eb Impl custom rolePrefix in LdapUserDetailsManager
Closes gh-2083
2024-02-28 16:55:58 -07:00
Marcus Da Coregio
07b6c451fd Merge branch '6.1.x'
Closes gh-13884
2023-09-29 11:47:38 -03:00
Marcus Da Coregio
64e2a2ff8b Apply updated Code Style
Closes gh-13881
2023-09-29 11:44:32 -03:00
Tim te Beek
9df9cb5aed refactor: AssertJ best practices
Use this link to re-run the recipe: https://app.moderne.io/recipes/builder/bGVuS?organizationId=RGVmYXVsdA%3D%3D

Co-authored-by: Moderne <team@moderne.io>
2023-09-12 16:18:14 -06:00
Steve Riesenberg
5818201e9e
Merge branch '5.7.x' into 5.8.x
Closes gh-12408
2022-12-15 15:52:35 -06:00
Steve Riesenberg
2461d00f4d
Merge branch '5.6.x' into 5.7.x
Closes gh-12407
2022-12-15 15:52:02 -06:00
Dayan Kodippily
eec6729125
Fix DefaultLdapAuthoritiesPopulator NPE
Closes gh-12090
2022-12-15 15:51:07 -06:00
Josh Cummings
6e821382f1
Use SecurityContextHolderStrategy for Ldap
Issue gh-11060
2022-06-27 15:55:27 -06:00
Norbert Nowak
ac9c29b2a0 Add UsernamePasswordAuthenticationToken factory methods
- unauthenticated factory method
 - authenticated factory method
 - test for unauthenticated factory method
 - test for authenticated factory method
 - make existing constructor protected
 - use newly factory methods in rest of the project
 - update copyright dates

Closes gh-10790
2022-03-09 15:23:35 -07:00
heowc
84d173c310 Fix typo 2021-09-27 10:55:18 -03:00
Rob Winch
c71498ae5f Disable ApacheDSContainerTests on Windows
Closes gh-10084
2021-07-15 20:28:57 -05:00
Rob Winch
3e93b024d6 openrewrite Junit Migration 2021-07-09 14:32:52 -05:00
Steve Riesenberg
18a2a4ace9 Handle encoded spaces in the root dn
Fixes an issue where provider URLs passed to the constructor of the
DefaultSpringSecurityContextSource can be URL encoded, resulting in
an invalid base dn. Additionally adds support for list constructor
to support spaces in base dn.

Closes gh-9742
2021-05-25 10:54:41 -06:00
Josh Cummings
ccfbff4954
Remove javax.annotation Usage
Closes gh-9415
2021-02-17 11:53:51 -07:00
Phillip Webb
c502312719 Replace expected @Test attributes with AssertJ
Replace JUnit expected @Test attributes with AssertJ calls.
2020-09-22 16:13:51 -06:00
Phillip Webb
910b81928f Replace try/catch with AssertJ
Replace manual try/catch/fail blocks with AssertJ calls.
2020-09-22 16:13:51 -06:00
Phillip Webb
319d3364aa Migrate to assertThatExceptionOfType
Consistently use `assertThatExceptionOfType(...).isThrownBy(...)`
rather than `assertThatCode` or `assertThatThrownBy`. This aligns with
Spring Boot and Spring Cloud. It also allows the convenience
`assertThatIllegalArgument` and `assertThatIllegalState` methods to
be used.

Issue gh-8945
2020-08-24 17:33:09 -05:00
Phillip Webb
52f20b5281 Use parenthesis with single-arg lambdas
Use regular expression search/replace to ensure all single-arg
lambdas have parenthesis. This aligns with the style used in Spring
Boot and ensure that single-arg and multi-arg lambdas are consistent.

Issue gh-8945
2020-08-24 17:33:08 -05:00
Phillip Webb
ff94944313 Add whitespace after copyright header
Add an additional lines after the copyright header and before the
`package` declaration. This aligns with the style used by Spring
Framework.

Issue gh-8945
2020-08-24 17:33:08 -05:00
Phillip Webb
8d80166aaf Update exception variable names
Consistently use `ex` for caught exception and `cause` for Exception
constructor arguments.

Issue gh-8945
2020-08-24 17:33:08 -05:00
Phillip Webb
a2f2e9ac8d Move inner-types so that they are always last
Move all inner-types so that they are consistently the last item
defined. This aligns with the style used by Spring Framework and
the consistency generally makes it easier to scan the source.

Issue gh-8945
2020-08-24 17:33:07 -05:00
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
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
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
Eleftheria Stein-Kousathana
7c4a706865 Throw exception if specified ldif does not exist
Closes gh-7791

Co-Authored-By: Shay Dratler <dratler@users.noreply.github.com>
2020-07-22 18:50:03 +02:00
Josh Cummings
95f1f81010
Set Integration Test LDAP Port to Zero
Closes gh-8762
2020-06-25 14:46:28 -06:00
Evgeniy Cheban
0fa339f75b Allow port=0 for ApacheDSContainer
Fixes gh-8144
2020-05-21 16:14:01 -05:00
Eleftheria Stein
9740b5920b Load LDIF file from classpath in unboundId mode
Fixes: gh-7833
2020-01-21 09:52:30 -06:00
Giovanni Lovato
63607ee213 Add configurable mapping function to map authorities 2019-10-22 13:45:34 -04:00
Lars Grefer
34dd5fea30 Remove redundant throws clauses
Removes exceptions that are declared in a method's signature but never thrown by the method itself or its implementations/derivatives.
2019-08-23 01:03:54 +02:00
Lars Grefer
cb4f3d2f44 Use UTF-8 for Java sources and XML 2019-08-14 08:47:00 -05:00
Rob Winch
c1db1aad91
Cleanup Code Style Issues
Cleanup Code Style Issues
2019-08-12 13:06:49 -05:00
Lars Grefer
ff1070df36 remove redundant modifiers found by checkstyle 2019-08-10 00:18:56 +02:00
Eddú Meléndez
a171d8b4bf Make ldap integration tests independent
Fixes gh-5942
2019-08-08 17:52:58 -04:00
Lars Grefer
fb39d9c255 Anonymous type can be replaced with lambda 2019-08-08 17:09:09 -04:00
Josh Cummings
3a831820f6
Polish LdapUserDetailsManagerModifyPasswordTests
Issue gh-3392
2019-08-07 14:37:46 -06:00
Lars Grefer
f5cd0ec302 Use try-with-resources instead of try-finally 2019-08-06 15:33:04 -05:00
Lars Grefer
c5b5cc507c Cleanup redundant type casts 2019-07-10 09:31:09 -05:00
Spring Operator
b93528138e URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* http://www.apache.org/licenses/ with 1 occurrences migrated to:
  https://www.apache.org/licenses/ ([https](https://www.apache.org/licenses/) result 200).
* http://www.apache.org/licenses/LICENSE-2.0 with 2691 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
* http://www.apache.org/licenses/LICENSE-2.0.html with 2 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0.html ([https](https://www.apache.org/licenses/LICENSE-2.0.html) result 200).
2019-03-14 15:46:20 -05:00
Josh Cummings
7269aacbdd Password Modify Extended Operation Support
LdapUserDetailsManager can be configured to either use direct
attribute modification or the LDAP Password Modify Extended Operation
to change a user's password.

Fixes: gh-3392
2018-10-15 12:24:39 -06:00
Josh Cummings
b9ca1400e3 UnboundIdContainer Random Port Support
Setting a port of 0 will now induce the container to select a random
port.

Fixes: gh-5920
2018-10-15 12:24:39 -06:00
Josh Cummings
b9c499d8c8 Polish UnboundIdContainerTests
Basic server startup test now asserts a successful server startup
instead of a failed one.

Issue: gh-5920
2018-10-15 12:24:39 -06:00
Johnny Lim
57353d18e5 Use diamond type 2017-12-21 15:09:00 -06:00
Johnny Lim
d900f2a623 Remove unused imports
This commit also adds UnusedImportsCheck Checkstyle module.
2017-11-14 14:41:08 -06:00