public class AuthRepositoryPool extends Object implements AuthRepository
Repository.MetaDATA_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 |
|---|
AuthRepositoryPool() |
| Modifier and Type | Method and Description |
|---|---|
void |
addRepo(AuthRepository repo)
Method description
|
void |
addUser(BareJID user,
String password)
Describe
addUser method here. |
boolean |
digestAuth(BareJID user,
String digest,
String id,
String alg)
Deprecated.
|
String |
getPassword(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 |
initRepository(String resource_uri,
Map<String,String> params)
The method is called to initialize the data repository.
|
boolean |
isUserDisabled(BareJID user) |
void |
logout(BareJID user)
Describe
logout method here. |
boolean |
otherAuth(Map<String,Object> authProps)
Describe
otherAuth method here. |
boolean |
plainAuth(BareJID user,
String password)
Deprecated.
|
void |
queryAuth(Map<String,Object> authProps)
queryAuth returns mechanisms available for authentication. |
void |
removeUser(BareJID user)
Describe
removeUser method here. |
void |
setUserDisabled(BareJID user,
Boolean value) |
AuthRepository |
takeRepo()
Method description
|
void |
updatePassword(BareJID user,
String password)
Describe
updatePassword method here. |
public void addRepo(AuthRepository repo)
repo - public void addUser(BareJID user, String password) throws UserExistsException, TigaseDBException
AuthRepositoryaddUser method here.addUser in interface AuthRepositoryuser - a BareJID valuepassword - a String valueUserExistsException - if an error occursTigaseDBException - if an error occurs@Deprecated public boolean digestAuth(BareJID user, String digest, String id, String alg) throws UserNotFoundException, TigaseDBException, AuthorizationException
AuthRepositorydigestAuth 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.digestAuth in interface AuthRepositoryuser - 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.public String getResourceUri()
AuthRepositorygetResourceUri method returns database connection string.getResourceUri in interface AuthRepositoryString value of database connection string.public long getUsersCount()
AuthRepositorygetUsersCount in interface AuthRepositorylong number of registered users in the repository.public long getUsersCount(String domain)
AuthRepositorygetUsersCount in interface AuthRepositorylong 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 void logout(BareJID user) throws UserNotFoundException, TigaseDBException
AuthRepositorylogout method here.logout in interface AuthRepositoryuser - a BareJID valueUserNotFoundException - if an error occursTigaseDBException - if an error occurspublic boolean otherAuth(Map<String,Object> authProps) throws UserNotFoundException, TigaseDBException, AuthorizationException
AuthRepositoryotherAuth method here.otherAuth in interface AuthRepositoryauthProps - a Map valueboolean valueUserNotFoundException - if an error occursTigaseDBException - if an error occursAuthorizationException - if an error occurs@Deprecated public boolean plainAuth(BareJID user, String password) throws UserNotFoundException, TigaseDBException, AuthorizationException
AuthRepositoryplainAuth method performs non-sasl, plain authentication
as described in non-sasl authentication
XEP-0078.plainAuth in interface AuthRepositoryuser - 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.public 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 removeUser(BareJID user) throws UserNotFoundException, TigaseDBException
AuthRepositoryremoveUser method here.removeUser in interface AuthRepositoryuser - a BareJID valueUserNotFoundException - if an error occursTigaseDBException - if an error occurspublic AuthRepository takeRepo()
public void updatePassword(BareJID user, String password) throws UserNotFoundException, TigaseDBException
AuthRepositoryupdatePassword method here.updatePassword in interface AuthRepositoryuser - a BareJID valuepassword - a String valueUserNotFoundExceptionTigaseDBException - if an error occurspublic String getPassword(BareJID user) throws UserNotFoundException, TigaseDBException
getPassword in interface AuthRepositoryUserNotFoundExceptionTigaseDBExceptionpublic boolean isUserDisabled(BareJID user) throws UserNotFoundException, TigaseDBException
isUserDisabled in interface AuthRepositoryUserNotFoundExceptionTigaseDBExceptionpublic void setUserDisabled(BareJID user, Boolean value) throws UserNotFoundException, TigaseDBException
setUserDisabled in interface AuthRepositoryUserNotFoundExceptionTigaseDBExceptionCopyright © 2017 "Tigase, Inc.". All rights reserved.