Package org.acplt.oncrpc
Class OncRpcClientAuth
- java.lang.Object
-
- org.acplt.oncrpc.OncRpcClientAuth
-
- Direct Known Subclasses:
OncRpcClientAuthNone
,OncRpcClientAuthUnix
public abstract class OncRpcClientAuth extends java.lang.Object
TheOncRpcClientAuth
class is the base class for handling all protocol issues of ONC/RPC authentication on the client side. As it stands, it does not do very much with the exception of defining the contract for the behaviour of derived classes with respect to protocol handling issues.Authentication on the client side can be done as follows: just create an authentication object and hand it over to the ONC/RPC client object.
OncRpcClientAuth auth = new OncRpcClientAuthUnix( "marvin@ford.prefect", 42, 1001, new int[0]); client.setAuth(auth);
Theauthentication
will handle shorthand credentials (of typeAUTH_UNIX
AUTH_SHORT
transparently). If you do not set any authentication object after creating an ONC/RPC client object,AUTH_NONE
is used automatically.- Version:
- $Revision: 1.1.1.1 $ $Date: 2003/08/13 12:03:40 $ $State: Exp $ $Locker: $
- Author:
- Harald Albrecht
-
-
Constructor Summary
Constructors Constructor Description OncRpcClientAuth()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description protected abstract boolean
canRefreshCred()
Indicates whether the ONC/RPC authentication credential can be refreshed.protected abstract void
xdrDecodeVerf(XdrDecodingStream xdr)
Decodes ONC/RPC authentication information in form of a verifier when receiving an ONC/RPC reply message.protected abstract void
xdrEncodeCredVerf(XdrEncodingStream xdr)
Encodes ONC/RPC authentication information in form of a credential and a verifier when sending an ONC/RPC call message.
-
-
-
Method Detail
-
xdrEncodeCredVerf
protected abstract void xdrEncodeCredVerf(XdrEncodingStream xdr) throws OncRpcException, java.io.IOException
Encodes ONC/RPC authentication information in form of a credential and a verifier when sending an ONC/RPC call message.- Parameters:
xdr
- XDR stream where to encode the credential and the verifier to.- Throws:
OncRpcException
- if an ONC/RPC error occurs.java.io.IOException
- if an I/O error occurs.
-
xdrDecodeVerf
protected abstract void xdrDecodeVerf(XdrDecodingStream xdr) throws OncRpcException, java.io.IOException
Decodes ONC/RPC authentication information in form of a verifier when receiving an ONC/RPC reply message.- Parameters:
xdr
- XDR stream from which to receive the verifier sent together with an ONC/RPC reply message.- Throws:
OncRpcAuthenticationException
- if the received verifier is not kosher.OncRpcException
- if an ONC/RPC error occurs.java.io.IOException
- if an I/O error occurs.
-
canRefreshCred
protected abstract boolean canRefreshCred()
Indicates whether the ONC/RPC authentication credential can be refreshed.- Returns:
- true, if the credential can be refreshed
-
-