|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AuthRepository
Interface AuthRepository defines a proxy bridge between user
authentication data storage and the Tigase server authentication logic. Important
thing about the authentication repository is that it not only stores login credentials
but also performs actual user authentication.
This is because available authentication mechanisms depend on the way data are stored
in the repository (database).
Created: Sun Nov 5 21:15:46 2006
| Field Summary | |
|---|---|
static String |
DATA_KEY
Property key name for otherAuth method call. |
static String |
DIGEST_ID_KEY
|
static String |
DIGEST_KEY
|
static String |
MACHANISM_KEY
Property key name for otherAuth method call. |
static String |
PASSWORD_KEY
|
static String |
PROTOCOL_KEY
Property key name for otherAuth method call. |
static String |
PROTOCOL_VAL_NONSASL
Property value for otherAuth method call. |
static String |
PROTOCOL_VAL_SASL
Property value for otherAuth method call. |
static String |
REALM_KEY
Property key name for otherAuth method call. |
static String |
RESULT_KEY
Property key name for otherAuth method call. |
static String |
SERVER_NAME_KEY
Property key name for otherAuth method call. |
static String |
USER_ID_KEY
Property key name for otherAuth method call. |
static String |
USERNAME_KEY
|
| Method Summary | |
|---|---|
void |
addUser(tigase.xmpp.BareJID user,
String password)
Describe addUser method here. |
boolean |
digestAuth(tigase.xmpp.BareJID user,
String digest,
String id,
String alg)
Deprecated. |
String |
getResourceUri()
getResourceUri method returns database connection string. |
long |
getUsersCount()
This method is only used by the server statistics component to report number of registered users. |
long |
getUsersCount(String domain)
This method is only used by the server statistics component to report number of registered users for given domain. |
void |
initRepository(String resource_uri,
Map<String,String> params)
initRepository method is doing initialization for database
connection. |
void |
logout(tigase.xmpp.BareJID user)
Describe logout method here. |
boolean |
otherAuth(Map<String,Object> authProps)
Describe otherAuth method here. |
boolean |
plainAuth(tigase.xmpp.BareJID user,
String password)
Deprecated. |
void |
queryAuth(Map<String,Object> authProps)
queryAuth returns mechanisms available for authentication. |
void |
removeUser(tigase.xmpp.BareJID user)
Describe removeUser method here. |
void |
updatePassword(tigase.xmpp.BareJID user,
String password)
Describe updatePassword method here. |
| Field Detail |
|---|
static final String PROTOCOL_KEY
otherAuth method call. It is used to provide
desired authentication protocol to the authentication logic.
static final String PROTOCOL_VAL_SASL
otherAuth method call. It is used to provide
desired authentication SASL protocol to the authentication logic.
static final String PROTOCOL_VAL_NONSASL
otherAuth method call. It is used to provide
desired authentication NON-SASL protocol to the authentication logic.
static final String RESULT_KEY
otherAuth method call. It is used to provide
authentication handshaking data during login process. Some authentication mechanisms
require exchanging requests between the client and the server. This property key points
back to the data which need to be sent back to the client.
static final String MACHANISM_KEY
otherAuth method call. It is used to provide
desired authentication mechanism to the authentication logic.
static final String REALM_KEY
otherAuth method call. It is used to provide
authentication realm to the authentication logic. In most cases, the realm is just
a domain name.
static final String SERVER_NAME_KEY
otherAuth method call. It is used to provide
authentication domain to the authentication logic. It is highly recommended that this
property is always set, even if the authentication protocol/mechanism does not need it
strictly.
static final String USERNAME_KEY
static final String PASSWORD_KEY
static final String DIGEST_KEY
static final String DIGEST_ID_KEY
static final String DATA_KEY
otherAuth method call. It is used to provide an
extra authentication data by the client to the authentication logic.
Please note the RESULT_KEY property key is used to provide authentication
data from the server to the client. This property is used to provide authentication data
from the client to the server.
static final String USER_ID_KEY
otherAuth method call. It is used to provide a user
ID on successful user login. Please note, the key points to the object of
BareJID type.
| Method Detail |
|---|
void addUser(tigase.xmpp.BareJID user,
String password)
throws UserExistsException,
TigaseDBException
addUser method here.
user - a BareJID valuepassword - a String value
UserExistsException - if an error occurs
TigaseDBException - if an error occurs
@Deprecated
boolean digestAuth(tigase.xmpp.BareJID user,
String digest,
String id,
String alg)
throws UserNotFoundException,
TigaseDBException,
AuthorizationException
digestAuth method performs non-sasl, digest authentication
as described in non-sasl authentication
XEP-0078
For now it is empty and always returns false as I don't
have description for database with passwords.
user - a BareJID value of user namedigest - a String value password digest sumid - a String value session ID used for digest sum
calculation.alg - a String value of algorithm ID used for digest sum
calculation.
boolean value true on successful
authentication, false on authentication failure.
UserNotFoundException - if an given user name is not found in
the authentication repository.
TigaseDBException - if an error occurs during during accessing
database;
AuthorizationException - if an error occurs during authentication
process.String getResourceUri()
getResourceUri method returns database connection string.
String value of database connection string.long getUsersCount()
long number of registered users in the repository.long getUsersCount(String domain)
domain -
long number of registered users in the repository.
void initRepository(String resource_uri,
Map<String,String> params)
throws DBInitException
initRepository method is doing initialization for database
connection. It may also do lazy initialization with database.
Connection to database might be established during the first authentication
request.
resource_uri - a String value of database connection string.
The string must also contain database user name and password if required
for connection.params -
DBInitException - if an error occurs during access database. It won't
happen however as in this method we do simple variable assigment.
void logout(tigase.xmpp.BareJID user)
throws UserNotFoundException,
TigaseDBException
logout method here.
user - a BareJID value
UserNotFoundException - if an error occurs
TigaseDBException - if an error occurs
boolean otherAuth(Map<String,Object> authProps)
throws UserNotFoundException,
TigaseDBException,
AuthorizationException
otherAuth method here.
authProps - a Map value
boolean value
UserNotFoundException - if an error occurs
TigaseDBException - if an error occurs
AuthorizationException - if an error occurs
@Deprecated
boolean plainAuth(tigase.xmpp.BareJID user,
String password)
throws UserNotFoundException,
TigaseDBException,
AuthorizationException
plainAuth method performs non-sasl, plain authentication
as described in non-sasl authentication
XEP-0078.
user - a BareJID value of user namepassword - a String value of plain user password.
boolean value true on successful
authentication, false on authentication failure.
UserNotFoundException - if an given user name is not found in
the authentication repository.
TigaseDBException - if an error occurs during during accessing
database;
AuthorizationException - if an error occurs during authentication
process.void queryAuth(Map<String,Object> authProps)
queryAuth returns mechanisms available for authentication.
authProps - a Map value with parameters for authentication.
void removeUser(tigase.xmpp.BareJID user)
throws UserNotFoundException,
TigaseDBException
removeUser method here.
user - a BareJID value
UserNotFoundException - if an error occurs
TigaseDBException - if an error occurs
void updatePassword(tigase.xmpp.BareJID user,
String password)
throws UserNotFoundException,
TigaseDBException
updatePassword method here.
user - a BareJID valuepassword - a String value
UserNotFoundException
TigaseDBException - if an error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||