Interface OncRpcServerAuth
- All Known Implementing Classes:
OncRpcServerAuthNone,OncRpcServerAuthShort,OncRpcServerAuthUnix
Therefore, implementations of this interface can be seen as authentication handlers coming with specific authentication schemes. They are invoked before dispatching a call to the implementation of the ONC/RPC server stub. In detail, if an authentication handler refuses credentials or verifiers, an ONC/RPC server will not dispatch the call, but reply an appropriate authentication error to the client.
Authentication handlers are responsible for decoding the authentication part of an ONC/RPC call message. The decoded authentication information shall be verified and shall lead to an appropriate authentication error, if verification of the authentication information fails.
If authentication succeeded and the call has been dispatched and processed by the ONC/RPC server stub implementation, an authentication handler will be asked to encode an verifier. It depends on the authentication scheme, whether an verifier will be provided or the verifier just gets auth-none as type with no further data.
- Author:
- Harald Albrecht
-
Method Summary
Modifier and TypeMethodDescriptionintReturns the authentication type (flavor) identifying the authentication scheme this handler belongs to.voidDecodes -- that is: deserializes -- an ONC/RPC authentication object (credential & verifier) on the server side.voidEncodes -- that is: serializes -- an ONC/RPC authentication object (its verifier) on the server side.
-
Method Details
-
getAuthenticationType
int getAuthenticationType()Returns the authentication type (flavor) identifying the authentication scheme this handler belongs to.This may either be one of the standard types as defined in
OncRpcAuthTypeor the number of a custom authentication scheme.- Returns:
- Authentication type implemented by this authentication handler.
-
xdrDecodeCredVerf
Decodes -- that is: deserializes -- an ONC/RPC authentication object (credential & verifier) on the server side.- Parameters:
xdr- An XDR decoding stream- Throws:
OncRpcException- if an ONC/RPC error occurs.IOException- if an I/O error occurs.
-
xdrEncodeVerf
Encodes -- that is: serializes -- an ONC/RPC authentication object (its verifier) on the server side.- Parameters:
xdr- An XDR encoding stream- Throws:
OncRpcException- if an ONC/RPC error occurs.IOException- if an I/O error occurs.
-