Class AbstractAuthInitialize
java.lang.Object
org.springframework.data.gemfire.support.DeclarableSupport
org.springframework.data.gemfire.support.WiringDeclarableSupport
org.springframework.data.gemfire.config.annotation.support.AbstractAuthInitialize
- All Implemented Interfaces:
org.apache.geode.cache.CacheCallback
,org.apache.geode.cache.Declarable
,org.apache.geode.security.AuthInitialize
,org.springframework.beans.factory.Aware
,org.springframework.context.EnvironmentAware
- Direct Known Subclasses:
AutoConfiguredAuthenticationInitializer
public abstract class AbstractAuthInitialize
extends WiringDeclarableSupport
implements org.apache.geode.security.AuthInitialize, org.springframework.context.EnvironmentAware
Abstract class and basic implementation of the
AuthInitialize
interface used to authenticate a client
or peer with a secure Apache Geode cluster.- Since:
- 2.0.0
- See Also:
-
Properties
Cache
DistributedMember
AuthInitialize
EnvironmentAware
Environment
WiringDeclarableSupport
-
Field Summary
Fields inherited from class org.springframework.data.gemfire.support.WiringDeclarableSupport
TEMPLATE_BEAN_NAME_PROPERTY
Fields inherited from interface org.apache.geode.security.AuthInitialize
SECURITY_PASSWORD, SECURITY_USERNAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Properties
doGetCredentials
(Properties properties) protected void
doInit()
final Properties
getCredentials
(Properties properties, org.apache.geode.distributed.DistributedMember distributedMember, boolean isPeer) Gets the security credentials used to authenticate this Apache Geode node with the Apache Geode distributed system (cluster).protected Optional<org.springframework.core.env.Environment>
Get anOptional
reference to the configured SpringEnvironment
.final void
init
(org.apache.geode.LogWriter systemLogWriter, org.apache.geode.LogWriter securityLogWriter) Initializes this Apache Geode component by auto-wiring (configuring) any dependencies managed by the Spring container required during authentication.void
setEnvironment
(org.springframework.core.env.Environment environment) Sets a reference to the configured SpringEnvironment
.Methods inherited from class org.springframework.data.gemfire.support.WiringDeclarableSupport
configureThis, configureThis, initialize, newBeanConfigurer, newBeanConfigurer
Methods inherited from class org.springframework.data.gemfire.support.DeclarableSupport
close, getBeanFactory, getBeanFactoryKey, locateBeanFactory, locateBeanFactory, setBeanFactoryKey
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.geode.security.AuthInitialize
getCredentials, init
Methods inherited from interface org.apache.geode.cache.CacheCallback
close
Methods inherited from interface org.apache.geode.cache.Declarable
init, initialize
-
Constructor Details
-
AbstractAuthInitialize
public AbstractAuthInitialize()
-
-
Method Details
-
setEnvironment
public void setEnvironment(@Nullable org.springframework.core.env.Environment environment) Sets a reference to the configured SpringEnvironment
.- Specified by:
setEnvironment
in interfaceorg.springframework.context.EnvironmentAware
- Parameters:
environment
- reference to the configured SpringEnvironment
.- See Also:
-
Environment
-
getEnvironment
Get anOptional
reference to the configured SpringEnvironment
. -
init
public final void init(org.apache.geode.LogWriter systemLogWriter, org.apache.geode.LogWriter securityLogWriter) throws org.apache.geode.security.AuthenticationFailedException Initializes this Apache Geode component by auto-wiring (configuring) any dependencies managed by the Spring container required during authentication.- Specified by:
init
in interfaceorg.apache.geode.security.AuthInitialize
- Parameters:
systemLogWriter
-LogWriter
for system output.securityLogWriter
-LogWriter
for security output.- Throws:
org.apache.geode.security.AuthenticationFailedException
- if this Apache Geode node could not be authenticated with the Apache Geode distributed system (cluster).- See Also:
-
doInit
protected void doInit() -
getCredentials
public final Properties getCredentials(Properties properties, org.apache.geode.distributed.DistributedMember distributedMember, boolean isPeer) throws org.apache.geode.security.AuthenticationFailedException Gets the security credentials used to authenticate this Apache Geode node with the Apache Geode distributed system (cluster).- Specified by:
getCredentials
in interfaceorg.apache.geode.security.AuthInitialize
- Parameters:
properties
- Apache GeodeProperties
to configure with authentication credentials used during the authentication request.distributedMember
-DistributedMember
representing this Apache Geode node.isPeer
- boolean value indicating whether this Apache Geode node is joining the cluster as a peer or a client.- Returns:
- the given Apache Geode
Properties
. - Throws:
org.apache.geode.security.AuthenticationFailedException
- if this Apache Geode node could not be authenticated with the Apache Geode distributed system (cluster).- See Also:
-
DistributedMember
doGetCredentials(Properties)
Properties
-
doGetCredentials
-