|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.walluck.oscar.handlers.SNACHandler
org.walluck.oscar.handlers.LoginHandler
public class LoginHandler
Family 0x0017 - Authentication.
Deals with the authorizer for SNAC-based login, and also old-style non-SNAC login.
SNACHandler
Field Summary | |
---|---|
static int |
REG_X1
ICQ registration X1. |
static int |
REG_X2
ICQ registration X2. |
static int |
REG_X3
ICQ registration X3. |
Constructor Summary | |
---|---|
LoginHandler()
Family 0x0017 |
Method Summary | |
---|---|
void |
handleSNAC(AIMSession sess,
SNACHandler handler,
AIMFrame frame,
SNAC snac,
AIMInputStream buffer)
Handles incoming SNAC's. |
void |
registerUIN(AIMSession sess,
AIMConnection conn,
String password)
Registers a new UIN with the ICQ network. |
void |
requestLogin(AIMSession sess,
AIMConnection conn,
String sn)
In the AIM 3.5 protocol, the first stage of login is to request login from the Authorizer, passing it the screen name for verification. |
void |
sendCookie(AIMSession sess,
AIMConnection conn,
byte[] cookie)
This just pushes the passed cookie onto the passed connection, without the SNAC header or any of that. |
void |
sendFLAPVer(AIMSession sess,
AIMConnection conn)
Normally the FLAP version is sent as the first few bytes of the cookie, meaning that you generally never call this. |
void |
sendLogin(AIMSession sess,
AIMConnection conn,
String sn,
String password,
ClientInfo ci,
String key,
String clientString)
The initial login packet. |
void |
sendSecurID(AIMSession sess,
AIMConnection conn,
String securID)
The client SecurID reply for server SNAC 0x0017/0x000a. |
Methods inherited from class org.walluck.oscar.handlers.SNACHandler |
---|
getFamily, getVersion, setFamily, setVersion |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int REG_X1
public static final int REG_X2
public static final int REG_X3
Constructor Detail |
---|
public LoginHandler()
Method Detail |
---|
public void sendCookie(AIMSession sess, AIMConnection conn, byte[] cookie) throws IOException
This just pushes the passed cookie onto the passed connection, without the SNAC header or any of that.
Very commonly used, as every connection except auth will require this to be the first thing you send.
sess
- the oscar sessionconn
- the authorizer connection for this sessioncookie
- the login cookie
IOException
- if an error occurspublic void sendFLAPVer(AIMSession sess, AIMConnection conn) throws IOException
Normally the FLAP version is sent as the first few bytes of the cookie, meaning that you generally never call this.
But there are times when something might want it seperate. Specifically, this is sent this internally when doing SNAC login.
sess
- the oscar sessionconn
- the authorizer connection for this session
IOException
- if an error occurspublic void requestLogin(AIMSession sess, AIMConnection conn, String sn) throws IOException
sess
- the oscar sessionconn
- the authorizer connection for this sessionsn
- the screenname
IOException
- if an error occurspublic void sendLogin(AIMSession sess, AIMConnection conn, String sn, String password, ClientInfo ci, String key, String clientString) throws IOException
NOTE!! If you want/need to make use of the sendmemblock() function, then the client information you send here must exactly match the executable that you're pulling the data from.
Java AIM 1.1.19: clientstring = "AOL Instant Messenger (TM) version 1.1.19 for Java built 03/24/98, freeMem 215871 totalMem 1048567, i686, Linus, #2 SMP Sun Feb 11 03:41:17 UTC 2001 2.4.1-ac9, IBM Corporation, 1.1.8, 45.3, Tue Mar 27 12:09:17 PST 2001" clientid = 0x0001 major = 0x0001 minor = 0x0001 point = (not sent) build = 0x0013 unknown= (not sent) AIM for Linux 1.1.112: clientstring = "AOL Instant Messenger (SM)" clientid = 0x1d09 major = 0x0001 minor = 0x0001 point = 0x0001 build = 0x0070 unknown= 0x0000008b serverstore = 0x01
sess
- the oscar sessionconn
- the authorizer connection for this sessionsn
- the screennamepassword
- the passwordci
- a ClientInfo classkey
- the key sent by the serverclientString
- the client string
IOException
- if an error occurspublic void registerUIN(AIMSession sess, AIMConnection conn, String password) throws IOException
I don't even know what half of this stuff is.
sess
- the oscar sessionconn
- the authorizer connection for this sessionpassword
- the plaintext password you wish to use
IOException
- if an error occurspublic void sendSecurID(AIMSession sess, AIMConnection conn, String securID) throws IOException
AIM administrators have a digital display that displays a new 6-digit SecurID number once every 60 seconds. The client must then send the new SecurID number to the server with this command, or the client will be disconnected with an authorization error.
sess
- the oscar sessionconn
- the authorizer connection for this sessionsecurID
- the 6-digit SecurID to send
IOException
- if an error occurspublic void handleSNAC(AIMSession sess, SNACHandler handler, AIMFrame frame, SNAC snac, AIMInputStream buffer) throws IOException
handleSNAC
in class SNACHandler
sess
- the oscar sessionhandler
- the handlerframe
- the incoming framesnac
- the incoming SNACbuffer
- the incoming buffer
IOException
- if an error occurs
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |