public interface AuthRepository extends Repository
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 2006Repository.Meta| Modifier and Type | Field and Description |
|---|---|
static String |
DATA_KEY
Property key name for
otherAuth method call. |
static String |
DIGEST_ID_KEY
Field description
|
static String |
DIGEST_KEY
Field description
|
static String |
MACHANISM_KEY
Property key name for
otherAuth method call. |
static String |
PASSWORD_KEY
Field description
|
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
Field description
|
| Modifier and Type | Method and Description |
|---|---|
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 |
getPassword(tigase.xmpp.BareJID user) |
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 |
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.
use method
otherAuth(Map)
because this method is preferred. In a long term plans all authentication
methods should use otherAuth(...) calls.
|
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. |
initRepositorystatic 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 DIGEST_ID_KEY
static final String DIGEST_KEY
static final String MACHANISM_KEY
otherAuth method call. It is used to provide
desired authentication mechanism to the authentication logic.static final String PASSWORD_KEY
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_NONSASL
otherAuth method call. It is used to provide
desired authentication NON-SASL 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 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 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 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 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.static final String USERNAME_KEY
void addUser(tigase.xmpp.BareJID user,
String password)
throws UserExistsException,
TigaseDBException
addUser method here.user - a BareJID valuepassword - a String valueUserExistsException - if an error occursTigaseDBException - 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 logout(tigase.xmpp.BareJID user)
throws UserNotFoundException,
TigaseDBException
logout method here.user - a BareJID valueUserNotFoundException - if an error occursTigaseDBException - if an error occursboolean otherAuth(Map<String,Object> authProps) throws UserNotFoundException, TigaseDBException, AuthorizationException
otherAuth method here.authProps - a Map valueboolean valueUserNotFoundException - if an error occursTigaseDBException - if an error occursAuthorizationException - 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 valueUserNotFoundException - if an error occursTigaseDBException - if an error occursString getPassword(tigase.xmpp.BareJID user) throws UserNotFoundException, TigaseDBException
void updatePassword(tigase.xmpp.BareJID user,
String password)
throws UserNotFoundException,
TigaseDBException
updatePassword method here.user - a BareJID valuepassword - a String valueUserNotFoundExceptionTigaseDBException - if an error occursCopyright © 2016 "Tigase, Inc.". All rights reserved.