1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-10 17:49:38 +02:00

Added anonymous authentication. SMACK-84

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2782 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Gaston Dombiak 2005-09-05 21:57:33 +00:00 committed by gato
parent 5b1eea6833
commit 6d6fdcf9b6
2 changed files with 48 additions and 0 deletions

View file

@ -29,6 +29,27 @@ package org.jivesoftware.smack;
*/
interface UserAuthentication {
/**
* Authenticates the user with the server. This method will return the full JID provided by
* the server. The server may assign a full JID with a username and resource different than
* the requested by this method.
*
* @param username the username that is authenticating with the server.
* @param password the password to send to the server.
* @param resource the desired resource.
* @return the full JID provided by the server while binding a resource for the connection.
* @throws XMPPException if an error occures while authenticating.
*/
String authenticate(String username, String password, String resource) throws
XMPPException;
/**
* Performs an anonymous authentication with the server. The server will created a new full JID
* for this connection. An exception will be thrown if the server does not support anonymous
* authentication.
*
* @return the full JID provided by the server while binding a resource for the connection.
* @throws XMPPException if an error occures while authenticating.
*/
String authenticateAnonymously() throws XMPPException;
}