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 Object
implements org.alfresco.jlan.oncrpc.RpcAuthenticator, org.springframework.beans.factory.InitializingBean
Alfresco RPC Authenticator Class
Provides authentication support for the NFS server.
- Author:
- gkspencer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidInitialize the RPC authenticatorauthenticateRpcClient(int authType, org.alfresco.jlan.oncrpc.RpcPacket rpc) Authenticate an RPC client and create a unique session id key.protected <T> TDoes work in a transaction.protected AuthenticationComponentprotected MutableAuthenticationServiceint[]Return the authentication types that are supported by this implementation.org.alfresco.jlan.server.auth.ClientInfogetRpcClientInformation(Object sessKey, org.alfresco.jlan.oncrpc.RpcPacket rpc) Return the client information for the specified RPC requestprotected TransactionServicevoidinitialize(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(List<UserMapping> userMappings)
-
Constructor Details
-
AlfrescoRpcAuthenticator
public AlfrescoRpcAuthenticator()
-
-
Method Details
-
setUserMappings
-
setAuthenticationComponent
-
setAuthenticationService
-
setTransactionService
-
authenticateRpcClient
public Object authenticateRpcClient(int authType, org.alfresco.jlan.oncrpc.RpcPacket rpc) throws org.alfresco.jlan.oncrpc.RpcAuthenticationException Authenticate 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(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.InvalidConfigurationException Initialize 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
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
-
getAuthenticationService
-
getTransactionService
-