Package org.alfresco.filesys.auth.nfs
Class AlfrescoRpcAuthenticator
- java.lang.Object
-
- org.alfresco.filesys.auth.nfs.AlfrescoRpcAuthenticator
-
- All Implemented Interfaces:
org.alfresco.jlan.oncrpc.RpcAuthenticator,org.springframework.beans.factory.InitializingBean
public class AlfrescoRpcAuthenticator extends java.lang.Object implements org.alfresco.jlan.oncrpc.RpcAuthenticator, org.springframework.beans.factory.InitializingBeanAlfresco RPC Authenticator ClassProvides authentication support for the NFS server.
- Author:
- gkspencer
-
-
Constructor Summary
Constructors Constructor Description AlfrescoRpcAuthenticator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()Initialize the RPC authenticatorjava.lang.ObjectauthenticateRpcClient(int authType, org.alfresco.jlan.oncrpc.RpcPacket rpc)Authenticate an RPC client and create a unique session id key.protected <T> TdoInTransaction(RetryingTransactionHelper.RetryingTransactionCallback<T> callback)Does work in a transaction.protected AuthenticationComponentgetAuthenticationComponent()protected MutableAuthenticationServicegetAuthenticationService()int[]getRpcAuthenticationTypes()Return the authentication types that are supported by this implementation.org.alfresco.jlan.server.auth.ClientInfogetRpcClientInformation(java.lang.Object sessKey, org.alfresco.jlan.oncrpc.RpcPacket rpc)Return the client information for the specified RPC requestprotected TransactionServicegetTransactionService()voidinitialize(org.alfresco.jlan.server.config.ServerConfiguration config, org.springframework.extensions.config.ConfigElement params)Initialize the RPC authenticatorvoidsetAuthenticationComponent(AuthenticationComponent authenticationComponent)voidsetAuthenticationService(MutableAuthenticationService authenticationService)voidsetCurrentUser(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.auth.ClientInfo client)Set the current authenticated user context for this threadvoidsetTransactionService(TransactionService transactionService)voidsetUserMappings(java.util.List<UserMapping> userMappings)
-
-
-
Method Detail
-
setUserMappings
public void setUserMappings(java.util.List<UserMapping> userMappings)
-
setAuthenticationComponent
public void setAuthenticationComponent(AuthenticationComponent authenticationComponent)
-
setAuthenticationService
public void setAuthenticationService(MutableAuthenticationService authenticationService)
-
setTransactionService
public void setTransactionService(TransactionService transactionService)
-
authenticateRpcClient
public java.lang.Object authenticateRpcClient(int authType, org.alfresco.jlan.oncrpc.RpcPacket rpc) throws org.alfresco.jlan.oncrpc.RpcAuthenticationExceptionAuthenticate an RPC client and create a unique session id key.- Specified by:
authenticateRpcClientin interfaceorg.alfresco.jlan.oncrpc.RpcAuthenticator- Parameters:
authType- intrpc- RpcPacket- Returns:
- Object
- Throws:
org.alfresco.jlan.oncrpc.RpcAuthenticationException
-
getRpcAuthenticationTypes
public int[] getRpcAuthenticationTypes()
Return the authentication types that are supported by this implementation.- Specified by:
getRpcAuthenticationTypesin interfaceorg.alfresco.jlan.oncrpc.RpcAuthenticator- Returns:
- int[]
-
getRpcClientInformation
public org.alfresco.jlan.server.auth.ClientInfo getRpcClientInformation(java.lang.Object sessKey, org.alfresco.jlan.oncrpc.RpcPacket rpc)Return the client information for the specified RPC request- Specified by:
getRpcClientInformationin interfaceorg.alfresco.jlan.oncrpc.RpcAuthenticator- Parameters:
sessKey- Objectrpc- RpcPacket- Returns:
- ClientInfo
-
setCurrentUser
public void setCurrentUser(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.auth.ClientInfo client)Set the current authenticated user context for this thread- Specified by:
setCurrentUserin interfaceorg.alfresco.jlan.oncrpc.RpcAuthenticator- Parameters:
sess- SrvSessionclient- ClientInfo
-
initialize
public void initialize(org.alfresco.jlan.server.config.ServerConfiguration config, org.springframework.extensions.config.ConfigElement params) throws org.alfresco.jlan.server.config.InvalidConfigurationExceptionInitialize the RPC authenticator- Specified by:
initializein interfaceorg.alfresco.jlan.oncrpc.RpcAuthenticator- Parameters:
config- ServerConfigurationparams- NameValueList- Throws:
org.alfresco.jlan.server.config.InvalidConfigurationException
-
afterPropertiesSet
public void afterPropertiesSet() throws org.alfresco.jlan.server.config.InvalidConfigurationExceptionInitialize the RPC authenticator- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
org.alfresco.jlan.server.config.InvalidConfigurationException
-
doInTransaction
protected <T> T doInTransaction(RetryingTransactionHelper.RetryingTransactionCallback<T> callback)
Does work in a transaction. This will be a writeable transaction unless the system is in read-only mode.- Parameters:
callback- a callback that does the work- Returns:
- the result, or
nullif not applicable
-
getAuthenticationComponent
protected AuthenticationComponent getAuthenticationComponent()
-
getAuthenticationService
protected MutableAuthenticationService getAuthenticationService()
-
getTransactionService
protected TransactionService getTransactionService()
-
-