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 classTransport.SASL.Command
-
Field Summary
Fields Modifier and Type Field Description static intAUTH_ANONstatic intAUTH_EXTERNALstatic intAUTH_NONEstatic intAUTH_SHAstatic intAUTHENTICATEDjava.lang.Stringchallengestatic intCOMMAND_AUTHstatic intCOMMAND_BEGINstatic intCOMMAND_CANCELstatic intCOMMAND_DATAstatic intCOMMAND_ERRORstatic intCOMMAND_OKstatic intCOMMAND_REJECTEDstatic intCONTINUEjava.lang.Stringcookiestatic java.lang.StringCOOKIE_CONTEXTstatic intCOOKIE_TIMEOUTstatic intERRORstatic intEXPIRE_KEYS_TIMEOUT_SECONDSstatic intFAILEDstatic intINITIAL_STATEstatic intLOCK_TIMEOUTstatic intMAX_TIME_TRAVEL_SECONDSstatic intMODE_CLIENTstatic intMODE_SERVERstatic intNEW_KEY_TIMEOUT_SECONDSstatic intOKstatic intREJECTstatic intWAIT_AUTHstatic intWAIT_BEGINstatic intWAIT_DATAstatic intWAIT_OKstatic intWAIT_REJECT
-
Constructor Summary
Constructors Constructor Description SASL()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanauth(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.intdo_challenge(int auth, Transport.SASL.Command c)intdo_response(int auth, java.lang.String Uid, java.lang.String kernelUid, Transport.SASL.Command c)java.lang.String[]getTypes(int types)Transport.SASL.Commandreceive(java.io.InputStream s)voidsend(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.IOExceptionperforms 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
-
-