org.jabber.jabberbeans.Extension
Class IQAuth
java.lang.Object
|
+--org.jabber.jabberbeans.XMLData
|
+--org.jabber.jabberbeans.Extension.IQAuth
- Direct Known Subclasses:
- IQAuthExtension
- public class IQAuth
- extends XMLData
- implements QueryExtension
An IQAuth
object represents the jabber:iq:auth
namespace.
This namespace extension is used to specify the information needed to log
into the jabber server.
- Version:
- $Revision: 1.1.1.1 $
- Author:
- David Waite
<dwaite@jabber.com>, $Author: lucky $
- See Also:
- Serialized Form
Field Summary |
private java.lang.String |
password
a String which holds the password for this user. |
private java.lang.String |
resource
a String which represents the session resource. |
private java.lang.String |
SHA1Digest
a String which holds the SHA1 Digest for this user. |
private java.lang.String |
username
a String which represents the user name on the server. |
Method Summary |
void |
appendItem(java.lang.StringBuffer retval)
appendItem appends the XML representation of the
current packet data to the specified StringBuffer . |
java.lang.String |
getPassword()
getPassword returns the value used for the password |
java.lang.String |
getResource()
getResource returns the value of the resource attribute |
java.lang.String |
getSHA1Digest()
isSHA1Digest differentiates between the passkey being
a password or SHA1 key |
java.lang.String |
getUsername()
getUsername returns the value of the username attribute |
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
wait,
wait,
wait |
username
private java.lang.String username
- a
String
which represents the user name on the server.
resource
private java.lang.String resource
- a
String
which represents the session resource.
password
private java.lang.String password
- a
String
which holds the password for this user.
SHA1Digest
private java.lang.String SHA1Digest
- a
String
which holds the SHA1 Digest for this user.
The digest authentication is a way to log in without sending the
password over the wire in plaintext. Both entities are still required
to know the plaintext password. The server sends a SessionID as part
of the initial tag. This values is prepended to the
user password, then run through a SHA hash and converted to Hex format.
Hashes are non-reversable, so the original password is not discernable,
but the server can perform the same steps and compare output to log
a user in.
- See Also:
SHA1Helper
IQAuth
public IQAuth(IQAuthBuilder builder)
throws java.lang.InstantiationException
- Creates a new
IQAuthExtension
instance. This will fail if
the builder does not have sufficient or correct information for an IQ
Auth snippet.
- Parameters:
builder
- an IQAuthExtensionBuilder
which holds the
values we are using.- Throws:
- java.lang.InstantiationException - thrown if the builder does not hold
sufficient data to create a valid Extension snippet.
getUsername
public java.lang.String getUsername()
getUsername
returns the value of the username attribute
- Returns:
- a
String
value
getResource
public java.lang.String getResource()
getResource
returns the value of the resource attribute
- Returns:
- a
String
value
getPassword
public java.lang.String getPassword()
getPassword
returns the value used for the password
- Returns:
- a
String
value
getSHA1Digest
public java.lang.String getSHA1Digest()
isSHA1Digest
differentiates between the passkey being
a password or SHA1 key
- Returns:
- a
boolean
value
appendItem
public void appendItem(java.lang.StringBuffer retval)
appendItem
appends the XML representation of the
current packet data to the specified StringBuffer
.
- Overrides:
- appendItem in class XMLData
- Parameters:
retval
- The StringBuffer
to append to