Skip to content

Commit d22b476

Browse files
committed
Polish ProviderManager
Updated copyright date range and adjusted constructor order to better match DelegatingReactiveAuthenticationManager Fixes gh-7713
1 parent ace89e1 commit d22b476

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

core/src/main/java/org/springframework/security/authentication/ProviderManager.java

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -101,14 +101,30 @@ public class ProviderManager implements AuthenticationManager, MessageSourceAwar
101101
private AuthenticationManager parent;
102102
private boolean eraseCredentialsAfterAuthentication = true;
103103

104-
public ProviderManager(List<AuthenticationProvider> providers) {
105-
this(providers, null);
106-
}
107-
104+
/**
105+
* Construct a {@link ProviderManager} using the given {@link AuthenticationProvider}s
106+
*
107+
* @param providers the {@link AuthenticationProvider}s to use
108+
*/
108109
public ProviderManager(AuthenticationProvider... providers) {
109110
this(Arrays.asList(providers), null);
110111
}
111112

113+
/**
114+
* Construct a {@link ProviderManager} using the given {@link AuthenticationProvider}s
115+
*
116+
* @param providers the {@link AuthenticationProvider}s to use
117+
*/
118+
public ProviderManager(List<AuthenticationProvider> providers) {
119+
this(providers, null);
120+
}
121+
122+
/**
123+
* Construct a {@link ProviderManager} using the provided parameters
124+
*
125+
* @param providers the {@link AuthenticationProvider}s to use
126+
* @param parent a parent {@link AuthenticationManager} to fall back to
127+
*/
112128
public ProviderManager(List<AuthenticationProvider> providers,
113129
AuthenticationManager parent) {
114130
Assert.notNull(providers, "providers list cannot be null");

0 commit comments

Comments
 (0)