public abstract class AuthRepositoryMDImpl extends MDPoolBeanWithStatistics<AuthRepository,AuthRepositoryMDPoolBean.AuthRepositoryConfigBean> implements AuthRepository
AuthRepository.AccountStatus, AuthRepository.DefaultCredentials, AuthRepository.SingleCredentialRepository.Meta, Repository.SchemaIdPOOL_CLASS, POOL_SIZE, REPO_CLASS, REPO_URIDATA_KEY, DIGEST_ID_KEY, DIGEST_KEY, MACHANISM_KEY, PASSWORD_KEY, PROTOCOL_KEY, PROTOCOL_VAL_NONSASL, PROTOCOL_VAL_SASL, REALM_KEY, RESULT_KEY, SERVER_NAME_KEY, USER_ID_KEY, USERNAME_KEY| Constructor and Description |
|---|
AuthRepositoryMDImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addUser(BareJID user,
String password) |
AuthRepository.AccountStatus |
getAccountStatus(BareJID user) |
Credentials |
getCredentials(BareJID user,
String username) |
String |
getPassword(BareJID user) |
String |
getResourceUri()
getResourceUri method returns database connection string. |
Collection<String> |
getUsernames(BareJID user) |
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)
Method is deprecated and should not be user any more.
|
boolean |
isMechanismSupported(String domain,
String mechanism) |
boolean |
isUserDisabled(BareJID user) |
void |
loggedIn(BareJID user)
Do some actions on repository, when user logs in.
|
void |
logout(BareJID user) |
boolean |
otherAuth(Map<String,Object> authProps) |
void |
queryAuth(Map<String,Object> authProps)
queryAuth returns mechanisms available for authentication. |
void |
removeCredential(BareJID user,
String username) |
void |
removeUser(BareJID user) |
void |
setAccountStatus(BareJID user,
AuthRepository.AccountStatus status) |
void |
setUserDisabled(BareJID user,
Boolean value) |
void |
updateCredential(BareJID user,
String username,
String password) |
void |
updatePassword(BareJID user,
String password) |
addRepo, everyHour, everyMinute, everySecond, getDefaultRepository, getDomainsList, getRepo, getStatistics, removeRepo, repositoriesStream, setDefault, setStatisticsEnabled, wrapInProxygetConfigClass, getDefaultAlias, getName, register, registerConfigBean, unregisterclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetCredentialsCodecsbelongsTogetDefaultBeanClasspublic void addUser(BareJID user, String password) throws TigaseDBException
addUser in interface AuthRepositoryTigaseDBExceptionpublic AuthRepository.AccountStatus getAccountStatus(BareJID user) throws TigaseDBException
getAccountStatus in interface AuthRepositoryTigaseDBExceptionpublic Credentials getCredentials(BareJID user, String username) throws TigaseDBException
getCredentials in interface AuthRepositoryTigaseDBExceptionpublic String getPassword(BareJID user) throws TigaseDBException
getPassword in interface AuthRepositoryTigaseDBExceptionpublic String getResourceUri()
AuthRepositorygetResourceUri method returns database connection string.getResourceUri in interface AuthRepositoryString value of database connection string.public Collection<String> getUsernames(BareJID user) throws TigaseDBException
getUsernames in interface AuthRepositoryTigaseDBExceptionpublic long getUsersCount()
AuthRepositorygetUsersCount in interface AuthRepositorylong number of registered users in the repository.public long getUsersCount(String domain)
AuthRepositorygetUsersCount in interface AuthRepositorydomain - for which get the statisticslong number of registered users in the repository.public void initRepository(String resource_uri, Map<String,String> params) throws DBInitException
Repositoryresource_uri parameter as the database connection string or via
params map if the required repository parameters are more complex or both.initRepository in interface Repositoryresource_uri - value in most cases representing the database connection string.params - is a Map with repository properties necessary to initialize and perform all the
functions. The initialization parameters are implementation dependent.DBInitException - if there was an error during repository initialization. Some implementations,
though, perform so called lazy initialization so even though there is a problem with the underlying repository it
may not be signaled through this method call.public boolean isMechanismSupported(String domain, String mechanism)
isMechanismSupported in interface AuthRepositorypublic boolean isUserDisabled(BareJID user) throws TigaseDBException
isUserDisabled in interface AuthRepositoryTigaseDBExceptionpublic void loggedIn(BareJID user) throws TigaseDBException
AuthRepositorylast_login_time)loggedIn in interface AuthRepositoryuser - JID of logged user.TigaseDBException - if an error occurspublic void logout(BareJID user) throws TigaseDBException
logout in interface AuthRepositoryTigaseDBExceptionpublic boolean otherAuth(Map<String,Object> authProps) throws TigaseDBException, AuthorizationException
otherAuth in interface AuthRepositoryTigaseDBExceptionAuthorizationExceptionpublic void queryAuth(Map<String,Object> authProps)
AuthRepositoryqueryAuth returns mechanisms available for authentication.queryAuth in interface AuthRepositoryauthProps - a Map value with parameters for authentication.public void removeCredential(BareJID user, String username) throws TigaseDBException
removeCredential in interface AuthRepositoryTigaseDBExceptionpublic void removeUser(BareJID user) throws TigaseDBException
removeUser in interface AuthRepositoryTigaseDBExceptionpublic void setAccountStatus(BareJID user, AuthRepository.AccountStatus status) throws TigaseDBException
setAccountStatus in interface AuthRepositoryTigaseDBExceptionpublic void setUserDisabled(BareJID user, Boolean value) throws TigaseDBException
setUserDisabled in interface AuthRepositoryTigaseDBExceptionpublic void updateCredential(BareJID user, String username, String password) throws TigaseDBException
updateCredential in interface AuthRepositoryTigaseDBExceptionpublic void updatePassword(BareJID user, String password) throws TigaseDBException
updatePassword in interface AuthRepositoryTigaseDBExceptionCopyright © 2004–2019 "Tigase, Inc.". All rights reserved.