org.freedesktop.dbus
Class Transport.SASL

java.lang.Object
  extended by org.freedesktop.dbus.Transport.SASL
Enclosing class:
Transport

public static class Transport.SASL
extends Object


Nested Class Summary
static class Transport.SASL.Command
           
 
Field Summary
static int AUTH_ANON
           
static int AUTH_EXTERNAL
           
static int AUTH_NONE
           
static int AUTH_SHA
           
static int AUTHENTICATED
           
 String challenge
           
static int COMMAND_AUTH
           
static int COMMAND_BEGIN
           
static int COMMAND_CANCEL
           
static int COMMAND_DATA
           
static int COMMAND_ERROR
           
static int COMMAND_OK
           
static int COMMAND_REJECTED
           
static int CONTINUE
           
 String cookie
           
static String COOKIE_CONTEXT
           
static int COOKIE_TIMEOUT
           
static int ERROR
           
static int EXPIRE_KEYS_TIMEOUT_SECONDS
           
static int FAILED
           
static int INITIAL_STATE
           
static int LOCK_TIMEOUT
           
static int MAX_TIME_TRAVEL_SECONDS
           
static int MODE_CLIENT
           
static int MODE_SERVER
           
static int NEW_KEY_TIMEOUT_SECONDS
           
static int OK
           
static int REJECT
           
static int WAIT_AUTH
           
static int WAIT_BEGIN
           
static int WAIT_DATA
           
static int WAIT_OK
           
static int WAIT_REJECT
           
 
Constructor Summary
Transport.SASL()
           
 
Method Summary
 boolean auth(int mode, int types, String guid, OutputStream out, InputStream in, cx.ath.matthew.unix.UnixSocket us)
          performs SASL auth on the given streams.
 int do_challenge(int auth, Transport.SASL.Command c)
           
 int do_response(int auth, String Uid, String kernelUid, Transport.SASL.Command c)
           
 String[] getTypes(int types)
           
 Transport.SASL.Command receive(InputStream s)
           
 void send(OutputStream out, int command, String... data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOCK_TIMEOUT

public static final int LOCK_TIMEOUT
See Also:
Constant Field Values

NEW_KEY_TIMEOUT_SECONDS

public static final int NEW_KEY_TIMEOUT_SECONDS
See Also:
Constant Field Values

EXPIRE_KEYS_TIMEOUT_SECONDS

public static final int EXPIRE_KEYS_TIMEOUT_SECONDS
See Also:
Constant Field Values

MAX_TIME_TRAVEL_SECONDS

public static final int MAX_TIME_TRAVEL_SECONDS
See Also:
Constant Field Values

COOKIE_TIMEOUT

public static final int COOKIE_TIMEOUT
See Also:
Constant Field Values

COOKIE_CONTEXT

public static final String COOKIE_CONTEXT
See Also:
Constant Field Values

MODE_SERVER

public static final int MODE_SERVER
See Also:
Constant Field Values

MODE_CLIENT

public static final int MODE_CLIENT
See Also:
Constant Field Values

AUTH_NONE

public static final int AUTH_NONE
See Also:
Constant Field Values

AUTH_EXTERNAL

public static final int AUTH_EXTERNAL
See Also:
Constant Field Values

AUTH_SHA

public static final int AUTH_SHA
See Also:
Constant Field Values

AUTH_ANON

public static final int AUTH_ANON
See Also:
Constant Field Values

COMMAND_AUTH

public static final int COMMAND_AUTH
See Also:
Constant Field Values

COMMAND_DATA

public static final int COMMAND_DATA
See Also:
Constant Field Values

COMMAND_REJECTED

public static final int COMMAND_REJECTED
See Also:
Constant Field Values

COMMAND_OK

public static final int COMMAND_OK
See Also:
Constant Field Values

COMMAND_BEGIN

public static final int COMMAND_BEGIN
See Also:
Constant Field Values

COMMAND_CANCEL

public static final int COMMAND_CANCEL
See Also:
Constant Field Values

COMMAND_ERROR

public static final int COMMAND_ERROR
See Also:
Constant Field Values

INITIAL_STATE

public static final int INITIAL_STATE
See Also:
Constant Field Values

WAIT_DATA

public static final int WAIT_DATA
See Also:
Constant Field Values

WAIT_OK

public static final int WAIT_OK
See Also:
Constant Field Values

WAIT_REJECT

public static final int WAIT_REJECT
See Also:
Constant Field Values

WAIT_AUTH

public static final int WAIT_AUTH
See Also:
Constant Field Values

WAIT_BEGIN

public static final int WAIT_BEGIN
See Also:
Constant Field Values

AUTHENTICATED

public static final int AUTHENTICATED
See Also:
Constant Field Values

FAILED

public static final int FAILED
See Also:
Constant Field Values

OK

public static final int OK
See Also:
Constant Field Values

CONTINUE

public static final int CONTINUE
See Also:
Constant Field Values

ERROR

public static final int ERROR
See Also:
Constant Field Values

REJECT

public static final int REJECT
See Also:
Constant Field Values

challenge

public String challenge

cookie

public String cookie
Constructor Detail

Transport.SASL

public Transport.SASL()
Method Detail

receive

public Transport.SASL.Command receive(InputStream s)
                               throws IOException
Throws:
IOException

send

public void send(OutputStream out,
                 int command,
                 String... data)
          throws IOException
Throws:
IOException

do_challenge

public int do_challenge(int auth,
                        Transport.SASL.Command c)
                 throws IOException
Throws:
IOException

do_response

public int do_response(int auth,
                       String Uid,
                       String kernelUid,
                       Transport.SASL.Command c)

getTypes

public String[] getTypes(int types)

auth

public boolean auth(int mode,
                    int types,
                    String guid,
                    OutputStream out,
                    InputStream in,
                    cx.ath.matthew.unix.UnixSocket us)
             throws IOException
performs SASL auth on the given streams. Mode selects whether to run as a SASL server or client. Types is a bitmask of the available auth types. Returns true if the auth was successful and false if it failed.

Throws:
IOException