@Deprecated public class TigaseAuth extends Object implements AuthRepository, DataSourceAware<DataRepository>, RepositoryVersionAware
AuthRepository.AccountStatus, AuthRepository.DefaultCredentials, AuthRepository.SingleCredential
Repository.Meta, Repository.SchemaId
RepositoryVersionAware.SchemaVersion
DATA_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
Constructor and Description |
---|
TigaseAuth()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addUser(BareJID user,
String password)
Deprecated.
|
AuthRepository.AccountStatus |
getAccountStatus(BareJID user)
Deprecated.
|
String |
getPassword(BareJID user)
Deprecated.
|
String |
getResourceUri()
Deprecated.
getResourceUri method returns database connection string. |
long |
getUsersCount()
Deprecated.
getUsersCount method is thread safe. |
long |
getUsersCount(String domain)
Deprecated.
This method is only used by the server statistics component to report number of registered users for given
domain.
|
void |
initRepository(String connection_str,
Map<String,String> params)
Deprecated.
|
boolean |
isUserDisabled(BareJID user)
Deprecated.
|
void |
loggedIn(BareJID user)
Deprecated.
Do some actions on repository, when user logs in.
|
void |
logout(BareJID user)
Deprecated.
|
boolean |
otherAuth(Map<String,Object> props)
Deprecated.
|
void |
queryAuth(Map<String,Object> authProps)
Deprecated.
queryAuth returns mechanisms available for authentication. |
void |
removeUser(BareJID user)
Deprecated.
|
void |
setAccountStatus(BareJID user,
AuthRepository.AccountStatus status)
Deprecated.
|
void |
setDataSource(DataRepository dataSource)
Deprecated.
Method called to provide class with instance of a data source.
|
void |
setUserDisabled(BareJID user,
Boolean value)
Deprecated.
|
void |
updatePassword(BareJID user,
String password)
Deprecated.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCredentialIds, getCredentials, getUsernames, isMechanismSupported, removeCredential, setCredentialsCodecs, updateCredential
getVersion, updateSchema
public void addUser(BareJID user, String password) throws UserExistsException, TigaseDBException
addUser
in interface AuthRepository
UserExistsException
TigaseDBException
public String getResourceUri()
AuthRepository
getResourceUri
method returns database connection string.getResourceUri
in interface AuthRepository
String
value of database connection string.public long getUsersCount()
getUsersCount
method is thread safe. It uses local variable for storing Statement
.getUsersCount
in interface AuthRepository
long
number of user accounts in database.public long getUsersCount(String domain)
AuthRepository
getUsersCount
in interface AuthRepository
domain
- for which get the statisticslong
number of registered users in the repository.public void setDataSource(DataRepository dataSource) throws DBInitException
DataSourceAware
setDataSource
in interface DataSourceAware<DataRepository>
DBInitException
@Deprecated public void initRepository(String connection_str, Map<String,String> params) throws DBInitException
Repository
resource_uri
parameter as the database connection string or via
params
map if the required repository parameters are more complex or both.initRepository
in interface Repository
connection_str
- 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 void logout(BareJID user) throws UserNotFoundException, TigaseDBException
logout
in interface AuthRepository
UserNotFoundException
TigaseDBException
public void loggedIn(BareJID user) throws TigaseDBException
AuthRepository
last_login_time
)loggedIn
in interface AuthRepository
user
- JID of logged user.TigaseDBException
- if an error occurspublic boolean otherAuth(Map<String,Object> props) throws UserNotFoundException, TigaseDBException, AuthorizationException
otherAuth
in interface AuthRepository
UserNotFoundException
TigaseDBException
AuthorizationException
public void queryAuth(Map<String,Object> authProps)
AuthRepository
queryAuth
returns mechanisms available for authentication.queryAuth
in interface AuthRepository
authProps
- a Map
value with parameters for authentication.public void removeUser(BareJID user) throws UserNotFoundException, TigaseDBException
removeUser
in interface AuthRepository
UserNotFoundException
TigaseDBException
public void updatePassword(BareJID user, String password) throws UserNotFoundException, TigaseDBException
updatePassword
in interface AuthRepository
UserNotFoundException
TigaseDBException
public String getPassword(BareJID user) throws UserNotFoundException, TigaseDBException
getPassword
in interface AuthRepository
UserNotFoundException
TigaseDBException
public boolean isUserDisabled(BareJID user) throws UserNotFoundException, TigaseDBException
isUserDisabled
in interface AuthRepository
UserNotFoundException
TigaseDBException
public void setUserDisabled(BareJID user, Boolean value) throws UserNotFoundException, TigaseDBException
setUserDisabled
in interface AuthRepository
UserNotFoundException
TigaseDBException
public void setAccountStatus(BareJID user, AuthRepository.AccountStatus status) throws TigaseDBException
setAccountStatus
in interface AuthRepository
TigaseDBException
public AuthRepository.AccountStatus getAccountStatus(BareJID user) throws TigaseDBException
getAccountStatus
in interface AuthRepository
TigaseDBException
Copyright © 2004–2021 "Tigase, Inc.". All rights reserved.