diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-authorized-users/src/main/java/org/apache/nifi/authorized/users/AuthorizedUsers.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-authorized-users/src/main/java/org/apache/nifi/authorized/users/AuthorizedUsers.java index b48f348b25..98922e76da 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-authorized-users/src/main/java/org/apache/nifi/authorized/users/AuthorizedUsers.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-authorized-users/src/main/java/org/apache/nifi/authorized/users/AuthorizedUsers.java @@ -125,9 +125,9 @@ public final class AuthorizedUsers { /** * Gets the user identity. - * - * @param user The user - * @return The user identity + * + * @param user The user + * @return The user identity */ public String getUserIdentity(final NiFiUser user) { if (User.class.isAssignableFrom(user.getClass())) { @@ -139,7 +139,7 @@ public final class AuthorizedUsers { /** * Gets all users from configured file. - * + * * @return The Users */ public synchronized Users getUsers() { @@ -165,9 +165,9 @@ public final class AuthorizedUsers { /** * Determines if a user exists through the specified HasUser. - * - * @param finder The finder - * @return Whether the user exists + * + * @param finder The finder + * @return Whether the user exists */ public synchronized boolean hasUser(final HasUser finder) { // load the users @@ -184,9 +184,9 @@ public final class AuthorizedUsers { /** * Gets the desired user. - * - * @param finder The finder - * @return The NiFiUser + * + * @param finder The finder + * @return The NiFiUser * @throws UnknownIdentityException If the desired user could not be found */ public synchronized NiFiUser getUser(final FindUser finder) { @@ -204,9 +204,9 @@ public final class AuthorizedUsers { /** * Gets the desired users. - * - * @param finder The finder - * @return The NiFiUsers + * + * @param finder The finder + * @return The NiFiUsers * @throws UnknownIdentityException If the users could not be found */ public synchronized List getUsers(final FindUsers finder) { @@ -224,8 +224,8 @@ public final class AuthorizedUsers { /** * Creates the user via the specified CreateUser. - * - * @param creator The creator + * + * @param creator The creator */ public synchronized void createUser(final CreateUser creator) { // add the user @@ -245,10 +245,10 @@ public final class AuthorizedUsers { /** * Creates or Updates a user identified by the finder. If the user exists, it's updated otherwise it's created. - * - * @param finder The finder - * @param creator The creator - * @param updater The updater + * + * @param finder The finder + * @param creator The creator + * @param updater The updater */ public synchronized void createOrUpdateUser(final FindUser finder, final CreateUser creator, final UpdateUser updater) { try { @@ -260,9 +260,9 @@ public final class AuthorizedUsers { /** * Updates the user identified by the finder. - * - * @param finder The finder - * @param updater The updater + * + * @param finder The finder + * @param updater The updater */ public synchronized void updateUser(final FindUser finder, final UpdateUser updater) { // update the user @@ -285,9 +285,9 @@ public final class AuthorizedUsers { /** * Updates the users identified by the finder. - * - * @param finder The finder - * @param updater The updater + * + * @param finder The finder + * @param updater The updater */ public synchronized void updateUsers(final FindUsers finder, final UpdateUsers updater) { // update the user @@ -309,8 +309,8 @@ public final class AuthorizedUsers { /** * Removes the user identified by the finder. - * - * @param finder The finder + * + * @param finder The finder */ public synchronized void removeUser(final FindUser finder) { // load the users @@ -335,8 +335,8 @@ public final class AuthorizedUsers { /** * Removes the users identified by the finder. - * - * @param finder The finder + * + * @param finder The finder */ public synchronized void removeUsers(final FindUsers finder) { // load the users diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-security/src/main/java/org/apache/nifi/web/security/spring/LoginIdentityProviderFactoryBean.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-security/src/main/java/org/apache/nifi/web/security/spring/LoginIdentityProviderFactoryBean.java index a7da2eb161..9a51e85ea7 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-security/src/main/java/org/apache/nifi/web/security/spring/LoginIdentityProviderFactoryBean.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-security/src/main/java/org/apache/nifi/web/security/spring/LoginIdentityProviderFactoryBean.java @@ -48,17 +48,14 @@ import org.apache.nifi.nar.NarCloseable; import org.apache.nifi.util.NiFiProperties; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.BeansException; import org.springframework.beans.factory.DisposableBean; import org.springframework.beans.factory.FactoryBean; -import org.springframework.context.ApplicationContext; -import org.springframework.context.ApplicationContextAware; import org.xml.sax.SAXException; /** * */ -public class LoginIdentityProviderFactoryBean implements FactoryBean, ApplicationContextAware, DisposableBean, LoginIdentityProviderLookup { +public class LoginIdentityProviderFactoryBean implements FactoryBean, DisposableBean, LoginIdentityProviderLookup { private static final Logger logger = LoggerFactory.getLogger(LoginIdentityProviderFactoryBean.class); private static final String LOGIN_IDENTITY_PROVIDERS_XSD = "/login-identity-providers.xsd"; @@ -76,7 +73,6 @@ public class LoginIdentityProviderFactoryBean implements FactoryBean, Applicatio } } - private ApplicationContext context; private NiFiProperties properties; private LoginIdentityProvider loginIdentityProvider; private final Map loginIdentityProviders = new HashMap<>(); @@ -326,9 +322,4 @@ public class LoginIdentityProviderFactoryBean implements FactoryBean, Applicatio public void setProperties(NiFiProperties properties) { this.properties = properties; } - - @Override - public void setApplicationContext(ApplicationContext context) throws BeansException { - this.context = context; - } } diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-security/src/test/java/org/apache/nifi/web/security/authorization/NiFiAuthorizationServiceTest.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-security/src/test/java/org/apache/nifi/web/security/authorization/NiFiAuthorizationServiceTest.java index 85e3a7613e..5a1e859c40 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-security/src/test/java/org/apache/nifi/web/security/authorization/NiFiAuthorizationServiceTest.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-security/src/test/java/org/apache/nifi/web/security/authorization/NiFiAuthorizationServiceTest.java @@ -107,7 +107,7 @@ public class NiFiAuthorizationServiceTest { private NiFiAuthenticationRequestToken createRequestAuthentication(final String... identities) { return new NiFiAuthenticationRequestToken(Arrays.asList(identities)); } - + /** * Ensures the authorization service correctly handles users invalid identity chain. * @@ -183,8 +183,7 @@ public class NiFiAuthorizationServiceTest { } /** - * Ensures the authorization service correctly handles proxy not found by - * attempting to create an account request for the proxy. + * Ensures the authorization service correctly handles proxy not found by attempting to create an account request for the proxy. * * @throws Exception ex */