public class TigaseAuth extends Object implements AuthRepository
Repository.Meta
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, USERNAME_KEY
Constructor and Description |
---|
TigaseAuth() |
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()
Method description
|
long |
getUsersCount()
getUsersCount method is thread safe. |
long |
getUsersCount(String domain)
Method description
|
void |
initRepository(String connection_str,
Map<String,String> params)
Describe
initRepository method here. |
void |
logout(tigase.xmpp.BareJID user)
Method description
|
boolean |
otherAuth(Map<String,Object> props)
Describe
otherAuth method here. |
boolean |
plainAuth(tigase.xmpp.BareJID user,
String password)
Deprecated.
|
void |
queryAuth(Map<String,Object> authProps)
Describe
queryAuth method here. |
void |
removeUser(tigase.xmpp.BareJID user)
Describe
removeUser method here. |
void |
updatePassword(tigase.xmpp.BareJID user,
String password)
Describe
updatePassword method here. |
public void addUser(tigase.xmpp.BareJID user, String password) throws UserExistsException, TigaseDBException
addUser
method here.addUser
in interface AuthRepository
user
- a String
valuepassword
- a String
valueUserExistsException
- if an error occursTigaseDBException
- if an error occurs@Deprecated public boolean digestAuth(tigase.xmpp.BareJID user, String digest, String id, String alg) throws UserNotFoundException, TigaseDBException, AuthorizationException
digestAuth
method here.digestAuth
in interface AuthRepository
user
- a String
valuedigest
- a String
valueid
- a String
valuealg
- a String
valueboolean
valueUserNotFoundException
- if an error occursTigaseDBException
- if an error occursAuthorizationException
- if an error occurspublic String getResourceUri()
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)
getUsersCount
in interface AuthRepository
domain
- long
number of registered users in the repository.public void initRepository(String connection_str, Map<String,String> params) throws DBInitException
initRepository
method here.initRepository
in interface Repository
connection_str
- a String
valueparams
- DBInitException
- if an error occurspublic void logout(tigase.xmpp.BareJID user) throws UserNotFoundException, TigaseDBException
logout
in interface AuthRepository
user
- TigaseDBException
UserNotFoundException
public boolean otherAuth(Map<String,Object> props) throws UserNotFoundException, TigaseDBException, AuthorizationException
otherAuth
method here.otherAuth
in interface AuthRepository
props
- a Map
valueboolean
valueUserNotFoundException
- if an error occursTigaseDBException
- if an error occursAuthorizationException
- if an error occurs@Deprecated public boolean plainAuth(tigase.xmpp.BareJID user, String password) throws UserNotFoundException, TigaseDBException, AuthorizationException
plainAuth
method here.plainAuth
in interface AuthRepository
user
- a String
valuepassword
- a String
valueboolean
valueAuthorizationException
UserNotFoundException
- if an error occursTigaseDBException
- if an error occurspublic void queryAuth(Map<String,Object> authProps)
queryAuth
method here.queryAuth
in interface AuthRepository
authProps
- a Map
valuepublic void removeUser(tigase.xmpp.BareJID user) throws UserNotFoundException, TigaseDBException
removeUser
method here.removeUser
in interface AuthRepository
user
- a String
valueUserNotFoundException
- if an error occursTigaseDBException
- if an error occurspublic void updatePassword(tigase.xmpp.BareJID user, String password) throws UserNotFoundException, TigaseDBException
updatePassword
method here.updatePassword
in interface AuthRepository
user
- a String
valuepassword
- a String
valueUserNotFoundException
TigaseDBException
- if an error occurspublic String getPassword(tigase.xmpp.BareJID user) throws UserNotFoundException, TigaseDBException
getPassword
in interface AuthRepository
UserNotFoundException
TigaseDBException
Copyright © 2014 "Tigase, Inc.". All rights reserved.