|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSnacCommand
AuthCommand
AuthRequest
A SNAC command used to log into the OSCAR server.
For those interested, authorization is done by sending an MD5 hash of the
string formed by concatenating the authorization key, the user's password, and the string "AOL Instant
Messenger (SM)". This way the user's password is never sent over an OSCAR
connection.
Newer clients use a slightly different algorithm and send an extra empty
0x4c
TLV to indicate that this algorithm was used. The algorithm
is almost identical to the one mentioned above except that instead of using
the user's password, the password's MD5 hash is used. An MD5 hash of the
string formed by concatenating the authorization key, an MD5 hash of the
user's password, and the string "AOL Instant Messenger (SM)" is sent. The
reason for adding this extra step is unknown, as it does not appear to
increase security.
As of version 0.9.3, joscar always uses the second algorithm.
AuthResponse
0x17
, command 0x02
Field Summary |
Fields inherited from class AuthCommand |
CMD_AUTH_REQ, CMD_AUTH_RESP, CMD_KEY_REQ, CMD_KEY_RESP, FAMILY_AUTH, FAMILY_INFO |
Fields inherited from class SnacCommand |
SNACFLAG_DEFAULT |
Constructor Summary | |
protected |
AuthRequest(SnacPacket packet)
Generates an auth request command from the given incoming SNAC packet. |
|
AuthRequest(java.lang.String sn,
java.lang.String pass,
ClientVersionInfo version,
ByteBlock key)
Creates an outgoing authorization request command with the given screenname, password, client version, and authorization key, and with the JVM's current locale. |
|
AuthRequest(java.lang.String sn,
java.lang.String pass,
ClientVersionInfo version,
java.util.Locale locale,
ByteBlock key)
Creates an outgoing authorization request command with the given screenname, password, client version, locale, and authorization key. |
Method Summary | |
ByteBlock |
getEncryptedPass()
The raw encrypted password sent in this authorization request. |
java.util.Locale |
getLocale()
Returns the user's locale. |
java.lang.String |
getScreenname()
Returns the screen name whose login is being attempted. |
ClientVersionInfo |
getVersionInfo()
Returns the user's client information block. |
boolean |
isPassHashed()
Returns whether the password was encoded as its MD5 hash. |
java.lang.String |
toString()
|
void |
writeData(java.io.OutputStream out)
Writes this command's SNAC data block to the given stream. |
Methods inherited from class SnacCommand |
getCommand, getFamily, getFlag1, getFlag2 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
protected AuthRequest(SnacPacket packet)
packet
- an authorization request SNAC packetpublic AuthRequest(java.lang.String sn, java.lang.String pass, ClientVersionInfo version, ByteBlock key)
new AuthRequest(sn, pass,
version, Locale.getDefault(), key)
.
sn
- the user's screennamepass
- the user's passwordversion
- a client information blockkey
- an authorization key block provided by the server in a
KeyResponse
public AuthRequest(java.lang.String sn, java.lang.String pass, ClientVersionInfo version, java.util.Locale locale, ByteBlock key)
sn
- the user's screennamepass
- the user's passwordversion
- a client information blocklocale
- the user's localekey
- an authorization key block provided by the server in a
KeyResponse
Method Detail |
public final java.lang.String getScreenname()
public final ClientVersionInfo getVersionInfo()
public final java.util.Locale getLocale()
public final ByteBlock getEncryptedPass()
public final boolean isPassHashed()
public void writeData(java.io.OutputStream out) throws java.io.IOException
SnacCommand
writeData
in class SnacCommand
out
- the stream to which to write the SNAC data
java.io.IOException
- if an I/O error occurspublic java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |