Package org.freedesktop.dbus.connections
Class SASL
java.lang.Object
org.freedesktop.dbus.connections.SASL
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final Stringstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanauth(SASL.SaslMode mode, int types, String guid, OutputStream out, InputStream in, Socket us) performs SASL auth on the given streams.org.freedesktop.dbus.connections.SASL.SaslResultdoChallenge(int _auth, SASL.Command c) org.freedesktop.dbus.connections.SASL.SaslResultdoResponse(int _auth, String _uid, String _kernelUid, SASL.Command _c) String[]getTypes(int types) booleanvoidsend(OutputStream out, SASL.SaslCommand command, String... data)
-
Field Details
-
LOCK_TIMEOUT
public static final int LOCK_TIMEOUT- See Also:
-
NEW_KEY_TIMEOUT_SECONDS
public static final int NEW_KEY_TIMEOUT_SECONDS- See Also:
-
EXPIRE_KEYS_TIMEOUT_SECONDS
public static final int EXPIRE_KEYS_TIMEOUT_SECONDS- See Also:
-
MAX_TIME_TRAVEL_SECONDS
public static final int MAX_TIME_TRAVEL_SECONDS- See Also:
-
COOKIE_TIMEOUT
public static final int COOKIE_TIMEOUT- See Also:
-
COOKIE_CONTEXT
- See Also:
-
AUTH_NONE
public static final int AUTH_NONE- See Also:
-
AUTH_EXTERNAL
public static final int AUTH_EXTERNAL- See Also:
-
AUTH_SHA
public static final int AUTH_SHA- See Also:
-
AUTH_ANON
public static final int AUTH_ANON- See Also:
-
-
Constructor Details
-
SASL
public SASL()Create a new SASL auth handler. Defaults to disable file descriptor passing. -
SASL
public SASL(boolean _hasFileDescriptorSupport) Create a new SASL auth handler.- Parameters:
_hasFileDescriptorSupport- true to support file descriptor passing (usually only works with UNIX_SOCKET).
-
-
Method Details
-
receive
- Throws:
IOException
-
send
- Throws:
IOException
-
doChallenge
public org.freedesktop.dbus.connections.SASL.SaslResult doChallenge(int _auth, SASL.Command c) throws IOException - Throws:
IOException
-
doResponse
public org.freedesktop.dbus.connections.SASL.SaslResult doResponse(int _auth, String _uid, String _kernelUid, SASL.Command _c) -
getTypes
-
auth
public boolean auth(SASL.SaslMode mode, int types, String guid, OutputStream out, InputStream in, Socket 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.- Parameters:
mode- modetypes- typesguid- guidout- outin- inus- us- Returns:
- true if the auth was successful and false if it failed.
- Throws:
IOException- on failure
-
isFileDescriptorSupported
public boolean isFileDescriptorSupported()
-