|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttigase.db.ldap.LdapAuthProvider
public class LdapAuthProvider
| Field Summary | |
|---|---|
protected static String[] |
non_sasl_mechs
|
protected static String[] |
sasl_mechs
|
static String |
USER_DN_PATTERN_KEY
Example: uid=%s,ou=people,dc=xmpp-test,dc=org |
| Fields inherited from interface tigase.db.AuthRepository |
|---|
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 Summary | |
|---|---|
LdapAuthProvider()
|
|
| Method Summary | |
|---|---|
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 |
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)
initRepository method is doing initialization for database
connection. |
void |
logout(tigase.xmpp.BareJID user)
Describe logout method here. |
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)
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String[] non_sasl_mechs
protected static final String[] sasl_mechs
public static final String USER_DN_PATTERN_KEY
uid=%s,ou=people,dc=xmpp-test,dc=org
| Constructor Detail |
|---|
public LdapAuthProvider()
| Method Detail |
|---|
public void addUser(tigase.xmpp.BareJID user,
String password)
throws UserExistsException,
TigaseDBException
AuthRepositoryaddUser method here.
addUser in interface AuthRepositoryuser - a BareJID valuepassword - a String value
UserExistsException - if an error occurs
TigaseDBException - if an error occurs
@Deprecated
public boolean digestAuth(tigase.xmpp.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()
AuthRepository
getUsersCount in interface AuthRepositorylong number of registered users in the repository.public long getUsersCount(String domain)
AuthRepository
getUsersCount in interface AuthRepositorylong number of registered users in the repository.
public void initRepository(String resource_uri,
Map<String,String> params)
throws DBInitException
AuthRepositoryinitRepository method is doing initialization for database
connection. It may also do lazy initialization with database.
Connection to database might be established during the first authentication
request.
initRepository in interface AuthRepositoryresource_uri - a String value of database connection string.
The string must also contain database user name and password if required
for connection.
DBInitException - if an error occurs during access database. It won't
happen however as in this method we do simple variable assigment.
public void logout(tigase.xmpp.BareJID user)
throws UserNotFoundException,
TigaseDBException
AuthRepositorylogout method here.
logout in interface AuthRepositoryuser - a BareJID value
UserNotFoundException - if an error occurs
TigaseDBException - if an error occurs
public boolean otherAuth(Map<String,Object> props)
throws UserNotFoundException,
TigaseDBException,
AuthorizationException
AuthRepositoryotherAuth method here.
otherAuth in interface AuthRepositoryprops - a Map value
boolean value
UserNotFoundException - if an error occurs
TigaseDBException - if an error occurs
AuthorizationException - if an error occurs
@Deprecated
public boolean plainAuth(tigase.xmpp.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(tigase.xmpp.BareJID user)
throws UserNotFoundException,
TigaseDBException
AuthRepositoryremoveUser method here.
removeUser in interface AuthRepositoryuser - a BareJID value
UserNotFoundException - if an error occurs
TigaseDBException - if an error occurs
public void updatePassword(tigase.xmpp.BareJID user,
String password)
throws UserNotFoundException,
TigaseDBException
AuthRepositoryupdatePassword method here.
updatePassword in interface AuthRepositoryuser - a BareJID valuepassword - a String value
UserNotFoundException
TigaseDBException - if an error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||