Package org.freedesktop.dbus
Class Transport.SASL
- java.lang.Object
-
- org.freedesktop.dbus.Transport.SASL
-
- Enclosing class:
- Transport
public static class Transport.SASL extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Transport.SASL.Command
-
Field Summary
Fields Modifier and Type Field Description static int
AUTH_ANON
static int
AUTH_EXTERNAL
static int
AUTH_NONE
static int
AUTH_SHA
static int
AUTHENTICATED
java.lang.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
java.lang.String
cookie
static java.lang.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
Constructors Constructor Description SASL()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
auth(int mode, int types, java.lang.String guid, java.io.OutputStream out, java.io.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, java.lang.String Uid, java.lang.String kernelUid, Transport.SASL.Command c)
java.lang.String[]
getTypes(int types)
Transport.SASL.Command
receive(java.io.InputStream s)
void
send(java.io.OutputStream out, int command, java.lang.String... data)
-
-
-
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 java.lang.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 java.lang.String challenge
-
cookie
public java.lang.String cookie
-
-
Method Detail
-
receive
public Transport.SASL.Command receive(java.io.InputStream s) throws java.io.IOException
- Throws:
java.io.IOException
-
send
public void send(java.io.OutputStream out, int command, java.lang.String... data) throws java.io.IOException
- Throws:
java.io.IOException
-
do_challenge
public int do_challenge(int auth, Transport.SASL.Command c) throws java.io.IOException
- Throws:
java.io.IOException
-
do_response
public int do_response(int auth, java.lang.String Uid, java.lang.String kernelUid, Transport.SASL.Command c)
-
getTypes
public java.lang.String[] getTypes(int types)
-
auth
public boolean auth(int mode, int types, java.lang.String guid, java.io.OutputStream out, java.io.InputStream in, cx.ath.matthew.unix.UnixSocket us) throws java.io.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:
java.io.IOException
-
-