|
Smack | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jivesoftware.smack.packet.Packet org.jivesoftware.smack.packet.IQ org.jivesoftware.smack.packet.Authentication
public class Authentication
Authentication packet, which can be used to login to a XMPP server as well as discover login information from the server.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.jivesoftware.smack.packet.IQ |
---|
IQ.Type |
Field Summary |
---|
Fields inherited from class org.jivesoftware.smack.packet.Packet |
---|
ID_NOT_AVAILABLE |
Constructor Summary | |
---|---|
Authentication()
Create a new authentication packet. |
Method Summary | |
---|---|
String |
getChildElementXML()
Returns the sub-element XML section of the IQ packet, or null if there isn't one. |
String |
getDigest()
Returns the password digest or null if the digest hasn't been set. |
String |
getPassword()
Returns the plain text password or null if the password hasn't been set. |
String |
getResource()
Returns the resource or null if the resource hasn't been set. |
String |
getUsername()
Returns the username, or null if the username hasn't been sent. |
void |
setDigest(String digest)
Sets the digest value directly. |
void |
setDigest(String connectionID,
String password)
Sets the digest value using a connection ID and password. |
void |
setPassword(String password)
Sets the plain text password. |
void |
setResource(String resource)
Sets the resource. |
void |
setUsername(String username)
Sets the username. |
Methods inherited from class org.jivesoftware.smack.packet.IQ |
---|
getType, setType, toXML |
Methods inherited from class org.jivesoftware.smack.packet.Packet |
---|
addExtension, deleteProperty, getError, getExtension, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, removeExtension, setError, setFrom, setPacketID, setProperty, setTo |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Authentication()
setType(IQ.Type.GET);
Method Detail |
---|
public String getUsername()
public void setUsername(String username)
username
- the username.public String getPassword()
public void setPassword(String password)
password
- the password.public String getDigest()
public void setDigest(String connectionID, String password)
connectionID
- the connection ID.password
- the password.XMPPConnection.getConnectionID()
public void setDigest(String digest)
digest
- the digest, which is the SHA-1 hash of the connection ID
the user's password, encoded as hex.XMPPConnection.getConnectionID()
public String getResource()
public void setResource(String resource)
resource
- the resource.public String getChildElementXML()
IQ
Extensions of this class must override this method.
getChildElementXML
in class IQ
|
Smack | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |