[
https://issues.apache.org/jira/browse/GEODE-3412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16123664#comment-16123664
]
ASF GitHub Bot commented on GEODE-3412:
---------------------------------------
Github user kohlmu-pivotal commented on a diff in the pull request:
https://github.com/apache/geode/pull/707#discussion_r132735527
--- Diff:
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ServerConnectionFactory.java
---
@@ -63,6 +65,31 @@ private static ClientProtocolMessageHandler
findClientProtocolMessageHandler() {
}
}
+ private static Class<? extends StreamAuthenticator>
findStreamAuthenticator(
+ String implementationID) {
+ if (authenticatorClass != null) {
+ return authenticatorClass;
+ }
+
+ synchronized (streamAuthenticatorLoadLock) {
+ if (authenticatorClass != null) {
+ return authenticatorClass;
+ }
+
+ ServiceLoader<StreamAuthenticator> loader =
ServiceLoader.load(StreamAuthenticator.class);
+
+ for (StreamAuthenticator classInstance : loader) {
+ if (implementationID.equals(classInstance.implementationID())) {
+ return classInstance.getClass();
--- End diff --
Why do we get an instance of the StreamAuthenticator, just to call
`getClass` on it, and then later we create a new instance of class from this
instance.
> Implement a basic authentication mechanism for the new protocol
> ---------------------------------------------------------------
>
> Key: GEODE-3412
> URL: https://issues.apache.org/jira/browse/GEODE-3412
> Project: Geode
> Issue Type: New Feature
> Components: client/server
> Reporter: Brian Rowe
>
> Implement a simple username/password authentication for the new protocol.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)