tigase.db.jdbc
Class LibreSourceAuth

java.lang.Object
  extended by tigase.db.jdbc.LibreSourceAuth
All Implemented Interfaces:
UserAuthRepository

public class LibreSourceAuth
extends Object
implements UserAuthRepository

Describe class LibreSourceAuth here. Created: Sat Nov 11 22:22:04 2006

Version:
$Rev$
Author:
Artur Hefczyc

Field Summary
static String DEF_PROFILES_TBL
           
static String DEF_USERS_TBL
           
 
Fields inherited from interface tigase.db.UserAuthRepository
DATA_KEY, MACHANISM_KEY, PROTOCOL_KEY, PROTOCOL_VAL_NONSASL, PROTOCOL_VAL_SASL, REALM_KEY, RESULT_KEY, SERVER_NAME_KEY, USER_ID_KEY
 
Constructor Summary
LibreSourceAuth()
           
 
Method Summary
 void addUser(String user, String password)
          Describe addUser method here.
 boolean digestAuth(String user, String digest, String id, String alg)
          Describe digestAuth method here.
 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 connection_str, Map<String,String> params)
          Describe initRepository method here.
 void logout(String user)
          Describe logout method here.
 boolean otherAuth(Map<String,Object> props)
          Describe otherAuth method here.
 boolean plainAuth(String user, String password)
          Describe plainAuth method here.
 void queryAuth(Map<String,Object> authProps)
          Describe queryAuth method here.
 void removeUser(String user)
          Describe removeUser method here.
 void updatePassword(String 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

DEF_USERS_TBL

public static final String DEF_USERS_TBL
See Also:
Constant Field Values

DEF_PROFILES_TBL

public static final String DEF_PROFILES_TBL
See Also:
Constant Field Values
Constructor Detail

LibreSourceAuth

public LibreSourceAuth()
Method Detail

queryAuth

public void queryAuth(Map<String,Object> authProps)
Describe queryAuth method here.

Specified by:
queryAuth in interface UserAuthRepository
Parameters:
authProps - a Map value

initRepository

public void initRepository(String connection_str,
                           Map<String,String> params)
                    throws DBInitException
Describe initRepository method here.

Specified by:
initRepository in interface UserAuthRepository
Parameters:
connection_str - a String value
Throws:
DBInitException - if an error occurs

getResourceUri

public String getResourceUri()
Description copied from interface: UserAuthRepository
getResourceUri method returns database connection string.

Specified by:
getResourceUri in interface UserAuthRepository
Returns:
a String value of database connection string.

plainAuth

public boolean plainAuth(String user,
                         String password)
                  throws UserNotFoundException,
                         TigaseDBException,
                         AuthorizationException
Describe plainAuth method here.

Specified by:
plainAuth in interface UserAuthRepository
Parameters:
user - a String value
password - a String value
Returns:
a boolean value
Throws:
UserNotFoundException - if an error occurs
TigaseDBException - if an error occurs
AuthorizationException - if an error occurs during authentication process.

logout

public void logout(String user)
            throws UserNotFoundException,
                   TigaseDBException
Description copied from interface: UserAuthRepository
Describe logout method here.

Specified by:
logout in interface UserAuthRepository
Parameters:
user - a String value
Throws:
UserNotFoundException - if an error occurs
TigaseDBException - if an error occurs

digestAuth

public boolean digestAuth(String user,
                          String digest,
                          String id,
                          String alg)
                   throws UserNotFoundException,
                          TigaseDBException,
                          AuthorizationException
Describe digestAuth method here.

Specified by:
digestAuth in interface UserAuthRepository
Parameters:
user - a String value
digest - a String value
id - a String value
alg - a String value
Returns:
a boolean value
Throws:
UserNotFoundException - if an error occurs
TigaseDBException - if an error occurs
AuthorizationException - if an error occurs

otherAuth

public boolean otherAuth(Map<String,Object> props)
                  throws UserNotFoundException,
                         TigaseDBException,
                         AuthorizationException
Describe otherAuth method here.

Specified by:
otherAuth in interface UserAuthRepository
Parameters:
props - a Map value
Returns:
a boolean value
Throws:
UserNotFoundException - if an error occurs
TigaseDBException - if an error occurs
AuthorizationException - if an error occurs

addUser

public void addUser(String user,
                    String password)
             throws UserExistsException,
                    TigaseDBException
Describe addUser method here.

Specified by:
addUser in interface UserAuthRepository
Parameters:
user - a String value
password - a String value
Throws:
UserExistsException - if an error occurs
TigaseDBException - if an error occurs

updatePassword

public void updatePassword(String user,
                           String password)
                    throws UserExistsException,
                           TigaseDBException
Describe updatePassword method here.

Specified by:
updatePassword in interface UserAuthRepository
Parameters:
user - a String value
password - a String value
Throws:
UserExistsException - if an error occurs
TigaseDBException - if an error occurs

removeUser

public void removeUser(String user)
                throws UserNotFoundException,
                       TigaseDBException
Describe removeUser method here.

Specified by:
removeUser in interface UserAuthRepository
Parameters:
user - a String value
Throws:
UserNotFoundException - if an error occurs
TigaseDBException - if an error occurs

getUsersCount

public long getUsersCount()
Description copied from interface: UserAuthRepository
This method is only used by the server statistics component to report number of registered users.

Specified by:
getUsersCount in interface UserAuthRepository
Returns:
a long number of registered users in the repository.

getUsersCount

public long getUsersCount(String domain)
Description copied from interface: UserAuthRepository
This method is only used by the server statistics component to report number of registered users for given domain.

Specified by:
getUsersCount in interface UserAuthRepository
Returns:
a long number of registered users in the repository.


Copyright © 2001-2006 Tigase Developers Team. All rights Reserved.