|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.echomine.jabber.JabberMessage
com.echomine.jabber.JabberJDOMMessage
com.echomine.jabber.AbstractJabberMessage
com.echomine.jabber.JabberIQMessage
com.echomine.jabber.msg.AuthIQMessage
public class AuthIQMessage
This message object deals with all the workings of sending and receiving authentication messages. The auth message doesn't require to and from field so they're not required by this message. The outgoing auth message is synchronized by default since it requires waiting for a reply to know the status of the outgoing message. Incoming auth message is not synchronized by default since incoming message normally won't get sent out again.
Field Summary | |
---|---|
static int |
AUTH_CLEARTEXT
|
static int |
AUTH_DIGEST
|
static int |
AUTH_ZERO_KNOWLEDGE
|
Fields inherited from class com.echomine.jabber.JabberIQMessage |
---|
TYPE_GET, TYPE_RESULT, TYPE_SET |
Fields inherited from class com.echomine.jabber.AbstractJabberMessage |
---|
TYPE_ERROR |
Fields inherited from class com.echomine.jabber.JabberMessage |
---|
messageID |
Constructor Summary | |
---|---|
AuthIQMessage()
this constructor is used for incoming iq:auth messages. |
|
AuthIQMessage(java.lang.String type)
this constructor is used for creating an initial outgoing message. |
Method Summary | |
---|---|
static AuthIQMessage |
createGetAuthMethodsMessage(JabberContext context)
this returns a default message instance for getting authentication information. |
static AuthIQMessage |
createLoginMessage(JabberContext context,
int authType,
java.lang.String zerokToken,
int zerokSeq)
creates an auth message that has everything set for sending a login message. |
protected java.lang.String |
getCleartextPassword(JabberContext context)
|
protected java.lang.String |
getDigestPassword(JabberContext context)
The way a digest password is computed is as follows. |
int |
getMessageType()
the default message type is unknown. |
int |
getMostSecureAuth()
retrieves the most secure authentication method that exists inside the reply message. |
java.lang.String |
getPassword(JabberContext context,
int authType)
This method checks to see which is the most secure authentication method first, and based on that, return the password for that authentication method. |
protected java.lang.String |
getZeroKnowledgePassword(JabberContext context,
java.lang.String zerokToken,
int zerokSeq)
The way to compute zero-k password is as follows (all using SHA1). |
int |
getZerokSeq()
|
java.lang.String |
getZerokToken()
|
Methods inherited from class com.echomine.jabber.AbstractJabberMessage |
---|
getErrorMessage, getFrom, getTo, getType, isError, parse, setErrorMessage, setFrom, setTo, setType |
Methods inherited from class com.echomine.jabber.JabberJDOMMessage |
---|
encode, getDOM, getXMLOutputter, setMessageID, toString |
Methods inherited from class com.echomine.jabber.JabberMessage |
---|
getMessageID, getReplyMessage, getTimeout, getXMessage, getXMessages, interrupt, isReplyRequired, isSendXMessages, isSynchronized, replyReceived, setReplyRequired, setSendXMessages, setSynchronized, setTimeout, setXMessage, setXMessages |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int AUTH_CLEARTEXT
public static final int AUTH_DIGEST
public static final int AUTH_ZERO_KNOWLEDGE
Constructor Detail |
---|
public AuthIQMessage(java.lang.String type)
public AuthIQMessage()
Method Detail |
---|
public int getMostSecureAuth()
public java.lang.String getPassword(JabberContext context, int authType)
protected java.lang.String getCleartextPassword(JabberContext context)
protected java.lang.String getDigestPassword(JabberContext context)
protected java.lang.String getZeroKnowledgePassword(JabberContext context, java.lang.String zerokToken, int zerokSeq)
public static AuthIQMessage createGetAuthMethodsMessage(JabberContext context)
public static AuthIQMessage createLoginMessage(JabberContext context, int authType, java.lang.String zerokToken, int zerokSeq)
context
- the context that will contains the login informationauthType
- the authentication type that will be used to login (valid types are listed in this class as constants)zerokToken
- the token sent by the server, required only if you're using Zero-Knowledge AuthenticationzerokSeq
- the sequence sent by the server, required only if you're using Zero-Knowledge Authenticationpublic java.lang.String getZerokToken()
public int getZerokSeq()
public int getMessageType()
JabberJDOMMessage
getMessageType
in class JabberIQMessage
JabberCode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |