public interface OncRpcServerAuth
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.
Modifier and Type | Method and Description |
---|---|
int |
getAuthenticationType()
Returns the authentication type (flavor) identifying the
authentication scheme this handler belongs to.
|
void |
xdrDecodeCredVerf(XdrDecodingStream xdr)
Decodes -- that is: deserializes -- an ONC/RPC authentication object
(credential & verifier) on the server side.
|
void |
xdrEncodeVerf(XdrEncodingStream xdr)
Encodes -- that is: serializes -- an ONC/RPC authentication object
(its verifier) on the server side.
|
int getAuthenticationType()
This may either be one of the standard types as defined in OncRpcAuthType
or the number of a custom authentication scheme.
void xdrDecodeCredVerf(XdrDecodingStream xdr) throws OncRpcException, IOException
xdr
- An XDR decoding streamOncRpcException
- if an ONC/RPC error occurs.IOException
- if an I/O error occurs.void xdrEncodeVerf(XdrEncodingStream xdr) throws OncRpcException, IOException
xdr
- An XDR encoding streamOncRpcException
- if an ONC/RPC error occurs.IOException
- if an I/O error occurs.Copyright © 2015. All rights reserved.