org.acplt.oncrpc.server

## Class OncRpcServerAuthUnix

- java.lang.Object
- - org.acplt.oncrpc.server.OncRpcServerAuth
  - - org.acplt.oncrpc.server.OncRpcServerAuthUnix

    public final class OncRpcServerAuthUnix
    extends OncRpcServerAuth

The `OncRpcServerAuthNone` class handles all protocol issues of the ONC/RPC authentication `AUTH_UNIX` on the server side.

Version:
  $Revision: 1.1.1.1 $ $Date: 2003/08/13 12:03:51 $ $State: Exp $ $Locker: $
Author:
  Harald Albrecht

### Field Summary

Fields
`int` `gid` Contains the group ID of caller supplied through credential.
`int[]` `gids` Contains a set of group IDs the caller belongs to, as supplied through credential.
`java.lang.String` `machinename` Contains the machine name of caller supplied through credential.
`private byte[]` `shorthandVerf` Contains the shorthand authentication verifier (credential) to return to the caller to be used with the next ONC/RPC calls.
`int` `stamp` Contains timestamp as supplied through credential.
`int` `uid` Contains the user ID of caller supplied through credential.

### Constructor Summary

Constructors
Constructor and Description
`OncRpcServerAuthUnix(XdrDecodingStream xdr)` Constructs an `OncRpcServerAuthUnix` object and pulls its state off an XDR stream.

### Method Summary

Methods
`int` `getAuthenticationType()` Returns the type (flavor) of `authentication` used.
`byte[]` `getShorthandVerifier()` Returns the shorthand verifier to be sent back to the caller.
`void` `setShorthandVerifier(byte[] shorthandVerf)` Sets shorthand verifier to be sent back to the caller.
`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.

### Methods inherited from class org.acplt.oncrpc.server.OncRpcServerAuth

`xdrNew`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### stamp

    public int stamp

Contains timestamp as supplied through credential.

#### machinename

    public java.lang.String machinename

Contains the machine name of caller supplied through credential.

#### uid

    public int uid

Contains the user ID of caller supplied through credential.

#### gid

    public int gid

Contains the group ID of caller supplied through credential.

#### gids

    public int[] gids

Contains a set of group IDs the caller belongs to, as supplied through credential.

#### shorthandVerf

    private byte[] shorthandVerf

Contains the shorthand authentication verifier (credential) to return to the caller to be used with the next ONC/RPC calls.

### Constructor Detail

#### OncRpcServerAuthUnix

    public OncRpcServerAuthUnix(XdrDecodingStream xdr)
                         throws OncRpcException,
                                java.io.IOException

Constructs an `OncRpcServerAuthUnix` object and pulls its state off an XDR stream.

Parameters:
  `xdr` - XDR stream to retrieve the object state from.
Throws:
  `OncRpcException` - if an ONC/RPC error occurs.
  `java.io.IOException` - if an I/O error occurs.

### Method Detail

#### getAuthenticationType

    public final int getAuthenticationType()

Returns the type (flavor) of `authentication` used.

Specified by:
  `getAuthenticationType` in class `OncRpcServerAuth`
Returns:
  Authentication type used by this authentication object.

#### setShorthandVerifier

    public final void setShorthandVerifier(byte[] shorthandVerf)

Sets shorthand verifier to be sent back to the caller. The caller then can use this shorthand verifier as the new credential with the next ONC/RPC calls to speed up things up (hopefully).

#### getShorthandVerifier

    public final byte[] getShorthandVerifier()

Returns the shorthand verifier to be sent back to the caller.

#### xdrDecodeCredVerf

    public final void xdrDecodeCredVerf(XdrDecodingStream xdr)
                                 throws OncRpcException,
                                        java.io.IOException

Decodes -- that is: deserializes -- an ONC/RPC authentication object (credential & verifier) on the server side.

Specified by:
  `xdrDecodeCredVerf` in class `OncRpcServerAuth`
Throws:
  `OncRpcException` - if an ONC/RPC error occurs.
  `java.io.IOException` - if an I/O error occurs.

#### xdrEncodeVerf

    public final void xdrEncodeVerf(XdrEncodingStream xdr)
                             throws OncRpcException,
                                    java.io.IOException

Encodes -- that is: serializes -- an ONC/RPC authentication object (its verifier) on the server side.

Specified by:
  `xdrEncodeVerf` in class `OncRpcServerAuth`
Throws:
  `OncRpcException` - if an ONC/RPC error occurs.
  `java.io.IOException` - if an I/O error occurs.