Class 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.InitializingBean
    Alfresco RPC Authenticator Class

    Provides authentication support for the NFS server.

    Author:
    gkspencer
    • Constructor Detail

      • AlfrescoRpcAuthenticator

        public AlfrescoRpcAuthenticator()
    • Method Detail

      • setUserMappings

        public void setUserMappings​(java.util.List<UserMapping> userMappings)
      • setAuthenticationComponent

        public void setAuthenticationComponent​(AuthenticationComponent authenticationComponent)
      • 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.RpcAuthenticationException
        Authenticate an RPC client and create a unique session id key.
        Specified by:
        authenticateRpcClient in interface org.alfresco.jlan.oncrpc.RpcAuthenticator
        Parameters:
        authType - int
        rpc - 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:
        getRpcAuthenticationTypes in interface org.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:
        getRpcClientInformation in interface org.alfresco.jlan.oncrpc.RpcAuthenticator
        Parameters:
        sessKey - Object
        rpc - 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:
        setCurrentUser in interface org.alfresco.jlan.oncrpc.RpcAuthenticator
        Parameters:
        sess - SrvSession
        client - 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:
        initialize in interface org.alfresco.jlan.oncrpc.RpcAuthenticator
        Parameters:
        config - ServerConfiguration
        params - NameValueList
        Throws:
        org.alfresco.jlan.server.config.InvalidConfigurationException
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws org.alfresco.jlan.server.config.InvalidConfigurationException
        Initialize the RPC authenticator
        Specified by:
        afterPropertiesSet in interface org.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 null if not applicable