org.alfresco.filesys.auth.nfs
Class AlfrescoRpcAuthenticator

java.lang.Object
  extended by 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.InitializingBean

Alfresco RPC Authenticator Class

Provides authentication support for the NFS server.


Constructor Summary
AlfrescoRpcAuthenticator()
           
 
Method Summary
 void afterPropertiesSet()
          Initialize the RPC authenticator
 java.lang.Object authenticateRpcClient(int authType, org.alfresco.jlan.oncrpc.RpcPacket rpc)
          Authenticate an RPC client and create a unique session id key.
protected  java.lang.Object doInTransaction(RetryingTransactionHelper.RetryingTransactionCallback callback)
          Does work in a transaction.
protected  AuthenticationComponent getAuthenticationComponent()
           
protected  MutableAuthenticationService getAuthenticationService()
           
 int[] getRpcAuthenticationTypes()
          Return the authentication types that are supported by this implementation.
 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
protected  TransactionService getTransactionService()
           
 void initialize(org.alfresco.jlan.server.config.ServerConfiguration config, org.springframework.extensions.config.ConfigElement params)
          Initialize the RPC authenticator
 void setAuthenticationComponent(AuthenticationComponent authenticationComponent)
           
 void setAuthenticationService(MutableAuthenticationService authenticationService)
           
 void setCurrentUser(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.auth.ClientInfo client)
          Set the current authenticated user context for this thread
 void setTransactionService(TransactionService transactionService)
           
 void setUserMappings(java.util.List userMappings)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlfrescoRpcAuthenticator

public AlfrescoRpcAuthenticator()
Method Detail

setUserMappings

public void setUserMappings(java.util.List 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.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 java.lang.Object doInTransaction(RetryingTransactionHelper.RetryingTransactionCallback 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

getAuthenticationComponent

protected AuthenticationComponent getAuthenticationComponent()

getAuthenticationService

protected MutableAuthenticationService getAuthenticationService()

getTransactionService

protected TransactionService getTransactionService()


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.