public abstract class CifsAuthenticatorBase extends org.alfresco.jlan.server.auth.CifsAuthenticator implements ActivateableBean, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
Base class for Alfresco CIFS authenticator implementations.
Modifier and Type | Field and Description |
---|---|
protected static org.apache.commons.logging.Log |
logger |
protected MD4PasswordEncoder |
m_md4Encoder
The m_md4 encoder.
|
GUEST_USERNAME, m_config, m_random
AUTH_ACCDISABLED, AUTH_ALLOW, AUTH_BADPASSWORD, AUTH_BADUSER, AUTH_DISALLOW, AUTH_GUEST, AUTH_PASSEXPIRED, LANMAN, NoAccess, NTLM1, NTLM2, ReadOnly, SHARE_MODE, STANDARD_CHALLENGE_LEN, STANDARD_PASSWORD_LEN, USER_MODE, Writeable
Constructor and Description |
---|
CifsAuthenticatorBase()
Instantiates a new cifs authenticator base.
|
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
protected void |
checkForAdminUserName(org.alfresco.jlan.server.auth.ClientInfo cInfo)
Check if the user is an administrator user name.
|
void |
destroy()
Handle tidy up on container shutdown.
|
protected void |
doGuestLogon(org.alfresco.jlan.server.auth.ClientInfo client,
org.alfresco.jlan.server.SrvSession sess)
Logon using the guest user account.
|
protected <T> T |
doInTransaction(RetryingTransactionHelper.RetryingTransactionCallback<T> callback)
Does work in a transaction.
|
protected AuthenticationComponent |
getAuthenticationComponent()
Return the authentication component.
|
protected AuthenticationService |
getAuthenticationService()
Return the authentication service.
|
protected AuthorityService |
getAuthorityService()
Return the authority service.
|
protected void |
getHomeFolderForUser(org.alfresco.jlan.server.auth.ClientInfo client)
Get the home folder for the user.
|
protected org.alfresco.service.cmr.repository.NodeService |
getNodeService()
Return the node service.
|
protected NLTMAuthenticator |
getNTLMAuthenticator()
Returns an SSO-enabled authentication component.
|
protected PersonService |
getPersonService()
Return the person service.
|
void |
initialize()
Initialize the authenticator.
|
void |
initialize(org.alfresco.jlan.server.config.ServerConfiguration config,
org.springframework.extensions.config.ConfigElement params)
Initialize the authenticator.
|
boolean |
isActive()
Determines whether this bean is active.
|
String |
mapUserNameToPerson(String userName,
boolean checkEnabled)
Map the case insensitive logon name to the internal person object user name.
|
void |
setActive(boolean active)
Activates or deactivates the bean.
|
void |
setAuthenticationComponent(AuthenticationComponent authenticationComponent)
Sets the authentication component.
|
void |
setAuthenticationService(AuthenticationService authenticationService)
Sets the authentication service.
|
void |
setAuthorityService(AuthorityService authorityService)
Sets the authority service.
|
void |
setCurrentUser(org.alfresco.jlan.server.auth.ClientInfo client)
Set the current authenticated user context for this thread.
|
void |
setDiskInterface(org.alfresco.jlan.server.filesys.DiskInterface diskInterface)
Set the filesystem driver for the node service based filesystem.
|
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
Sets the node service.
|
void |
setPersonService(PersonService personService)
Sets the person service.
|
void |
setTransactionService(TransactionService transactionService)
Sets the transaction service.
|
protected boolean |
validateAuthenticationMode()
Validate that the authentication component supports the required mode.
|
allowGuest, authenticateShareConnect, authenticateUser, authenticateUserPlainText, closeAuthenticator, convertPassword, generateEncryptedPassword, generateNegotiateResponse, getAccessMode, getAuthContext, getCIFSConfig, getEnabledDialects, getEncryptionKeyLength, getEncryptor, getGuestUserName, getsecurityConfig, getSecurityMode, getServerCapabilities, getStatusAsString, getUserDetails, hasDebug, hasExtendedSecurity, hasSessionCleanup, mapClientAddressToDomain, mapUnknownUserToGuest, processSessionSetup, setAccessMode, setAllowGuest, setConfig, setDebug, setExtendedSecurity, setGuestUserName, setMapToGuest, setSecurityMode, setSessionCleanup, toString, validatePassword
protected static final org.apache.commons.logging.Log logger
protected MD4PasswordEncoder m_md4Encoder
public CifsAuthenticatorBase()
public void setAuthenticationComponent(AuthenticationComponent authenticationComponent)
authenticationComponent
- the authenticationComponent to setpublic void setAuthenticationService(AuthenticationService authenticationService)
authenticationService
- the authenticationService to setpublic void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
nodeService
- the nodeService to setpublic void setPersonService(PersonService personService)
personService
- the personService to setpublic void setTransactionService(TransactionService transactionService)
transactionService
- the transactionService to setpublic void setAuthorityService(AuthorityService authorityService)
authorityService
- the authorityService to setpublic void setDiskInterface(org.alfresco.jlan.server.filesys.DiskInterface diskInterface)
diskInterface
- DiskInterfacepublic boolean isActive()
ActivateableBean
isActive
in interface ActivateableBean
true
if this bean is activepublic void setActive(boolean active)
active
- true
if the bean is active and initialization should completepublic void initialize(org.alfresco.jlan.server.config.ServerConfiguration config, org.springframework.extensions.config.ConfigElement params) throws org.alfresco.jlan.server.config.InvalidConfigurationException
initialize
in class org.alfresco.jlan.server.auth.CifsAuthenticator
config
- ServerConfigurationparams
- ConfigElementorg.alfresco.jlan.server.config.InvalidConfigurationException
- the invalid configuration exceptionorg.alfresco.jlan.server.config.InvalidConfigurationException
public void initialize() throws org.alfresco.jlan.server.config.InvalidConfigurationException
initialize
in class org.alfresco.jlan.server.auth.CifsAuthenticator
org.alfresco.jlan.server.config.InvalidConfigurationException
- the invalid configuration exceptionorg.alfresco.jlan.server.config.InvalidConfigurationException
public final void afterPropertiesSet() throws org.alfresco.jlan.server.config.InvalidConfigurationException
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
org.alfresco.jlan.server.config.InvalidConfigurationException
protected boolean validateAuthenticationMode()
protected void doGuestLogon(org.alfresco.jlan.server.auth.ClientInfo client, org.alfresco.jlan.server.SrvSession sess)
doGuestLogon
in class org.alfresco.jlan.server.auth.CifsAuthenticator
client
- ClientInfosess
- SrvSessionprotected final void getHomeFolderForUser(org.alfresco.jlan.server.auth.ClientInfo client)
client
- ClientInfopublic final String mapUserNameToPerson(String userName, boolean checkEnabled)
userName
- StringcheckEnabled
- public void setCurrentUser(org.alfresco.jlan.server.auth.ClientInfo client)
setCurrentUser
in interface org.alfresco.jlan.server.auth.ICifsAuthenticator
setCurrentUser
in class org.alfresco.jlan.server.auth.CifsAuthenticator
client
- ClientInfo or null to clear the contextprotected final AuthenticationComponent getAuthenticationComponent()
protected final NLTMAuthenticator getNTLMAuthenticator()
protected final AuthenticationService getAuthenticationService()
protected final org.alfresco.service.cmr.repository.NodeService getNodeService()
protected final PersonService getPersonService()
protected final AuthorityService getAuthorityService()
protected final void checkForAdminUserName(org.alfresco.jlan.server.auth.ClientInfo cInfo)
cInfo
- ClientInfoprotected <T> T doInTransaction(RetryingTransactionHelper.RetryingTransactionCallback<T> callback)
callback
- a callback that does the worknull
if not applicableCopyright © 2005–2017 Alfresco Software. All rights reserved.